[GHC] #11706: Increase precedence of lexps (if-then-else, case-of, do, lambda and let-in)

GHC ghc-devs at haskell.org
Mon Mar 14 14:57:09 UTC 2016


#11706: Increase precedence of lexps (if-then-else, case-of, do, lambda and let-in)
-------------------------------------+-------------------------------------
        Reporter:  YoYoYonnY         |                Owner:
            Type:  feature request   |               Status:  infoneeded
        Priority:  lowest            |            Milestone:  ⊥
       Component:  Compiler          |              Version:
  (Parser)                           |
      Resolution:                    |             Keywords:
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 YoYoYonnY):

 Thanks for linking that ticket, I skimmed over the list of feature
 requests, but could not find any other requests asking for increased
 {{{lexp}}} precedence or similair. I suppose I underestimated the priority
 of this feature request.


 The typos in the ticket should now be fixed. The ticket is also
 simplified, the old code examples have been moved to Pastebin
 [http://pastebin.com/6kLQvKs9 here] (As a permament paste) for
 readability, and the cheesy intro has been moved to a separate Pastebin
 too, [http://pastebin.com/8Fsh7pAE here], to save a few clicks. I'll work
 on making more clean and general examples.


 I have to say that I agree; the proposal is mostly useless, one or two
 characters saved won't make a big difference. However, with other similair
 pragmas already implemented (UnicodeSyntax, RecordWildCards and
 TupleSections to name a few) I think it is reasonable to implement this
 feature somewhere in the future, be it with low priority.
 I think it is fair to refer to {{{if-then-else}}}, {{{case-of}}},
 {{{do}}}, {{{lambda}}} and {{{let-in}}} as {{{lexp}}}, following
 https://www.haskell.org/onlinereport/haskell2010/haskellch10.html#x17-17800010.3|layout,
 unless of course someone can think of a better term.
 The set of {{{lexp}}}s could of course also easily be extended with
 {{{lambda-case}}} and {{{mdo}}} (If this is not already the case).


 I have added {{{lambda}}} and {{{let-in}}} to the title, as these are part
 of the proposal. I've also added {{{lambda}}} to the examples, aswell as
 {{{lambda-case}}}, {{{mdo}}} and infix ones.


 I will leave the creation of a Wiki up to someone with more experience
 with the GHC Parser, although I might look into it myself sometime soon.
 As to if this ticket is diferentiatable from
 [https://ghc.haskell.org/trac/ghc/ticket/10843 #10843], I would say yes,
 this ticket is more general, however I would strongly recommend merging
 this ticket with [https://ghc.haskell.org/trac/ghc/ticket/10843 #10843],
 if that is in any way possible.

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


More information about the ghc-tickets mailing list