[Haskell-cafe] Where are rank-3 types necessary in practice for maintaining abstraction?
hesselink at gmail.com
Tue Apr 3 16:30:12 UTC 2018
The paper is here . However, this is a sixth order function but not
rank-6 polymorphism (rank 6 type) IIUC.
On 3 April 2018 at 17:10, Alex Rozenshteyn <rpglover64 at gmail.com> wrote:
> There's an easy to read paper by Okasaki titled "Even higher-order
> functions for parsing or Why would anyone ever want to use a sixth-order
> function?". Unfortunatly I can't find a link to a non-paywalled version. It
> shows how parser combinators themselves use rank-3 types and how defining a
> monad instance requires rank-6.
> On Tue, Apr 3, 2018 at 1:05 AM Joachim Durchholz <jo at durchholz.org> wrote:
>> Am 03.04.2018 um 08:54 schrieb Timotej Tomandl:
>> > Ok, I thought about it a bit more and realized mask in Control.Exception
>> > is the one where rank-3 is necessary, which is the example I was looking
>> > for.
>> Given your newly acquired insights, do you expect that there will be
>> ultimately a valid example for higher ranks?
>> Is there a theoretical limit?
>> Or a practical one? E.g. it might be too awkward to mentally handle
>> higher-rank polymorphism - or maybe there's no real mental difference
>> when dealing with higher-ranked polymorphism, I don't know because I
>> didn't have to deal with that yet, so I'm curious.
>> > Sorry for the spam.
>> Actually it was interesting.
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> Only members subscribed via the mailman list are allowed to post.
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe