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

Herbert Valerio Riedel hvriedel at gmail.com
Fri May 8 09:02:09 UTC 2015


Hello Christian,

(I've re-CC'ed haskell-cafe, assuming this wasn't deliberate)

On 2015-05-08 at 09:50:46 +0200, Christian Maeder wrote:
> using cpphs is the right way to go!
>
> Rewriting it from scratch may be a good exercise but is (essentially) a
> waste of time.
>
> However, always asking Malcolm to get source changes into cpphs would
> be annoying.
>
> Therefore it would be great if the sources were just part of the ghc
> sources (under git).
>
> Another "problem" might be the dependency "polyparse" that is currently
> not part of the core libraries.

A scheme was actually discussed privately to address this:

We certainly don't want to expose cpphs/polyparse (and text!) as new
packages in GHC's global pkg-db. Which we'd end up, if we handled cpphs
as the other exposed boot libraries.

Therefore we'd only use the few relevant modules from cpphs/polyparse as
"other-modules" (i.e. internal hidden dependencies -- i.e. we wouldn't
use cpphs/polyparse's .cabal files) compiled into GHC, but not
exposed. We'd either create a new Git submodule to hold our "fork" of
cpphs/polyparse, or just add it somewhere inside ghc.git

> (I guess that replacing polyparse by something else would also be a nice
> exercise.)
>
> So (for me) the only question is, if Malcolm is willing to transfer
> control over cpphs to the haskell-community (or ghc head) - of course
> with due acknowledgements!

I don't think this will be necessary, as we don't need the
cpphs-upstream to mirror each modifications immediately. The benefit of
the scheme described above is that we'd be somewhat decoupled from cpphs'
upstream, and can freely experiment in our "fork", and can sync up with
Malcolm from time to time to merge improvements in both directions.

-- hvr


More information about the Libraries mailing list