splitTyConApp panic when using view patterns
Here is a sample program that makes ghci panic with the following message:
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.3 for i386-unknown-linux):
splitTyConApp t_ag8{tv} [tau]
The code uses view patterns.
module Bug where
data F = FT String [F]
data G = GX F F | GY
spec :: F -> G
spec (FT "X" [t1, t2]) = GX t1 t2
spec _ = GY
walk (spec -> GX _ t2) = walk t2
walk t@(FT _ _) = t
You can reach me at cklin@cs.pdx.edu
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |