darcs patch: Control.Monad: +void :: f a -> f ()

Gwern Branwen gwern0 at gmail.com
Fri Jan 8 22:08:07 EST 2010

On Fri, Jan 8, 2010 at 9:54 PM, Jeremy Shaw <jeremy at n-heptane.com> wrote:
> Not sure if this came up already, but there is a less general version of
> void in Foreign.Marshal.Error:
> http://www.haskell.org/ghc/docs/latest/html/libraries/base-
> void :: IO a -> IO ()
>     Discard the return value of an IO action
> Are there plans to unify the two? Perhaps Foreign.Marshal.Error can just
> re-export void from Control.Monad?
> - jeremy

Don brought it up, and it's a consideration behind picking the name 'void'.

Re-exporting with the type signature (ie. rewrite it to be void :: IO
a -> IO (); void = Control.Monad.void) is easy and won't break
anything; it's something that can be done after Control.Monad.void has
been added. One thing at a time.


More information about the Libraries mailing list