Template haskell and mutually recursive modules won't play nice

Samuel Bronson naesten at gmail.com
Wed May 11 20:38:07 EDT 2005


It looks like TH has issues with mutually recursive modules. Now I
could understand this if I was actually trying to call functions in
modules imported with {-# SOURCE #-} from TH, but I'm not. What is
going on here? I am getting sick of seeing "expectJust
upsweep_mod:old_linkable".

% ghc --make RecClass.hs -c             
Chasing modules from: RecClass.hs
Compiling RecClass[boot]   ( RecClass.hs-boot, RecClass.o-boot )
Skipping  RecClassTHStuff  ( ./RecClassTHStuff.hs, ./RecClassTHStuff.o )
Compiling RecClass         ( RecClass.hs, RecClass.o )
Loading package base-1.0 ... linking ... done.
Loading package haskell98-1.0 ... linking ... done.
Loading package template-haskell-1.0 ... linking ... done.
ghc-6.4: panic! (the `impossible' happened, GHC version 6.4):
        expectJust upsweep_mod:old_linkable

Please report it as a compiler bug to glasgow-haskell-bugs at haskell.org,
or http://sourceforge.net/projects/ghc/.

-- Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RecClass.hs
Type: text/x-haskell
Size: 120 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20050511/6266e44a/RecClass.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RecClass.hs-boot
Type: application/octet-stream
Size: 48 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20050511/6266e44a/RecClass.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RecClassTHStuff.hs
Type: text/x-haskell
Size: 139 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20050511/6266e44a/RecClassTHStuff.bin


More information about the Glasgow-haskell-bugs mailing list