[Haskell-cafe] Proposal: Infix expression keyword: -XInfixExpressions

htebalaka goodingm at gmail.com
Thu Feb 19 20:00:59 UTC 2015


If this was used, you could probably also extend it to patterns where the
function is a data constructor. Might be handy for vectors too, where
OverloadedLists doesn't work.

I could see myself using this to make arrow-y types easier to work with;
being able to treat sums and products like lists would be much nicer than
the type operator route, though that would require (,) not to be handled
specially.

Christopher Done-2 wrote
> On 19 February 2015 at 18:53, Nils Schweinsberg <

> mail@

> > wrote:
>> What would be the typing rules for this? What would be the types of
>> e.g. pointfree written function definitions (`f` in `let f = infix + 5
>> in f 2 + f 2 3 4`)?
> 
> Purely syntactical, the translation I gave was literal: let f = infix
> + 5 is the same as let f = (5 +). But to avoid confusion it's also
> possible to disallow unary arguments and mandate at least two
> arguments.
> _______________________________________________
> Haskell-Cafe mailing list

> Haskell-Cafe@

> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe





--
View this message in context: http://haskell.1045720.n5.nabble.com/Proposal-Infix-expression-keyword-XInfixExpressions-tp5765656p5765684.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.


More information about the Haskell-Cafe mailing list