[GHC] #14812: Dot-Notation for Flipped Function Application

GHC ghc-devs at haskell.org
Fri Feb 16 14:14:53 UTC 2018


#14812: Dot-Notation for Flipped Function Application
-------------------------------------+-------------------------------------
        Reporter:  tepan             |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      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 AntC):

 Replying to [ticket:14812 tepan]:
 > Please allow to put a dot `.` (without whitespaces) between two things
 for ''flipped'' function application. This could make for code in pseudo-
 OOP style:

 Great idea! It's been suggested many times, including by SPJ
 https://prime.haskell.org/wiki/TypeDirectedNameResolution; and especially
 to represent field application to a record or struct, similar to OOP
 https://ghc.haskell.org/trac/ghc/wiki/Records/DeclaredOverloadedRecordFields/DotPostfix.

 Sadly, it was shot down in flames; because it seems there's lots of code
 using dot as function composition not surrounded by whitespace -- for
 example, it's a common idiom with lenses.

 But I think worth asking again. As others have said, please submit a
 proposal on github.

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


More information about the ghc-tickets mailing list