
On Wed, Oct 01, 2014 at 05:36:49PM +0300, Gesh hseG wrote:
It seems the first part of your proposal just says "Haskellers can no longer expect class instance coherence." As such, this is a drastic change that would require all Haskell programs to be inspected to see if they crucially rely on coherence No. Coherence is preserved, since you always use the unique in-scope dictionary. What *is* lost, however, is global uniqueness, which means that code that assumes that the same dictionary is used for the same type across calls to functions must be modified. Arguably, that code is semantically incorrect to begin with, but that's neither here nor there.
What sort of code is that exactly? I'm aware there are things like `Data.Set` which crucially rely on global uniquess of instances to maintain invariants. Are there any other sorts of functionality where this is needed? Tom