Ticket #2213 (closed bug: fixed)
Confusing flags for rewrite rules
| Reported by: | dons | Owned by: | dons |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.10 branch |
| Component: | Compiler | Version: | 6.8.2 |
| Keywords: | rules, warnings | Cc: | claus, pho@… |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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'
Change History
Note: See
TracTickets for help on using
tickets.
