[GHC] #11671: Allow labels starting with uppercase with OverloadedLabels

GHC ghc-devs at haskell.org
Fri Mar 4 09:20:41 UTC 2016


#11671: Allow labels starting with uppercase with OverloadedLabels
-------------------------------------+-------------------------------------
        Reporter:  inaki             |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1-rc1
  (Parser)                           |
      Resolution:                    |             Keywords:  ORF
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by adamgundry):

 * cc: adamgundry (added)
 * keywords:   => ORF
 * component:  Compiler => Compiler (Parser)


Comment:

 This is simply because overloaded labels are lexed similarly to variables
 after the initial `#`. I don't think there is a fundamental reason we
 couldn't permit uppercase letters here, it would just require a bit of
 lexer hacking.

 That said, the original motivation for overloaded labels came from record
 fields, where the initial letter must be lowercase. So I'm two minds as to
 whether this is worthwhile or not.

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


More information about the ghc-tickets mailing list