Functor => Pointed => Applicative => Monad

Tyson Whitehead twhitehead at
Mon Nov 29 22:08:34 CET 2010

On November 29, 2010 14:08:16 Tyson Whitehead wrote:
> As to whether it should go (Pointed, Functor) => Applicative or Pointed =>
> Functor => Applicative, it would seem to me that, just as when given a
> Monad I have Applicative, when given a Functor I have Pointed
> pure x = fmap (const x) undefined
> Presuming (without proof) that this is the only valid definition given the
> underlying laws, perhaps it should then go Pointed => Functor =>
> Applicative.

Actually, I see this definition has problems as fmap likely has to take apart 
"undefined" in order to apply it to "const x".

Still, it is interesting.  It really seem to me that the Functor machinery 
should be a level up in complexity from the Pointed machinery (i.e., I would 
expect more things to be Pointed than Functors).

I wonder if fmap plus a bit (such as a single value like "pure ()" to use 
instead of undefined) would entirely nails down pure.

Cheers!  -Tyson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url :

More information about the Libraries mailing list