<div dir="auto"><div>Hi David,<br><div class="gmail_extra"><br><div class="gmail_quote">On Feb 14, 2018 08:34, "David Feuer" <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Alternatives:<br>
<br>
1. Remove the instances but don't add the new ones. I fear this may<br>
lead others to write their own orphan instances, which may not even<br>
all do the same thing.<br>
<br>
2. Write separate modules with newtype-wrapped versions of the data<br>
structures implementing the desired instances. Unfortunately, this<br>
would be annoying to maintain, and also annoying to use--packages<br>
using the unwrapped and wrapped versions will use different types.<br>
Manually wrapping and unwrapping to make the different types work with<br>
each other will introduce lots of potential for mistakes and<br>
confusion.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">A third alternative is to "poison" the instances by placing TypeError in their constraints. This would prevent users from writing orphan instances, as they would overlap with the poisoned ones.</div><div dir="auto"><br></div><div dir="auto">On other Haskell implementations (if we still support them), we can use a private class with no instances for this purpose.</div><div dir="auto"><br></div><div dir="auto">See <a href="https://hackage.haskell.org/package/base-4.10.1.0/docs/GHC-TypeLits.html#t:TypeError">https://hackage.haskell.org/package/base-4.10.1.0/docs/GHC-TypeLits.html#t:TypeError</a><br></div><div dir="auto"><br></div><div dir="auto">Chris</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Discussion period: three weeks.<br>
<br>
[*] <a href="http://teh.id.au/posts/2017/03/03/map-merge/index.html" rel="noreferrer" target="_blank">http://teh.id.au/posts/2017/<wbr>03/03/map-merge/index.html</a><br>
______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
</blockquote></div><br></div></div></div>