[Haskell-cafe] Where are rank-3 types necessary in practice for maintaining abstraction?

Alex Rozenshteyn rpglover64 at gmail.com
Tue Apr 3 15:10:56 UTC 2018


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.
>
> Regards,
> Jo
> _______________________________________________
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180403/f36fe629/attachment.html>


More information about the Haskell-Cafe mailing list