patch applied (packages/base): Control.Monad: +void :: f a -> f ()

Ian Lynagh igloo at earth.li
Sat Jan 16 13:44:08 EST 2010


On Tue, Jan 12, 2010 at 02:17:16PM -0800, Malcolm Wallace wrote:
> Fri Jan  8 13:44:55 PST 2010  gwern0 at gmail.com
>   * Control.Monad: +void :: f a -> f ()
>   Ignore-this: 4dc07452315f2d1b4941903ff42fc45f
>   See http://hackage.haskell.org/trac/ghc/ticket/3292
>   Turns m a -> m (). Lets one call functions for their side-effects without
>   having to get rid of their return values with '>> return ()'. Very useful
>   in many contexts (parsing, IO etc.); particularly good for 'forkIO' and 'forM_',
>   as they demand return types of 'IO ()' though most interesting IO functions
>   return non-().
> 
>     M ./Control/Monad.hs +4

Does
    void :: Functor f => f a -> f ()
really belong in Control.Monad, rather than Data.Functor?


Thanks
Ian



More information about the Cvs-libraries mailing list