Re: GHC API initialisation

2012-06-08 Thread Simon Marlow
On 08/06/2012 12:22, "Philip K. F. Hölzenspies" wrote: On 8 Jun 2012, at 11:10, Simon Marlow wrote: I don't think so. To avoid confusion, can you describe exactly what you did? I copy-n-pasted a GHCi session below. This is the smallest reproduction I could come up with. As you would expect, th

Re: GHC API initialisation

2012-06-08 Thread Simon Marlow
On 08/06/2012 11:02, Philip Holzenspies wrote: On 7 Jun 2012, at 10:51, Simon Marlow wrote: I could make the panic go away by initialising with an empty package state. But I'm not sure I understand how you ran into this problem: the panic is embedded inside defaultDynFlags, so if you're just

Re: GHC API initialisation

2012-06-08 Thread Philip Holzenspies
On 7 Jun 2012, at 10:51, Simon Marlow wrote: > I could make the panic go away by initialising with an empty package state. > But I'm not sure I understand how you ran into this problem: the panic is > embedded inside defaultDynFlags, so if you're just using GHC API functions > outside the monad

Re: GHC API initialisation

2012-06-07 Thread Simon Marlow
On 05/06/2012 11:36, "Philip K. F. Hölzenspies" wrote: Dear GHC-ers, Is there a reason why GHC panics with ghc: panic! (the 'impossible' happened) (GHC version 7.4.1 for x86_64-apple-darwin): no package state yet: call GHC.setSessionDynFlags when I call functions that are not i

GHC API initialisation

2012-06-05 Thread Philip K. F. Hölzenspies
Dear GHC-ers, Is there a reason why GHC panics with ghc: panic! (the 'impossible' happened) (GHC version 7.4.1 for x86_64-apple-darwin): no package state yet: call GHC.setSessionDynFlags when I call functions that are not in a GhcMonad (viz. newHscEnv, parser, etc.)? I feel a bit si