[Haskell-cafe] Disabling warning over ranges of source lines

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Mon Feb 20 05:11:29 CET 2012


On 20 February 2012 15:06, Thomas DuBuisson <thomas.dubuisson at gmail.com> wrote:
> Using GHC, is there any way to disable warnings (entirely or
> selectively) during a section of source code?  I ask because of some
> Template Haskell that periodically generates unused code and I'd
> rather not see the warnings or rework the macros (beyond emitting some
> sort of "disable" and "re-enable" pragma which probably isn't in the
> AST now that I think about it).

You can do something like:

{-# OPTIONS_GHC -fno-warn-orphans #-}

At the top of specified modules.  However, I'm not sure if there's a
specific flag to disable *all* warnings.

>
> Cheers,
> Thomas
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com



More information about the Haskell-Cafe mailing list