Hi Max,
I tried adding "extensionFlags = Opt_Cpp" to dflags, but I still got the same
error.
When you mentioned
"You might have to iterate a few times to find the correct set of flags.",
did you mean trying out all the "data ExtensionFlag" flags in
compiler/main/DynFlags.hs and find a subset that works?
data ExtensionFlag
= Opt_Cpp
| Opt_OverlappingInstances
| Opt_UndecidableInstances
| Opt_IncoherentInstances
...
Thanks
Jane
________________________________________
From: [email protected] [[email protected]] On Behalf Of Max
Bolingbroke [[email protected]]
Sent: Tuesday, January 25, 2011 1:34 AM
To: Jane Ren
Cc: Simon Peyton-Jones; [email protected]
Subject: Re: Question about Haskell AST
On 24 January 2011 17:20, Jane Ren <[email protected]> wrote:
> When I try this, I get
> "AstWalker: panic! (the 'impossible' happened)
> (GHC version 7.0.1 for x86_64-apple-darwin):
> lexical error at character 'i'
It looks like you need to add the CPP extension to the DynFlags:
setSessionDynFlags dflags { extensionFlags = Opt_Cpp : extensionFlags dflags }
You might have to iterate a few times to find the correct set of flags.
Cheers,
Max
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users