Simon Peyton-Jones <simonpj@microsoft.com> wrote:
But I suspect that programmers will prefer a more woolly rule that does as much constraint solving as it can (provided all instance selection is uniquely determined). That would give the slightly surprising behaviour I describe above if an overlapping instance declaration was added.
Is this only an issue when 1. overlapping instances are allowed, and 2. a type-signature is omitted? I agree surprising behaviour is bad. If the ambiguity can always be resolved by giving a type-signature, perhaps GHC should simply give a warning in these cases? My own attitude tends towards "if you don't specify type signatures, you get what you deserve", especially as I freely use implicit parameters. -- Ashley Yakeley, Seattle WA