Incorrect defined but not used warning with record wildcards
{-# 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
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |