C preprocessor + WinHugs

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon Oct 31 04:02:58 EST 2005


Neil Mitchell <ndmitchell at gmail.com> writes:

> > None are terribly attractive (and they would only be for cpp).
> >
> I agree. Is there no other way to stop the preprocessor running on all
> files, and restricting it to just those which are needed?

There was talk at one stage of a standard language-extensions pragma,
corresponding to your third option.
    {-# LANGUAGE cpp MPTC fundeps #-}
I think SimonM has just implemented it for ghc, the rest of us are
lagging behind.

FWIW, hmake uses both of your first two suggestions - detect a # in the
first column, and also permit a filename extension to trigger cpp.  The
latter doesn't seem too awful, since other preprocessors use the same
method (Happy .y, Alex .x, hsc2hs .hsc, etc).

Regards,
    Malcolm


More information about the Cvs-hugs mailing list