diff options
author | Ian Lynagh <igloo@earth.li> | 2010-06-19 16:00:49 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-06-19 16:00:49 +0000 |
commit | 6fd4c3b78d50b6ca5da0c9685fd50a28e3524ae8 (patch) | |
tree | c5042d08ade22f6550f705806de55732d2e46ace /testsuite/tests/ghc-regress/arrows/should_run/T3822.hs | |
parent | 504e4c0f924c8de37c6c7b34fb7b5567732bb26f (diff) | |
download | haskell-6fd4c3b78d50b6ca5da0c9685fd50a28e3524ae8.tar.gz |
Add a test for #3822
Diffstat (limited to 'testsuite/tests/ghc-regress/arrows/should_run/T3822.hs')
-rw-r--r-- | testsuite/tests/ghc-regress/arrows/should_run/T3822.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/arrows/should_run/T3822.hs b/testsuite/tests/ghc-regress/arrows/should_run/T3822.hs new file mode 100644 index 0000000000..93e6dc5797 --- /dev/null +++ b/testsuite/tests/ghc-regress/arrows/should_run/T3822.hs @@ -0,0 +1,17 @@ + +{-# LANGUAGE Arrows #-} + +import Control.Arrow +import qualified Control.Category as Cat + +test :: Int -> Int +test = proc x -> do + let neg = x < 0 + case x of + x | neg -> returnA -< 0 -- GHC panics + --x | x < 0 -> returnA -< 0 -- GHC doesn't panic + _ -> returnA -< 10 + +main = do + print $ test (-1) + print $ test 1 |