#4411: Incorrect defined but not used warning with record wildcards
---------------------------------+------------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Incorrect warning at
compile-time
---------------------------------+------------------------------------------
{{{
{-# LANGUAGE RecordWildCards #-}
module Test where
data T = MkT { f,g :: Int }
p1 x = let MkT{..} = x in f
p2 MkT{..} = f
}}}
With GHC 6.12.3 this gives the warning:
{{{
Test.hs:7:11: Warning: Defined but not used: `g'
}}}
i.e. {{{p1}}} gives a warning, but {{{p2}}} doesn't. Neither is meant to
give a warning.
-- Neil
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4411>
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