As people notice, the overlapping instances reveal certain
question about the deduced type contexts.
Consider the example *similar* to one someone recently presented
(probably, M.Kowalczyk):
f :: (Eq a) = Int - a - a - Int
f n x y =
if
n==0 then 0
else if x==y
"S.D.Mechveliani" wrote:
overlaps with the standard instance Eq a = Eq [a] ...
and causes, in the existing implementations, many error reports -
until the user satisfies everything by typing
f :: (Eq a,Eq [a],Eq [[a]],Eq [[[a]]],Eq a,
Eq [a],Eq [[a]],Eq
Tue, 29 Feb 2000 13:26:00 +0300 (MSK), S.D.Mechveliani [EMAIL PROTECTED] pisze:
I propose for the user to remain with `Eq a ='.
Let the compiler itself deduce and add the needed context.
No, no, no.
Would the function really have the type that is specified, or the
one with extended context?