Request: suppress specific warnings at specific places

Mike Gunter m@ryangunter.com
Wed, 20 Nov 2002 09:09:20 -0800


GHC's excellent warnings are very helpful.  They would be somewhat
more so if it were possible to suppress a warning about a specific bit
of code.  One possible syntax (to which I gave no commitment) would be

  {-# WOFF "non-exhaustive pattern matches" #-}
  <offending code>
  {-# WON "non-exhaustive pattern matches" #-}

.  Another would be

  {-# WOFF 523 #-}
  <offending code>
  {-# WON 523 #-}

where 523 is a warning number emitted with the warning message.

This would be particularly useful with the recently granted wish for
-Werror.

    mike