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

 {{{
 data Foo = Bar { frob :: Int }
          | Baz { frob :: Int, quux :: Bool }
 }}}

 It would be great if GHC could produce a warning if I use {{{quux}}} as a
 function somewhere in my code, as calling {{{quux}}} on a {{{Foo}}}
 constructed with {{{Bar}}} will cause a runtime error. On the other hand,
 every use of {{{frob}}} is OK.

 Currently, to find such problems, I have to first figure out which field
 labels are incomplete and then search for those, ignoring their uses as a
 proper field label (in construction or pattern matching).

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