[Haskell-cafe] Current status of Mavericks CPP

malcolm.wallace malcolm.wallace at me.com
Wed Apr 16 14:42:14 UTC 2014

My experience with receiving bug reports for cpphs is certainly that Haskell people use every imaginable feature of cpp.  Initially, cpphs supported only conditional compilation.  But then some macros started to appear, so I made that a separate pass.  And then the conditional compilation started to depend on the values of the macros, so I had to fold the passes together somehow.  And so on.  I can confirm that token splicing is definitely used by someone, because I received the feature request.

On 16 Apr, 2014,at 03:00 PM, Brandon Allbery <allbery.b at gmail.com> wrote:

On Wed, Apr 16, 2014 at 7:24 AM, Sven Panne <svenpanne at gmail.com> wrote:
My point is: Do we really know that conditional compilation is *the*
use case? I remember that in ancient days macros were used to generate
instances etc. Make things as simple as possible, but not simpler.

It's the most common one but pretty sure it's not the only one --- and, supporting conditional compilation may involve only a tiny subset of cpp in the user's code, but a fair bit more in terms of what cabal-install has to generate for those triplet macros to exist for user code to use. There are ANSI features we don't need (assertions, token splicing) but everything else probably gets used one way or another.

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
Haskell-Cafe mailing list
Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140416/24f1f3d8/attachment.html>

More information about the Haskell-Cafe mailing list