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

Donn Cave donn at avvanta.com
Fri May 8 23:40:28 UTC 2015


Quoth wren romano <winterkoninkje at gmail.com>,
...
> Incidentally, if we really want to pursue the "get rid of CPP by
> building it into the GHC distro"...
>
> In recent years there've been a number of papers on "variational
> lambda-calculi"[1] which essentially serve to embed flag-based
> preprocessor conditionals directly into the language itself. One major
> benefit of this approach is that the compiler can then typecheck *all*
> variations of the code, rather than only checking whichever particular
> variation we happen to be compiling at the time. This is extremely
> useful for avoiding bitrot in the preprocessor conditionals.

But fatal if compilation is conditional on something that affects the
ability to type check, am I right?  Such as different compilers or
versions of same compiler.

	Donn


More information about the Haskell-Cafe mailing list