Proposal #173: The dot type operator, rec: accept
Hello, This proposal would extend the parser to allow the '.' character to appear in type operators, allowing one to write code like the following: ``` type (f . g) x = f (g x) foo :: (Maybe . Either Int) Bool foo = Just (Right True) ``` I recommend we accept the proposal, as it would resolve an odd inconsistency between the term and type languages. The main downside seems to be that combining a type-level '.' with a 'forall' is a bit hard to read, but I think the benefits of a more consistent syntax outweigh this concern. Eric
I'm ok with this in principle, and I can't seen any bad disadvantages in practice. Simon | -----Original Message----- | From: ghc-steering-committee <ghc-steering-committee-bounces@haskell.org> | On Behalf Of Eric Seidel | Sent: 09 October 2018 21:45 | To: ghc-steering-committee@haskell.org | Subject: [ghc-steering-committee] Proposal #173: The dot type operator, | rec: accept | | Hello, | | This proposal would extend the parser to allow the '.' character to | appear in type operators, allowing one to write code like the following: | | ``` | type (f . g) x = f (g x) | | foo :: (Maybe . Either Int) Bool | foo = Just (Right True) | ``` | | I recommend we accept the proposal, as it would resolve an odd | inconsistency between the term and type languages. The main downside | seems to be that combining a type-level '.' with a 'forall' is a bit hard | to read, but I think the benefits of a more consistent syntax outweigh | this concern. | | Eric | _______________________________________________ | ghc-steering-committee mailing list | ghc-steering-committee@haskell.org | https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
I'm in support as well. Richard
On Oct 9, 2018, at 4:45 PM, Eric Seidel <eric@seidel.io> wrote:
Hello,
This proposal would extend the parser to allow the '.' character to appear in type operators, allowing one to write code like the following:
``` type (f . g) x = f (g x)
foo :: (Maybe . Either Int) Bool foo = Just (Right True) ```
I recommend we accept the proposal, as it would resolve an odd inconsistency between the term and type languages. The main downside seems to be that combining a type-level '.' with a 'forall' is a bit hard to read, but I think the benefits of a more consistent syntax outweigh this concern.
Eric _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
Seems reasonable to me too. On Tue, Oct 9, 2018 at 7:52 PM Richard Eisenberg <rae@cs.brynmawr.edu> wrote:
I'm in support as well.
Richard
On Oct 9, 2018, at 4:45 PM, Eric Seidel <eric@seidel.io> wrote:
Hello,
This proposal would extend the parser to allow the '.' character to appear in type operators, allowing one to write code like the following:
``` type (f . g) x = f (g x)
foo :: (Maybe . Either Int) Bool foo = Just (Right True) ```
I recommend we accept the proposal, as it would resolve an odd inconsistency between the term and type languages. The main downside seems to be that combining a type-level '.' with a 'forall' is a bit hard to read, but I think the benefits of a more consistent syntax outweigh this concern.
Eric _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
_______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
Hi, Am Dienstag, den 09.10.2018, 16:45 -0400 schrieb Eric Seidel:
I recommend we accept the proposal.
Accepted. Cheers, Joachim -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/
participants (5)
-
Eric Seidel -
Iavor Diatchki -
Joachim Breitner -
Richard Eisenberg -
Simon Peyton Jones