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

GHC ghc-devs at haskell.org
Tue Mar 8 00:44:02 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:                    |
-------------------------------------+-------------------------------------

Comment (by inaki):

 Replying to [comment:9 adamgundry]:
 > I played around with your example a bit and came up with the following
 construction, which isn't the most beautiful but works in GHC 8.0 (so in
 particular, I've lowercased the label names):
 Clever :)

 Replying to [comment:10 simonpj]:
 > There are two things going on here
 >
 > * Allowing uppper-case names for overloaded labels.  This sounds
 plausible to me, although I have not thought through the consequences.
 >
 > * Some form of overloading for pattern matching, building on pattern
 synonyms.  Certainly sounds interesting, but should really have its own
 ticket and wiki page.
 Indeed! I thought it may be an straightforward feature request, but now I
 am not sure. Honestly, the realization that they cannot be
 (straightforwardly) pattern matched against removes quite a bit of my
 original motivation (detailed in comment:2) for asking this. So the fact
 that they are not really patterns may make it a good thing that they
 cannot start by uppercase, so one is not tempted to match against them.

 In any case I can certainly file a new ticket with the feature request for
 "OverloadedPatterns", if you think that's useful.

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


More information about the ghc-tickets mailing list