<div dir="ltr"><div><div><div><div><div>Hi Cafe<br><br></div>I have just discovered that GHC.getTokenStream fails if it is used on a module with CPP directives in it.<br><br></div><div>This is reported in <a href="http://ghc.haskell.org/trac/ghc/ticket/8265">http://ghc.haskell.org/trac/ghc/ticket/8265</a><br>

<br></div>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?<br><br></div>In other words an equivalent to getModuleSourceAndFlags that does the right thing.<br>

<br></div><div>This currently prevents HaRe from processing files with preprocessor directives in them, I would like to come up with a workaround for current GHC versions, rather than having to wait for a future one.<br>
<br>
</div>Regards<br></div>  Alan<br></div>