<div dir="ltr">you need to run a preprocessor on it to remove the directives</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 10, 2013 at 4:03 PM, AlanKim Zimmerman <span dir="ltr">&lt;<a href="mailto:alan.zimm@gmail.com" target="_blank">alan.zimm@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">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>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>