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

Iavor Diatchki iavor.diatchki at gmail.com
Sat May 24 19:09:33 EDT 2008


Hello,
I think that the modified API (no state monad, and using Maybe) is
quite nice!  I implemented a version of the the suggested API using a
slightly different data structure, which makes the code a bit simpler,
I think.   I put the code in the Haskell wiki:
http://www.haskell.org/sitewiki/images/2/2d/RoseZipper.hs
I also added a couple of extra functions that seemed useful, and
renamed a few of the functions to be more consistent.

As for how to distribute the code, it seems that Zipper should live in
the same place as Data.Tree.  I think that Data.Tree is part of the
"containers" package, so it would make sense to add the Zipper there
as well.

-Iavor



On Sat, May 24, 2008 at 1:24 AM, Neil Mitchell <ndmitchell at gmail.com> wrote:
> Hi,
>
>> 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.
>
> The standard libraries proposal thingy is to go via the libraries
> list, create tickets etc. What reason is there to make this part of
> the base libraries, rather than a separate package on hackage? I can't
> see much reason to make Data.Tree part of the base libraries, other
> than the fact it already is, and it could easily get moved out at a
> future date.
>
> We've seen there is some advantage in leaving the implementation
> outside the base library, as its already changed several times in the
> past few days.
>
> Thnanks
>
> Neil
> _______________________________________________
> 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