happy, ghc and {# OPTIONS #} pragma

Simon Marlow simonmar@microsoft.com
Mon, 9 Jun 2003 12:13:50 +0100


=20
> I am trying to get an {-# OPTIONS #-} pragma to appear in my Happy
> generated file, since I use warnings and want to disable them for this
> file. I'm putting the pragma first in the module header section of my
> Happy file.
>=20
> My problem is that the generated file starts like this (the=20
> first pragma
> is generated by Happy):
>=20
> {-# OPTIONS -fglasgow-exts -cpp #-}
> -- parser produced by Happy Version 1.13
> {-# OPTIONS -fno-warn-unused-matches #-}
>=20
> This means that GHC will only see the first one. Is there a=20
> way to make
> Happy put the pragma above the comment, or not produce the comment at
> all?

This bug was fixed by Sigbjorn Finne post-1.13.  Compile up a copy of =
Happy from CVS to get the fix.

Cheers,
	Simon