ghc6 behavior with circular instance declaration

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Thu Oct 23 14:37:45 EDT 2003


W liście z śro, 22-10-2003, godz. 06:15, Kenny pisze:

> instance (Myeq a,Myeq [a]) => Myeq [a] where
>     myeq (x:xs) (y:ys) = (myeq x y)&&(myeq xs ys)
>
> I want to make the 2nd call of myeq to be of an instance function
> from the context instead of a recursive call.

Why? Since there can be at most one Myeq [a] instance in a program,
this is the same.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/



More information about the Haskell mailing list