Adding an ignore function to Control.Monad

Nicolas Pouillard nicolas.pouillard at gmail.com
Sun Jul 12 05:54:54 EDT 2009


Excerpts from Michael Snoyman's message of Sat Jul 11 22:03:49 +0200 2009:
> I'm not opposed to using void instead of ignore. Out of curiosity, is anyone
> interested in having the Functor version of void? I'm not sure I see a
> reason to unnecessarily limit ourselves to Monads here.

+1 to a functor version

Moreover I also think void should be related to an empty type.

What about 'discard'?

> Also, if we do end up using void, what's going to happen with the FFI copy?
> 
> Michael
> 
> On Sat, Jul 11, 2009 at 6:10 AM, Don Stewart <dons at galois.com> wrote:
> 
> > gwern0:
> > > OK, let's apply a little democracy here. Reading back through the
> > > thread, I tally the votes:
> > >
> > > # Nothing
> > > David Menendez
> > > John Meachem (?)
> > >
> > > # Just
> > > ## Control.Monad.ignore m a -> m ()
> > > Michael Snoyman
> > > Neil Mitchell
> > > Isaac Dupree
> > > Maurí­cio
> > > Martijn van Steenbergen
> > >
> > > ### Control.Monad.ignore f a -> f ()
> > > Edward Kmett
> > >
> > > ## Control.Monad.void m a -> m ()
> > > Don Stewart
> > > Iavor Diatchki
> >
> >
> > That's an odd mix too. I wonder if we even reached quorum.

-- 
Nicolas Pouillard
http://nicolaspouillard.fr


More information about the Libraries mailing list