+1 +1 +1 +1 =)<br><br><div class="gmail_quote">On Fri, Jan 7, 2011 at 12:37 PM, Ross Paterson <span dir="ltr">&lt;<a href="mailto:ross@soi.city.ac.uk">ross@soi.city.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
This is a variant of a suggestion by apfelmus:<br>
<br>
  <a href="http://www.haskell.org/pipermail/libraries/2010-September/014510.html" target="_blank">http://www.haskell.org/pipermail/libraries/2010-September/014510.html</a><br>
<br>
To avoid proliferation of variants of element-wise operations, the idea<br>
is to split these operations into two phases mediated by a new Location<br>
type, so that users can do whatever they like between these phases.<br>
Documentation is here:<br>
<br>
  <a href="http://code.haskell.org/~ross/containers_doc/Data-Map.html#3" target="_blank">http://code.haskell.org/~ross/containers_doc/Data-Map.html#3</a><br>
<br>
This adds a type and 9 functions to the interface, but makes possible<br>
monadic updates and much more.  As an illustration, the file MapOps.hs<br>
attached to the ticket gives definitions of 30 of the public functions of<br>
Data.Map in terms of the new interface.  At least in the case of insert,<br>
this definition is slightly faster than the current one.<br>
<br>
Discussion period: 4 weeks (to 4 February)<br>
<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</blockquote></div><br>