Skip to content

GHC API load panic

The attached program APILoad.hs, which works with ghc-6.6, panics on the HEAD when trying to load a module using the GHC API. Adding a call to parseStaticFlags prevents the panic, but it doesn't seem like that should be necessary when using the API.

~: ghc-6.7.20070215 --make APILoad.hs -package ghc
[1 of 1] Compiling Main             ( APILoad.hs, APILoad.o )
Linking APILoad ...
~/tmp/unsplice: ./APILoad Foo.hs 
Loading...
APILoad: panic! (the 'impossible' happened)
  (GHC version 6.7.20070215 for powerpc-apple-darwin):
        a static opt was looked at too early!

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Foo.hs:

module Foo where

foo = 4
Trac metadata
Trac field Value
Version 6.7
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHC API
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