state of the cabal (preprocessors)

Keith Wansbrough Keith.Wansbrough at
Mon Nov 1 05:39:54 EST 2004

> On 26 October 2004 18:00, Henrik Nilsson wrote:
> > However, at least superficially, it would seem simpler (and more
> > flexible, since normal comments would not interfere) to simply
> > require that all OPTIONS/LANGUAGE pragmas must occur before the
> > keyword "module".
> > 
> > But maybe that is hard to implement, or undesirable for some other
> > reason?
> Well, it's more tricky because you have to ignore comments, and
> therefore understand nested comments, but that's not too hard.  A little
> Alex or parsec parser should do the trick, being careful not to read the
> entire file.

Careful - not all Haskell modules contain the keyword "module".
Perhaps the scan should be up to the first non-comment, non-blank

--KW 8-)

More information about the Libraries mailing list