|
that’s strange. It’s working with today’s build, but I don’t think I fixed anything in the last couple of days. Could you get an up-to-date build?
-----Original Message-----
If tried to compile the Print.hs file below (based on the yesterday's mailing list discussion around the th printf example). I get the following error message (5.05, MAIN line, Nov 26th build), but I'm not sure if I did something really silly or if there's a genuine bug in the compiler. Can you pls have quick look at the Print.hs source below and see if you can spot the reason for the ghc crash?
Thanks, - Reto
bash-2.05a$ lghc -fglasgow-exts -package haskell-src -i./src:./ext/HUnit-1.0 -odir./bin -hidir./bin -tmpdir./tmp -Wall -c ./src/Print.hs ghc-5.05: panic! (the `impossible' happened, GHC version 5.05): rename/RnExpr.lhs:164: Non-exhaustive patterns in function rnExpr
Please report it as a compiler bug to [EMAIL PROTECTED], or http://sourceforge.net/projects/ghc/.
module Print(pr) where
import Language.Haskell.THSyntax
data Format = D | S | L String
parse :: String -> [Format] parse s = [ L s ]
gen :: [Format] -> Expr gen [D] = [| \n -> show n |] gen [S] = [| \s -> s |] gen [L s] = string s
pr :: String -> Expr pr s = gen (parse s) |
- TH bug? Reto Kramer
- Simon Peyton-Jones
