Operator precedence help

Henning Thielemann lemming at henning-thielemann.de
Sun Aug 16 05:46:14 UTC 2020


On Sun, 16 Aug 2020, David Feuer wrote:

> On Sun, Aug 16, 2020, 1:30 AM Henning Thielemann <lemming at henning-thielemann.de> wrote:
>
>       I would use 5 for cons, like : and ++
> 
> My queues use snoc and uncons. Using 5 for :< means using 4 for |>, which is the thing that can show up in an
> expression context and therefore clash with Applicative stuff. So I'd be tempted to go the other way. Of course,
> that doesn't help deques, but I want consistency. Where might that go wrong?

I have no idea.

Sometimes I think it would be better to omit infix operators and let 
people define custom infix operators as appropriate for their application. 
They still can do it by not importing the operators from the library.


More information about the Libraries mailing list