[Haskell-cafe] Data.Tree.Zipper in the standard libraries
miguelimo38 at yandex.ru
Fri May 23 11:02:39 EDT 2008
I think that MonadZero m => ... is better than just Maybe. If you can
have more general solution for free, why fight it?
On 23 May 2008, at 14:55, Jules Bean wrote:
> Krasimir Angelov wrote:
>> The monads design is used in Data.Map i.e.
>> lookup :: (Monad m, Ord k) => k -> Map k a -> m a
> which is widely considered a poor design decision and a wart on
> Seriously, if you don't return a useful error message, then Maybe is
> as good as it gets, why not use it?
> (And there really is only one kind of error possible here, in each
> 'fail' only adds information in the case it has a useful error
> message (in which case I'd encourage MonadError m =>)
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe