#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
----------------------------------------+-----------------------------------

Comment(by NeilMitchell):

 A simpler example from bug 4411 (which I'm going to close as a dupe of
 this):

 {{{
 {-# 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4404#comment:1>
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

Reply via email to