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

GHC ghc-devs at haskell.org
Thu Jun 22 02:25:47 UTC 2017


#7169: Warning for incomplete record field label used as function
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.7
      Resolution:                    |             Keywords:  Warnings,
                                     |  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nakaji_dayo):

 RyanGlScott: Thanks for reply and design.\\
 I have additional questions.

 > Introduce a flag for this purpose (proposal: -Wpartial-records)
 `-Wpartial-records` may be unnecessary, Because I think It is same meaning
 to `-Wincomplete-patterns`.

 > One can disable this warning by prefixing the partial record selector
 with an underscore (e.g., data A = B1 { b :: Int } | B2 { b :: Int, _wat
 :: Char }).

 It seems useful. But, I do not know if it should affect coding style.\\
 Is there any existing design that control warnings by function (or
 variable) name?

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


More information about the ghc-tickets mailing list