An updated Zipper version is uploaded here:

http://www.haskell.org/haskellwiki/User_talk:Kr.angelov

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,  <[EMAIL PROTECTED]> wrote:
> G'day all.
>
> Quoting Don Stewart <[EMAIL PROTECTED]>:
>
>> 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
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to