Confusing flags for rewrite rules
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'
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | rules, warnings |
| Operating system | Unknown |
| Architecture | Unknown |
Edited by Simon Peyton Jones