Why doesn't this Template Haskell program work?
Sean Seefried
seefried@itee.uq.edu.au
Mon, 13 Jan 2003 12:50:14 +1000
I compiled the following program with ghc-5.05.20030109
----------
import Language.Haskell.THSyntax
main = putStrLn (show $(lift ('a', 'b')))
instance (Lift a, Lift b) => Lift (a,b) where
lift (a,b) = tup [lift a, lift b]
-----
and received the following error message
-------
ghc --make -fglasgow-exts -package haskell-src -package haskell98
Main.hs -o test
Chasing modules from: Main.hs
Compiling Main ( Main.hs, ./Main.o )
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package haskell-src ... linking ... done.
ghc-5.05.20030109: panic! (the `impossible' happened, GHC version
5.05.20030109):
nameModule zdfLiftZ2T{-a1dB-}
Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org,
or http://sourceforge.net/projects/ghc/.
------
Why? Because if I compile the following program,
--------
import Language.Haskell.THSyntax
main = putStrLn (show $(tup [lift 'a', lift 'b']))
--------
it works just fine.
Also, is the template-haskell mailing list active?
Sean Seefried