diff options
Diffstat (limited to 'testsuite/tests/arrows/should_run/T3822.hs')
-rw-r--r-- | testsuite/tests/arrows/should_run/T3822.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/should_run/T3822.hs b/testsuite/tests/arrows/should_run/T3822.hs new file mode 100644 index 0000000000..93e6dc5797 --- /dev/null +++ b/testsuite/tests/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 |