Hi,
playing around with partial evaluation,
I encountered the following bug:
65> ghc --make -fglasgow-exts -package haskell-src Main.hs -o Main -ddump-splices
Chasing modules from: Main.hs
Compiling Power ( Power.hs, ./Power.o )
Compiling Main ( Main.hs, ./Main.o )
ghc-6.0: panic! (the `impossible' happened, GHC version 6.0):
nameModule x {- v a1BE -}
Please report it as a compiler bug to [EMAIL PROTECTED],
or http://sourceforge.net/projects/ghc/.
----------------------------------------------------------------------------------
module Power where
import Language.Haskell.THSyntax
pow :: ExpQ -> Int -> ExpQ
pow x 0 = [| const 1 |]
pow x n | n>0 = [| $x * $(pow x (n-1)) |]
----------------------------------------------------------------------------------
module Main where
import Power (pow)
main = let x = 2 :: Double
in putStrLn (show ($(pow [|x|] 5)))
----------------------------------------------------------------------------------
Good luck
--
Dr. Christoph Herrmann
Teaching and Research Assistant
University of Passau, Germany
http://www.fmi.uni-passau.de/~herrmann
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs