
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. My problem is that the generated file starts like this (the first pragma is generated by Happy): {-# OPTIONS -fglasgow-exts -cpp #-} -- parser produced by Happy Version 1.13 {-# OPTIONS -fno-warn-unused-matches #-} This means that GHC will only see the first one. Is there a way to make Happy put the pragma above the comment, or not produce the comment at all? Or is there a way to make GHC recognise the pragma even though it is after a comment? Regards, Martin -- Martin Norbäck d95mback@dtek.chalmers.se Kapplandsgatan 40 +46 (0)708 26 33 60 S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/ SWEDEN OpenPGP ID: 3FA8580B

Martin Norbäck
{-# OPTIONS -fglasgow-exts -cpp #-} -- parser produced by Happy Version 1.13 {-# OPTIONS -fno-warn-unused-matches #-}
Generally, it'd be nice to be able to occasionally suppress warnings for sections of code (with better than module granularity), where you know the code is safe. Any chance of something like that? -kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (2)
-
ketil@ii.uib.no
-
Martin Norbäck