#3959: indenting change causes internal error
-------------------------+--------------------------------------------------
Reporter: RichardG | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.1 | Keywords:
Os: MacOS X | Testcase:
Architecture: x86 | Failure: None/Unknown
-------------------------+--------------------------------------------------
I found a bizarre little bug in GHC 6.12.1 on Mac OS X 10.6 (Haskell
Platform 2010.1.0.0 i386). It only occurs when compiling through Cabal;
it does not occur when using {{{ghc --make}}} or {{{ghci}}}.
The following code will compile without error but will generate a runtime
error:
{{{
test = do
E.throw Failure
(return "No exception" :: IO String)
`E.catches`
[E.Handler (\Failure -> return "Exception")]
}}}
The following code will compile and run correctly:
{{{
test = do
E.throw Failure
(return "No exception" :: IO String)
`E.catches`
[E.Handler (\Failure -> return "Exception")]
}}}
The only difference between the 2 is that the second has one less leading
space.
The generated error is:
{{{
test1: internal error: PAP object entered!
(GHC version 6.12.1 for i386_apple_darwin)
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
Abort trap
}}}
Deleting my {{{~/.ghc}}} folder had no effect.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3959>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs