Fractional precedences? Re: Operator precedence help

Jeffrey Brown jeffbrown.the at
Wed Sep 2 23:54:13 UTC 2020

What if the global numeric precedence scheme was retained, but users could
overlay their own precedence graph? The nodes in that graph could be the
operators one wants to treat differently, plus the usual 10 precedence
levels. It wouldn't have to be connected.

On Wed, Sep 2, 2020 at 5:30 PM John Cotton Ericson
<John.Ericson at> wrote:

> I definitely prefer this approach. I do not like absolutely levels,
> whether natural numbers or fractional. At the end of the day, that's all
> order-maintance for a *global* total preorder, and such a design will
> always result in unforeseeable interactions between independently-developed
> operators, not to mention increasingly ludicrously-precise fractions.
> This may sound like low-priority design pedantry, but I suspect (probably
> because I myself was taught with scheme) that spooky-action-at-a-distance
> precedence greatly harms beginning programmers, causing confusion or at
> least delaying the understanding that expressions are arbitrarily deep
> trees.
> John
> On 8/17/20 12:12 PM, Carter Schonwald wrote:
> Oh yeah!
> I feel like everyone’s wondered about that approach. But it definitely
> would need some experiments to validate. But in some ways it’d be super
> fascinating.
> On Mon, Aug 17, 2020 at 9:40 AM Henning Thielemann <
> lemming at> wrote:
>> On Sun, 16 Aug 2020, Carter Schonwald wrote:
>> > I do think that the work needed to actually support fractional
>> > precedence in ghc is pretty minimal.  Or at least I remember having a
>> > conversation about it a few years ago, and the conclusion was that
>> >  adding precedence would be super easy to do, but just lacked any good
>> > motivating example from real libraries.
>> I remember this discussion, too, and I guess that it was started by Simon
>> Marlow and it ended with recalling that decades ago something more
>> advanced was discussed: Groups of equal precedence and relations between
>> the groups. But that one was too complicated to be implemented.
> _______________________________________________
> Libraries mailing listLibraries at haskell.org
> _______________________________________________
> Libraries mailing list
> Libraries at

Jeff Brown | Jeffrey Benjamin Brown
Website <>   |   Facebook
<>   |   LinkedIn
<>(spammy, so I often miss
messages here)   |   Github <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list