Re: C preprocessor + WinHugs

Malcolm Wallace <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.hugs
Organization Dept of Computer Science, University of York
Message-ID <20051031090258.6f394984.Malcolm.Wallace__4265.94500099799$1130749453$gmane$org@cs.york.ac.uk>
Neil Mitchell <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.