haskell/containers — pull request #35 by rrnewton (2013-12-03 04:32:32+00:00)
Title: Add splitRoot function for Map and Set

We discussed this on the mailing list and the conclusions were:

(1) People like exposing an abstract split rather than Tip/Bin constructor
(2) The version returning a list garnered more support than returning a 3-tuple.
(3) Exposing a basic split rather than settling on a class was more acceptable.

These patches implement a simple 'splitRoot' addition along these lines.

It would be great to have access to this from containers soon, as we're beginning to work in earnest on a parallel collections library:

https://github.com/iu-parfunc/lvars/tree/master/haskell/par-collections

We can currently provide a "ParFoldable" instance for our own concurrent-skiplist-based Map/Set, but NOT for the vanilla Data.Map / Data.Set. This patch fixes that.