<p dir="ltr">You don't have to depend on new GHC versions unless your package uses the ghc API, which most don't.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 20, 2016 3:40 AM, "Henning Thielemann" <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Thu, 18 Aug 2016, David Feuer wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I realized that it would probably be helpful to put up the actual<br>
documentation for the proposed functions. This can be found at<br>
<br>
<a href="http://treeowl-containers-general-merge.bitballoon.com/data-map-lazy-merge" rel="noreferrer" target="_blank">http://treeowl-containers-gene<wbr>ral-merge.bitballoon.com/data-<wbr>map-lazy-merge</a><br>
</blockquote>
<br>
The description of 'generalMerge' mentions diffPreserve, diffDrop, diffMapWithKey, but they are not shown in the Haddock page.<br>
<br>
Since there are pretty many functions around 'generalMerge' I would keep that stuff in one module and also rename 'generalMerge' to 'merge' because the new module provides enough distinction from Data.Map.mergeWithKey.<br>
<br>
Your solution looks pretty elegant to me but for a definitive judgement I would like to test it in real applications first. I remember some actual and potential uses of 'mergeWithKey' in my code. [1][2][3] It is unfortunate that depending on a newer version of containers also forces me to depend on new GHC versions. Could you provide the Merge modules in a separate package, say containers-merge or containers-compat? Would it be possible to implement the Merge modules using the existing mergeWithKey function?<br>
<br>
<br>
[1] <a href="https://github.com/conal/total-map/pull/3/commits/09109b7a045ffea75e50793a690bd9db4512d540" rel="noreferrer" target="_blank">https://github.com/conal/total<wbr>-map/pull/3/commits/09109b7a04<wbr>5ffea75e50793a690bd9db4512d540</a><br>
[2] <a href="https://github.com/conal/total-map/pull/5/commits/6fd1cc7b9bef666a69b2d02de36ff9e98c55cd4b" rel="noreferrer" target="_blank">https://github.com/conal/total<wbr>-map/pull/5/commits/6fd1cc7b9b<wbr>ef666a69b2d02de36ff9e98c55cd4b</a><br>
[3] <a href="http://hub.darcs.net/thielema/comfort-graph/browse/src/Data/Graph/Comfort/Map.hs#28" rel="noreferrer" target="_blank">http://hub.darcs.net/thielema/<wbr>comfort-graph/browse/src/Data/<wbr>Graph/Comfort/Map.hs#28</a><br>
</blockquote></div></div>