logo       

ghc-6.0 compiler bug: msg#00030

lang.haskell.glasgow.bugs

Subject: ghc-6.0 compiler bug

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 glasgow-haskell-bugs@xxxxxxxxxxx,
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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise