Re: [Haskell-cafe] RFC: "Native -XCPP" Proposal

At the risk of antagonizing some (most? all?) of you, how about... -XCPP stands for the native CPP -XGNUCPP stands for GNU's GCC CPP -XClangCPP stands for Clang's CPP -XCPPHS stands for CPPHS ... with the hope that TH is the future? Howard

On 2015-05-06 at 18:53:08 +0200, Howard B. Golden wrote:
At the risk of antagonizing some (most? all?) of you, how about...
-XCPP stands for the native CPP -XGNUCPP stands for GNU's GCC CPP -XClangCPP stands for Clang's CPP -XCPPHS stands for CPPHS
Assuming this was a serious suggestion, the benefit is that you could clearly mark what CPP you want to develop against, but OTOH, we'd lose backward compat w/ Haskell compilers only knowing about the old -XCPP but not the other new variants of the language-pragma. Moreover, there can now be packages that require clang-cpp, while others require gcc-cpp, and I don't think it can be assumed that both are available on every GHC installation. So it could cause packages to fail compiling simply because the respective CPP-flavor is missing. On the bright side, this would maybe give us the opportunity to coin the new term "CPP Hell" =) Cheers, hvr

This is *so* reminiscent of why fpp exists. (http://www.netlib.org/fortran/fdfpp.tgz) People used to use cpp with Fortran, but it really didn't fit Fortran lexical structure very well, and cpps were different. So... I think it's important that there be *one* "cpp" used by Haskell. fpp is under 4 kSLOC of C, and surely Haskell can do a lot better.

On 8 May 2015, at 00:06, Richard A. O'Keefe wrote:
I think it's important that there be *one* "cpp" used by Haskell. fpp is under 4 kSLOC of C, and surely Haskell can do a lot better.
FWIW, cpphs is about 1600 LoC today. Regards, Malcolm
participants (4)
-
Herbert Valerio Riedel
-
Howard B. Golden
-
Malcolm Wallace
-
Richard A. O'Keefe