Skip to content

Problem with where clause and Template Haskell

When compiling the two files attached, the following
happens:


$ ./compile.sh 
Chasing modules from: TemplateTryOut.hs
Skipping  Templates        ( ./Templates.hs,
./Templates.o )
Compiling Main             ( TemplateTryOut.hs,
TemplateTryOut.o )
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package haskell-src ... linking ... done.
compiling template
ghc-6.2.1: panic! (the `impossible' happened, GHC
version 6.2.1):
        nameModule readTread_d1z7

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


I think it's a problem with template haskell. The first
call of 'template' in TemplateTryOut.hs (line 10)
succeeds, as you can see from the message 'compiling
template'. The second call in line 17 fails. The only
difference between these 2 calls is the where clause.
Trac metadata
Trac field Value
Version 6.2.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information