#1012: ghc panic with mutually recursive modules and template haskell
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.6
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: powerpc | Os: MacOS X
-------------------------+--------------------------------------------------
When compiling the files below using ghc --make Main.hs I get the
following error:
{{{
[1 of 5] Compiling ModuleA[boot] ( ModuleA.hs-boot, nothing )
[2 of 5] Compiling ModuleC ( ModuleC.hs, ModuleC.o )
[3 of 5] Compiling ModuleB ( ModuleB.hs, ModuleB.o )
Loading package base ... linking ... done.
Loading package template-haskell ... linking ... done.
ghc-6.6: panic! (the 'impossible' happened)
(GHC version 6.6 for powerpc-apple-darwin):
Maybe.fromJust: Nothing
}}}
ModuleA.hs:
{{{
module ModuleA where
import ModuleB
}}}
ModuleA.hs-boot:
{{{
module ModuleA where
}}}
ModuleB.hs:
{{{
{-# OPTIONS -fth #-}
module ModuleB where
import ModuleC
$(nothing)
}}}
ModuleC.hs:
{{{
module ModuleC where
import Language.Haskell.TH
import {-# SOURCE #-} ModuleA
nothing = return [] :: Q [Dec]
}}}
Main.hs:
{{{
module Main.hs
import ModuleA
main = return ()
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1012>
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