[Haskell-beginners] Trying to prove Applicative is superclass of Functor, etc

Dániel Arató exitconsole at gmail.com
Fri Apr 29 15:44:44 UTC 2016


Excellent answer. I kind of suspected the same but I couldn't quite
find an appropriate translation for "=>".

It's not really implication though. At least not in the same sense as "->". :(

On 29/04/2016, Daniel Bergey <bergey at alum.mit.edu> wrote:
> My understanding is that both the -> and => arrows represent
> implication, in the Curry-Howard view of types as proofs.  Maybe someone
> else can provide better examples of translating back and forth this way.
(snip)
> A class definition with a superclass requirement means something like:
>
> Functor f => Applicative f where ...
>
> You can show that a type f is an Applicative by providing a proof (type
> class instance) that f is a Functor, and proofs (definitions) of the
> following class functions.
>
> I hope this helps, and that I've gotten it right.
>
> bergey


More information about the Beginners mailing list