Add voidM to Control.Monad
igloo at earth.li
Mon Jan 16 17:15:34 CET 2012
On Mon, Jan 16, 2012 at 10:05:25AM -0600, Antoine Latter wrote:
> 2012/1/16 Jurriën Stutterheim <j.stutterheim at me.com>:
> > It is indeed intended for monads that have no Functor instance. While one could argue that every monad should have a Functor instance, this is not the case in practice. If, on the other hand, Monad was defined as
> > class Functor m => Monad m
> > then all would be fine and we would be able to use the current implementation for `void`. A Functor constraint on Monad is an entirely different discussion though.
> We would be better off adding Functor instances for the Monads in
IIRC, Functor rather than Monad was chosen for void's constraint as all
Monads could/should also have Functor instances.
The ticket was http://hackage.haskell.org/trac/ghc/ticket/3292 and it
links to the discussion.
More information about the Libraries