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

Krasimir Angelov kr.angelov at gmail.com
Sat May 24 02:50:18 EDT 2008

An updated Zipper version is uploaded here:


It doesn't use State monad anymore and it returns Maybe. This seems to
be the common preference, is it? Feel free to vote against. Should we
change Data.Map also? There is another proposal for changes in
findMin/findMax so it is better to make this two breaking changes
together rather than in a later release.

It also allows to pass whole new subtree in insert{Left/Right/Down}.

On Sat, May 24, 2008 at 3:41 AM,  <ajb at spamcop.net> wrote:
> 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.)
> Cheers,
> Andrew Bromage
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list