"the `impossible' happened: Maybe.fromJust: Nothing" when using {-# SOURCE #-}
It is possible to use the {-# SOURCE #-} directive to make ghc crash. Attached is a program that does it with ghc 6.4.2. Here is a run of my compiler:
avatar@avatar:~/Docs/sandbox/haskell/hs-boot> make
ghc --make Main.hs
Chasing modules from: Main.hs
Compiling C ( ./C.hs, ./C.o )
Compiling A ( ./A.hs, ./A.o )
Compiling A[boot] ( ./A.hs-boot, ./A.o-boot )
Compiling B ( ./B.hs, ./B.o )
Compiling Main ( Main.hs, Main.o )
Linking ...
ghc-6.4.2: panic! (the `impossible' happened, GHC version 6.4.2):
Maybe.fromJust: Nothing
The bang seems to happen in
./compiler/main/DriverPipeline.hs:320: linkables = map (fromJust.hm_linkable) home_mod_infos
though I'm not 100% sure.
Cheers,
Misha
Trac metadata
Trac field | Value |
---|---|
Version | 6.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | avatar@hot.ee |
Operating system | |
Architecture |