|
Bad eta expand: msg#00011lang.haskell.glasgow.bugs
Hey all. >From a larger program I pruned down the following code which generates this error message: $ ghc-6.0 -O -package unix bug.hs Bad eta expand __coerce (# GHCziPrim.Statezh {- tc 32q -} GHCziPrim.RealWorld {- tc 31E -}, a {- tv a29a -} #) zdwzdj {- v s2dV -} (# GHCziPrim.Statezh {- tc 32q -} GHCziPrim.RealWorld {- tc 31E -}, a {- tv a29a -} #) I managed to get the same error on Linux and OpenBSD, with 6.0 and 6.0.1 The error disappears if you use -Onot, understandably. The program compiles, nonetheless, but in my original program it would then exhibit strange behaviour: it wouldn't execute calls to system(). This smaller program seems to run fine, though. Here's the smallest program that would reproduce the error: ------------------------------------------------------------------------ -- compile with: -- ghc -O -package unix bug.hs import System.Exit (ExitCode(..),exitWith) import System.Posix (getEnv) import System.Console.GetOpt main = do a <- return ["f"] b <- p a () <- case b of "" -> f _ -> g b exitWith ExitSuccess f = getEnv "" >> return () g a = return $ if a == "" then () else () p a = case (getOpt Permute [] a) of (_,n,_) -> return $ if length n == 1 then head n else "" ------------------------------------------------------------------------ Cheers, Don
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ghc 6.0.1 and Mac OS X 10.2.6 build, Gregory Wright |
|---|---|
| Next by Date: | non-intuitive error message in ghci, Hal Daume |
| Previous by Thread: | ghc 6.0.1 and Mac OS X 10.2.6 build, Gregory Wright |
| Next by Thread: | non-intuitive error message in ghci, Hal Daume |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |