#2309: containers: specialize functions that fail in a Monad to Maybe

Ross Paterson ross at soi.city.ac.uk
Tue Jul 22 07:29:45 EDT 2008


On Mon, Jul 21, 2008 at 03:19:43PM +0200, Nicolas Pouillard wrote:
> Excerpts from Ross Paterson's message of Sat Jul 19 01:29:40 +0200 2008:
> > To summarize:
> > 
> > Several container classes have types like
> > 
> >     lookup :: (Monad m, Ord k) => k -> Map k a -> m a
> 
> And what about keeping the monadic version under another name like lookupM?

Well, the aim was to make the API safer.


More information about the Libraries mailing list