RecordWildCards
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
Trac metadata
Trac field | Value |
---|---|
Version | 6.12.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |