Thanks for the reference, but GHC already invokes the CPP.
I think I am going to have to invoke a load of the module with ghc flags
set to keep the output of the CPP phase, and then re-invoke it on that
output to get the tokens.
My question is more whether this CPP output can be kept in the GHC
you need to run a preprocessor on it to remove the directives
On Tue, Sep 10, 2013 at 4:03 PM, AlanKim Zimmerman alan.z...@gmail.comwrote:
Hi Cafe
I have just discovered that GHC.getTokenStream fails if it is used on a
module with CPP directives in it.
This is reported in
On Tue, 10 Sep 2013 22:03:16 +0200, AlanKim Zimmerman
alan.z...@gmail.com wrote:
Is there an easy way to get access to the pre-processed source, without
having to explicitly write it to an output file in a temporary location?
You can run cpp with function readProcess, as done in function
On Wed, 11 Sep 2013 00:54:07 +0200, Henk-Jan van Tuyl hjgt...@chello.nl
wrote:
Another option could be the cpphs package; the documentation has
disappeared from haskell.org, but can be found in the Web Archive[0].
I just found the latest documentation at
http://code.haskell.org/cpphs/docs/
Hi Cafe
I have just discovered that GHC.getTokenStream fails if it is used on a
module with CPP directives in it.
This is reported in http://ghc.haskell.org/trac/ghc/ticket/8265
Is there an easy way to get access to the pre-processed source, without
having to explicitly write it to an output