#4404: RecordWildCards
----------------------------------------+-----------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.2.1
Component: Compiler (Type checker) | Version: 6.12.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
----------------------------------------+-----------------------------------
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
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4404>
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