
29 Dec
2010
29 Dec
'10
12:36 p.m.
On Wed, Dec 29, 2010 at 2:41 PM, Christian Maeder
I don't think, that orphaned instances can be avoided in the long run. Therefore I would rather see a separate package for the NFData instances of container types.
Why not? The general recipe is to define type classes in separate packages so they can appear on the bottom of the dependency pyramid. That way any package that defines a data type can depend on the package that defines the type class and thus avoid creating orphan instances. Orphan instances should be avoided as they can cause hard to prevent and hard to fix breakages in large code bases. Johan