RFC: "Native -XCPP" Proposal

Jan Stolarek jan.stolarek at p.lodz.pl
Wed May 6 11:38:16 UTC 2015

One thing to keep in mind is that while cpphs will solve some problems of system-cpp, it will also 
bring problems of its own. I, for one, have run into problems with it when installing Agda. There 
is a very long thread here:


and twice as more on my private inbox. We've reached no conclusion about the cause and the only 
solution was to use system-cpp.

Regarding licensing issues: perhaps we should simply ask Malcolm Wallace if he would consider 
changing the license for the sake of GHC? Or perhaps he could grant a custom-tailored license to 
the GHC project? After all, the project page [1] says: " If that's a problem for you, contact me 
to make other arrangements."


[1] http://projects.haskell.org/cpphs/

Dnia środa, 6 maja 2015, Herbert Valerio Riedel napisał:
> Hello *,
> As you may be aware, GHC's `{-# LANGUAGE CPP #-}` language extension
> currently relies on the system's C-compiler bundled `cpp` program to
> provide a "traditional mode" c-preprocessor.
> This has caused several problems in the past, since parsing Haskell code
> with a preprocessor mode designed for use with C's tokenizer has caused
> already quite some problems[1] in the past. I'd like to see GHC 7.12
> adopt an implemntation of `-XCPP` that does not rely on the shaky
> system-`cpp` foundation. To this end I've created a wiki page
>   https://ghc.haskell.org/trac/ghc/wiki/Proposal/NativeCpp
> to describe the actual problems in more detail, and a couple of possible
> ways forward. Ideally, we'd simply integrate `cpphs` into GHC
> (i.e. "plan 2"). However, due to `cpp`s non-BSD3 license this should be
> discussed and debated since affects the overall-license of the GHC
> code-base, which may or may not be a problem to GHC's user-base (and
> that's what I hope this discussion will help to find out).
> So please go ahead and read the Wiki page... and then speak your mind!
> Thanks,
>   HVR
> [1]: ...does anybody remember the issues Haskell packages (& GHC)
>      encountered when Apple switched to the Clang tool-chain, thereby
>      causing code using `-XCPP` to suddenly break due to subtly
>      different `cpp`-semantics?
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

Politechnika Łódzka
Lodz University of Technology

Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata.
Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez pomyłkę
prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie.

This email contains information intended solely for the use of the individual to whom it is addressed.
If you are not the intended recipient or if you have received this message in error,
please notify the sender and delete it from your system.

More information about the ghc-devs mailing list