[Haskell-cafe] Data.Tree.Zipper in the standard libraries

ajb at spamcop.net ajb at spamcop.net
Fri May 23 21:41:11 EDT 2008

G'day all.

Quoting Don Stewart <dons at galois.com>:

> This is Haskell, we should use Maybe.

This is Haskell, more abstract is good.

I do agree, though, that Monad is arguably the wrong abstraction.  Something
like this would arguably be better:

class (Functor f) => Fail f where
     return :: a -> f a
     fail :: String -> f a

(And yes, the String is arguably important; Maybe doesn't give you that.)

Andrew Bromage

More information about the Haskell-Cafe mailing list