[Haskell-cafe] GHC API question: Getting access to cpp processed source

Henk-Jan van Tuyl hjgtuyl at chello.nl
Wed Sep 11 00:54:07 CEST 2013

On Tue, 10 Sep 2013 22:03:16 +0200, AlanKim Zimmerman  
<alan.zimm at 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  
readHeaderFile in

Windows does not come with cpp; one can install MinGW for this purpose.

Another option could be the cpphs package; the documentation has  
disappeared from haskell.org, but can be found in the Web Archive[0].

Henk-Jan van Tuyl

[0] http://web.archive.org/web/20100620174616/http://haskell.org/cpphs/

Folding at home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.

Haskell programming

More information about the Haskell-Cafe mailing list