[GHC] #14812: Dot-Notation for Flipped Function Application
GHC
ghc-devs at haskell.org
Fri Feb 16 13:28:39 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 tepan):
Replying to [comment:8 svenpanne]:
I cannot argue with historical consensus and what is and isn't a "very,
very good reason"/"warts in language design". So, if it's going to be
"let's not do this", then "meh" it is.
Concerning breaking old code, a language pragma `{-# LANGUAGE
FlippedFunctionApplicationDot #-}` might provide the necessary backward-
compatibility.
But, so far, I haven't seen Haskell code with the dot-operator without
white-spaces. It seems to be consensus (or at least advisable) to use the
dot-operator with whitespaces, and to leave `.` without whitespaces only
for module access.
Thanks for the links, though. Maybe they will help me understand why, on a
"lexical level" `Foo.bar` would cease to be unambiguously parsed as "`bar`
of module `Foo`" once `foo.bar` would be parsed as "`bar` applied to
`foo`".
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14812#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list