Simon Peyton-Jones wrote:
Yes, Haskell says that in any program there should be only one
instance for any particular type (here Monoid Int). GHC
doesn't check that, but it should really do so. It's not
necessary for soundness (ie no runtime crash) but it is
necessary for coherence (ie when you run the program the answer
you get doesn't depend on which dictionary the typechecker
arbitrarily chose).
Unless of course, your program implicitly depends on the coherence of
dictionary choice for its own soundness, for example, a program using
Data.Typeable to implement Dynamic or similar.
Jules
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe