packages with orphaned instances only

Ivan Lazar Miljenovic ivan.miljenovic at
Fri Jan 7 14:14:55 CET 2011

On 7 January 2011 23:07, Stephen Tetley <stephen.tetley at> wrote:
> On 7 January 2011 10:22, Christian Maeder <Christian.Maeder at> wrote:
>> So is this a bad idea?
> It sounds like a good idea to me.
> There might be some details to trash out, e.g. the granularity of
> packages - should there be a Quickcheck-orphans with Arbitrary
> instances for many structures, or separate packages
> (quickcheck-containers-instances, quickcheck-array-instances, ...) and
> perhaps a new top-level Hackage category is needed so people know
> where to find them - "Canonical instances", "Orphan instances", ...?

My biggest problem with "official" instances such as these is that
they may not do what you want.  For example, I have a lot of problems
with the testsuite for graphviz because the default list (and hence
String) instances do not match the behaviour required, so I have to be
careful to make sure I use my custom arbString, etc. functions rather
than directly calling arbitrary.

That said, if these packages have one-instance-per-module (as in
separate modules defining the Arbitrary instances for Map, Set, etc.)
then this situation is greatly reduced, since if I want a custom Map
instance I just have to make sure I don't import the module that
provides the default one.

Ivan Lazar Miljenovic
Ivan.Miljenovic at

More information about the Libraries mailing list