cpp

Alastair Reid reid at cs.utah.edu
Thu Feb 22 13:41:20 EST 2001


While on the subject of preprocessors, I thought I'd mention a need I've found
in distributing tools like Knit where the intended audience isn't expected to:

1) Care either way about it being implemented in Haskell

2) Have any desire to spend half a day installing lots of Haskell-related tools
   (greencard, c2hs, happy, etc.) on their machine before they can try out my
tool.
   Getting them to install a GHC binary is about the limit of what I can
reasonably
   expect.

In this case, it is very useful to be able to distribute the output of all
those useful support tools (greencard, c2hs, happy, etc.).

But now the problem: if I achieve portability by running the input to these
tools through cpp (or any other tool providing conditional compilation), then I
end up with 2^N different files to distribute and complicated instructions for
building the system.

What would (perhaps) be nice is for the support tools to implement conditional
compilation themselves and for the output file to use conditional compilation
too.


Alastair

ps Or maybe I should just hack up a perl script that runs greencard and friends
2^N times and then packs the results (using diff, etc as appropriate) into a
convenient file for shipping to users.





More information about the FFI mailing list