diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-07-27 21:46:26 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-07-30 22:52:52 +0200 |
commit | 6880277381061593da2c2c19767ba508fb4045e3 (patch) | |
tree | b9a1ec671de073deeaf940bc3d0e3804b3353b14 /testsuite/tests/arrows | |
parent | 756fa0a3547a5836ff50787a8f89e2db0793f5d3 (diff) | |
download | haskell-6880277381061593da2c2c19767ba508fb4045e3.tar.gz |
Testsuite: add arrows/should_compile/T5333 (#5333)
Diffstat (limited to 'testsuite/tests/arrows')
-rw-r--r-- | testsuite/tests/arrows/should_compile/T5333.hs | 28 | ||||
-rw-r--r-- | testsuite/tests/arrows/should_compile/all.T | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/should_compile/T5333.hs b/testsuite/tests/arrows/should_compile/T5333.hs new file mode 100644 index 0000000000..808b8a207b --- /dev/null +++ b/testsuite/tests/arrows/should_compile/T5333.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE Arrows, NoMonomorphismRestriction #-} +module T5333 where + +import Prelude hiding ( id, (.) ) +import Control.Arrow + +cc1 :: a e b -> a e b -> a e b +cc1 = undefined + +-- With GHC < 7.10.1, the following compile failures occured: +-- +-- ghc: panic! (the 'impossible' happened) +-- (GHC version 7.8.4 for x86_64-unknown-linux): +-- mkCmdEnv Not found: base:GHC.Desugar.>>>{v 02V} + +-- 'g' fails to compile. +g = proc (x, y, z) -> + ((returnA -< x) &&& (returnA -< y) &&& (returnA -< z)) + +-- 'f' compiles: +-- - without an infix declaration +-- - with the infixl declaration +-- and fails with the infixr declaration +infixr 6 `cc1` +-- infixl 6 `cc1` + +f = proc (x, y, z) -> + ((returnA -< x) `cc1` (returnA -< y) `cc1` (returnA -< z)) diff --git a/testsuite/tests/arrows/should_compile/all.T b/testsuite/tests/arrows/should_compile/all.T index af287cc34b..ace8af5360 100644 --- a/testsuite/tests/arrows/should_compile/all.T +++ b/testsuite/tests/arrows/should_compile/all.T @@ -15,3 +15,4 @@ test('T3964', normal, compile, ['']) test('T5283', normal, compile, ['']) test('T5267', expect_broken(5267), compile, ['']) test('T5022', normal, compile, ['']) +test('T5333', normal, compile, ['']) |