#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
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to