
I'd be interested to see a design that allows for local instances, in a way that doesn't cause problems like in the URL above, but as far as I know none exist yet.
While this has come up now and then, most recently here
http://www.haskell.org/pipermail/haskell-prime/2008-May/002601.html http://www.haskell.org/pipermail/libraries/2008-September/010623.html
of course, as soon as I hit send I recalled: Wolfram Kahl and Kahl Scheffczyk, Named Instances for Haskell Type Classes http://www.cs.uni-bonn.de/~ralf/hw2001/4.pdf Derek Dreyer, Robert Harper, and Manuel M. T. Chakravarty Modular Type Classes http://www.cse.unsw.edu.au/~chak/papers/DHC07.html while searching for those urls, I also discovered that Paul replied to the 2001 paper in a 1992 email: http://www.cse.unsw.edu.au/~dons/haskell-1990-2000/msg00727.html That's what I call foresight!-) Claus Ps. there have also been encodings of named instances, iirc.