#3822: pattern guards in arrow notation (Arrows extension) case statement cause
compiler panic
----------------------------------+-----------------------------------------
Reporter: StephenBlackheath | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.1 | Keywords: arrows pattern guards case
panic
Os: Linux | Testcase: patternGuard.hs
Architecture: x86_64 (amd64) | Failure: Compile-time crash
----------------------------------+-----------------------------------------
Comment(by StephenBlackheath):
{{{
{-# 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
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3822#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs