Ticket #3959 (closed bug: fixed)
indenting change causes internal error
| Reported by: | RichardG | Owned by: | simonpj |
|---|---|---|---|
| Priority: | low | Milestone: | 7.0.1 |
| Component: | Compiler | Version: | 6.12.1 |
| Keywords: | Cc: | ||
| Operating System: | MacOS X | Architecture: | x86 |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | simplCore/should_run/T3959 | Blocked By: | |
| Blocking: | #3961, #3983 | Related Tickets: |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

