
25 Apr
2012
25 Apr
'12
10:04 p.m.
On April 25, 2012 12:20:16 Johan Tibell wrote:
On Wed, Apr 25, 2012 at 8:19 AM, Tyson Whitehead
wrote: Is there a technical reason this couldn't be done? The Haskell report only says doing this is not part of haskell. It doesn't say why.
I think the problem is incoherence, what if the same Map value got used with two different instances of Int?
I'm not sure I follow how allowing control over importing of instances could allow a programmer to define multiple instances for the same types. I would have expected this to result in a link time error as a product of multiple declerations (something like a multiple symbol definition) regardless of whether any module brings it into scope as a possible candidate for use. Cheers! -Tyson