
On 27/05/2009 22:02, Henning Thielemann wrote:
My proposal is thus: Discourage orphan instances! If you encounter that an instance is missing and it is a canonical one, it should be added to the package that defines the type or the class. If there are several choices for the implementation then the package where the instance would belong to should document that. Then programmers should find a consensus which of the choices they prefer. If you cannot wait for an official adaption of the required instance, then you must work with newtype wrappers.
Quite. I argued the "no orphan instances in libraries" position on the libraries list last year, here's the start of the (longish) thread: http://www.haskell.org/pipermail/libraries/2008-September/010618.html We ought to have a "guidelines for API design" section of the wiki somewhere, so we could put this in it. Cheers, Simon