overlaps and deduced contexts

2000-02-29 Thread S.D.Mechveliani
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

Re: overlaps and deduced contexts

2000-02-29 Thread Jeffrey R. Lewis
"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

Re: overlaps and deduced contexts

2000-02-29 Thread Marcin 'Qrczak' Kowalczyk
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?