Fractional precedences? Re: Operator precedence help

Lennart Augustsson lennart at augustsson.net
Tue Aug 18 00:51:24 UTC 2020


The Pretty class (from Text.PrettyPrint.HughesPJClass) uses Rational.

On Mon, Aug 17, 2020 at 9:12 AM Carter Schonwald <carter.schonwald at gmail.com>
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 henning-thielemann.de> 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 list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20200817/7e31af7b/attachment.html>


More information about the Libraries mailing list