patch applied (ghc): Add fmapM_maybe :: Monad m => (a -> m b)
-> Maybe a -> m (Maybe b)
Max Bolingbroke
omega.theta at gmail.com
Thu Jul 23 15:15:46 EDT 2009
2009/7/23 Simon Marlow <marlowsd at gmail.com>:
> On 23/07/2009 13:18, Simon Peyton Jones wrote:
>>
>> Wed Jul 22 23:49:32 PDT 2009 simonpj at microsoft.com
>> * Add fmapM_maybe :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
>> Ignore-this: db5f6319b52a5e6b5f85d76985f2a7c9
>>
>> This function isn't used at the moment, but Max added it, and it
>> looks useful.
>
> It's an instance of Data.Traversable.mapM (which we're allowed to use in GHC
> HEAD, because it was in GHC 6.8).
Ah, I thought Traversable was still verboten, hence my addition.
Still, defining a full Traversable instance is a ton of work compared
to this 1-2 liner :-)
Max
More information about the Cvs-ghc
mailing list