<div dir="ltr"><div>My personal view on instances is that when there _is_ exactly one possible instance it is almost always useful to define it. You get a good set of questions and learn new connections to old concepts this way. However, not every instance is of this sort.<br><br>This isn't the same thing being said by reviewer #4.</div><div><br>I would disagree with reviewer 4 and say that the much much stronger claim that every instance must be the only possible instance simply isn't true. It is very desirable, but not true.<br><br>This is equivalent to saying that every instance must be <a href="https://ncatlab.org/nlab/show/stuff,+structure,+property#generalization_to_categories_and_higher_categories">"property-like-structure"</a> . The Monoid instance for [a] isn't forced. It could after all, go the other way. There are also two possible Applicative instances -- one based on ZipList. That said, given the Monad, the Applicative is forced. If we take [a] to be the 'free monoid' and give it the obvious flattening Monad, then the other properties of lists are uniquely defined though.</div><div><br></div><div>Show/Read are "mostly unique" in that the code they round-trip through could vary somewhat. Ord is defined by arbitrary convention. Similarly other constructions such as Traversable are "mostly unique" up to ordering issues and conventions.<br></div><div><div><br></div></div><div>A somewhat weaker claim can be made that when you define a data type: you usually define it for some purpose, and supply instances that reflect that intent, but then adding other instances that go beyond your initial intent so long as they are uniquely defined, simply tells you more about the data type and permit users to use a larger, consistent, vocabulary.</div><div><br></div><div>Many of these issues that are being rehashed in this thread arise when people disagree is on "what is the data type's stated purpose". When the instance is uniquely determined it is usually easily sold to the community. When it isn't, there is a lot more room for discussion.</div><div><br></div><div>-Edward</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 5:53 AM, Kosyrev Serge <span dir="ltr"><<a href="mailto:_deepfire@feelingofgreen.ru" target="_blank">_deepfire@feelingofgreen.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Herbert Valerio Riedel <<a href="mailto:hvr@gnu.org">hvr@gnu.org</a>> writes:<br>
> Maybe relevant to this discussion: the rejected paper "Controlling the<br>
> scope of instances in Haskell" submitted for the 2011 Haskell Symposium<br>
> together with the rejecting referee reports[2]<br>
><br>
>  [1]: <a href="https://www.haskell.org/definition/from12to13.html" rel="noreferrer" target="_blank">https://www.haskell.org/definition/from12to13.html</a><br>
><br>
>  [2]: <a href="https://mail.haskell.org/pipermail/ghc-devs/2014-October/006876.html" rel="noreferrer" target="_blank">https://mail.haskell.org/pipermail/ghc-devs/2014-October/006876.html</a><br>
<br>
</span>Interestingly, the Review 4 states:<br>
<br>
,----<br>
| At a higher level, the paper did not address what could be described as<br>
| the "philosophy" behind type classes, which were built with the intent<br>
| of being used when there was only a single interpretation of an operator<br>
| on a type.<br>
`----<br>
<br>
While this sounds intuitive to me, I have never heard it stated explicitly,<br>
and moreso, actually being specifically intended at design level.<br>
<br>
Is it possible to know more about this?<br>
<br>
It does seem relevant to this discussion..<br>
<span class="im HOEnZb"><br>
--<br>
с уважениeм / respectfully,<br>
Косырев Сергей<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<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-bin/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div>