ghc-5.04: panic! ... tySplitTyConApp ...
compiling the below program with
ghc -fglasgow-exts Main.hs
gives the following error:
ghc-5.04: panic! (the `impossible' happened, GHC
version 5.04):
tcSplitTyConApp forall x{-r6S-} :: *.
Main.L{-rr-} x{-r6S-}
-----------------------------------------------------
-- Main.hs
module Main where
newtype FA c = FA (forall x . c x)
newtype L x = L [x]
my_nil = FA (L []) :: FA L
sample :: String
sample = case my_nil of FA (L x) -> "foo"++x
-- -- but this works fine
-- sample = case my_nil of FA x -> case x of L y ->
"foo"++y
main = print sample
Trac metadata
| Trac field | Value |
|---|---|
| Version | 5.04.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |