Ticket #4404 (closed bug: fixed)
RecordWildCards
| Reported by: | igloo | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.4.1 |
| Component: | Compiler (Type checker) | Version: | 6.12.3 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | T4404 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
With this module:
{-# LANGUAGE RecordWildCards #-}
module TT where
data T = T {t1, t2 :: Int}
f :: T -> Int
f d = x
where T {t1 = x, ..} = d
g :: T -> Int
g (T {t1 = x, ..}) = x
f gives warnings about t2 being unused:
$ ghc -Wall -c n.hs n.hs:9:11: Warning: Defined but not used: `t2'
which is probably not what we want for variables bound by a wildcard. Reported by Serge here: http://www.haskell.org/pipermail/glasgow-haskell-bugs/2010-October/025858.html
Change History
Note: See
TracTickets for help on using
tickets.
