Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,252
    • Issues 5,252
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 577
    • Merge requests 577
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3959
Closed
Open
Issue created Apr 05, 2010 by richardg@richardg.name@trac-richardg

indenting change causes internal error

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.

Trac metadata
Trac field Value
Version 6.12.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking