[GHC] #2213: -Wall incorrectly warns "Defined but not used" for
functions exported via RULES
GHC
trac at galois.com
Fri Apr 11 10:38:36 EDT 2008
#2213: -Wall incorrectly warns "Defined but not used" for functions exported via
RULES
------------------------+---------------------------------------------------
Reporter: dons | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.8.2 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
------------------------+---------------------------------------------------
Functions exported via rewrite rules are incorrectly flagged as "defined
but not used" when
-Wall is enabled:
{{{
module M ({- rules -}) where
eq :: Eq a => a -> a -> Bool
eq = (==)
{-# RULES
"rule 1" forall x. x == y = y `eq` x
#-}
}}}
Will emit a bogus:
{{{
M.hs:4:0: Warning: Defined but not used: `eq'
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2213>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list