[GHC] #7169: Warning for incomplete record field label used as function

GHC cvs-ghc at haskell.org
Mon Aug 20 18:02:30 CEST 2012


#7169: Warning for incomplete record field label used as function
---------------------------------+------------------------------------------
    Reporter:  goldfire          |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.7             
    Keywords:  Warnings          |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by igloo):

 We do warn when you define
 {{{
 head (x : _) = x
 }}}
 though. It would be nice if we also warned about
 {{{
 data Foo = Bar { frob :: Int }
          | Baz { frob :: Int, quux :: Bool }
 }}}
 but unfortunately
 {{{
 data Foo = Bar { frob :: Int }
          | Baz { frob :: Int, _ :: Bool }
 }}}
 is currently a parse error. Perhaps it shouldn't be?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7169#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list