Fixity of ($) and (.) vs. (&) and (>>>)

With function composition I can easily write something like h . g . f $ expr However if I want to write the equivalent in left-to-right composition style: expr & f >>> g >>> h This is not possible due to a parsing error arising from the fixity of the operators. (>>>) is provided by Control.Arrow and (&) by Data.Function. My question is, would it not be better to *decrement* the fixity of (&) by one or *increment* the fixity of (>>>) by one (probably rather the latter)? -- Regards *Frederik Hanghøj Iversen*

Hello Frederik!
Indeed, this sounds like a flaw. I don't think it can be easily fixed
though. E.g. I tried to recompile GHC with dumped fixity of >>>, as you
suggested. It failed short on the Arrow.hs file, complaining about the
definition of (|||) inside ArrowChoice:
f ||| g = f +++ g >>> arr
untag
Likewise, many things will be broken by this change in many other places, I
guess.
Nevertheless, you could try to raise this question on the libraries mailing
list which is best suited for concerns like this, I believe:
https://mail.haskell.org/mailman/listinfo/libraries
--
Best, Artem
On Thu, 2 Aug 2018 at 23:55 Frederik Hanghøj Iversen
With function composition I can easily write something like
h . g . f $ expr
However if I want to write the equivalent in left-to-right composition style:
expr & f >>> g >>> h
This is not possible due to a parsing error arising from the fixity of the operators. (>>>) is provided by Control.Arrow and (&) by Data.Function. My question is, would it not be better to *decrement* the fixity of (&) by one or *increment* the fixity of (>>>) by one (probably rather the latter)?
-- Regards *Frederik Hanghøj Iversen* _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (2)
-
Artem Pelenitsyn
-
Frederik Hanghøj Iversen