I'm building a lexer and parser with Alex and Happy. The code they generate throws a huge number of warnings with ghc-options: -Wall
turned on in my project's .cabal file.
This makes it difficult to catch real warnings. How can I turn off the warnings only inside the generated files? I know it can be done with a pragma:
{#- GHC_OPTIONS -w -#}
But I can't think of an easy way to stick this pragma at the top of every generated file, every time they're rebuilt.
What's the right way to do this?