Functor => Pointed => Applicative => Monad

Michael Snoyman michael at
Mon Nov 29 18:50:28 CET 2010

On Mon, Nov 29, 2010 at 7:46 PM, David Menendez <dave at> wrote:
> On Mon, Nov 29, 2010 at 11:26 AM, Isaac Dupree
> <ml at> wrote:
>> On 11/29/10 03:39, John Smith wrote:
>>> Is there any intention to reorganise the standard class hierarchy,
>>> arranging them logically instead of in order of invention? I plagiarised
>>> the following example from
>>> and Trac:
>>> class Functor f where
>>> map :: (a -> b) -> f a -> f b
>>> class Functor f => Pointed f where
>>> pure :: a -> f a
>> Is it useful to have Pointed non-Functors?
> Is Pointed useful at all? The last time this discussion came up, I
> asked for algorithms which were generic over pointed functors (in the
> same way that traverse is generic over applicative functors) and no
> one could think of any.
> Without <*> or >>=, all we can say about pure is that it's a natural
> transformation.

It would be useful for the Failure typeclass[1]. As-is, we made Monad
the superclass just for ease of use, but there could definitely be
some non-Monads for which a Failure instance makes sense. I think the
one that occurred to me most recently is forms in Yesod, which have an
Applicative but not Monad instance.



More information about the Libraries mailing list