ghc-6.0 compiler bug
Simon Peyton-Jones
simonpj at microsoft.com
Fri Jun 6 09:52:23 EDT 2003
Yes, this is a known bug, but thank you for reporting it anyway. I'm
going to fix it as part of my next sweep though.
I enclose a message that gives a workaround.
Simon
| -----Original Message-----
| From: glasgow-haskell-bugs-admin at haskell.org
[mailto:glasgow-haskell-bugs-admin at haskell.org] On
| Behalf Of Ch. A. Herrmann
| Sent: 05 June 2003 14:28
| To: glasgow-haskell-bugs at haskell.org
| 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 at haskell.org,
| 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
| Glasgow-haskell-bugs at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
-------------- next part --------------
An embedded message was scrubbed...
From: "Simon Peyton-Jones" <simonpj at microsoft.com>
Subject: [Template-haskell] RE: ghc-5.05 / template haskell bug
Date: Tue, 8 Apr 2003 17:33:10 +0100
Size: 3725
Url: http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20030606/f3b5faf7/attachment.eml
More information about the Glasgow-haskell-bugs
mailing list