Adding an ignore function to Control.Monad

Gwern Branwen gwern0 at gmail.com
Fri Jan 8 16:56:18 EST 2010


An update on the poll:

# Nothing
- David Menendez
- John Meachem (?)

# Just
## Control.Monad.ignore :: m a -> m ()
- Isaac Dupree
- Martijn van Steenbergen
- Maurí­cio
- Michael Snoyman
- Neil Mitchell

### Control.Monad.ignore::  f a -> f ()
- Edward Kmett
- Henning Thielemann

## Control.Monad.void :: f a -> f ()
- Don Stewart
- Iavor Diatchki
- Jeff Wheeler
- Johann Tibell
- Malcolm Wallace
- Michael Snoyman (as well)
- Nicolas Pouillard
- Stephan Friedrichs
- Evan Laforce

## Control.Monad.discard :: f a -> f ()
- Nicolas Pouillard
- Wolfgang Jeltsch
- Deniz Dogan

I think consensus has been reached to:
1) add X
2) add X :: f a -> ()

The exact name - whether ignore/void/discard - is not so clear with
consensus. So I'm just going to name it 'void' for consistency with
Foreign and foreign languages.

The patch has been sent here, and has also been attached to the
ticket: http://hackage.haskell.org/trac/ghc/ticket/3292

I hope we can finally bring this issue to a close!

-- 
gwern


More information about the Libraries mailing list