
On Mon, Nov 29, 2010 at 8:19 PM, Felipe Almeida Lessa
On Mon, Nov 29, 2010 at 3:50 PM, Michael Snoyman
wrote: 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.
OP's proposal is to have
class Applicative m => Monad m where ...
so you could just say
class Applicative f => Failure e f where ...
The question is if there is something that is Pointed but not Applicative that we would like to be Failure.
That's true for the case of forms, but there is definitely something appealing about having Pointed separate. I may not be able to think of an example where I'd want a Failure instance that isn't Applicative, but you never know ;). Michael