Use of cpp

Adrian Hey ahey at
Wed Jul 14 08:34:53 EDT 2004

On Tuesday 13 Jul 2004 2:37 pm, Alastair Reid wrote:
> cpphs aims to be compatible with cpp up to the point where cpp starts doing
> C-specific things like string splicing, interpreting ' as the start of a
> character (and whining if the "character" doesn't end), etc.  So if your
> code works with cpp, it ought to work with cpphs.  In particular, code like
> the following should work fine.
> #if GHC
> #define FastInt Int#
> #define plusInt(x,y) ((x)+#(y))
> #else
> #define FastInt Int
> #define plusInt(x,y) ((x)+(y))
> #endif
> [In practice, I'd leave plusInt curried - I just needed an example of a
> macro with arguments.]

Thanks, looks like cpphs is the way to go. I'll give it a try.

Adrian Hey

More information about the Libraries mailing list