default class method types... (unification)
MR K P SCHUPKE
k.schupke@ic.ac.uk
Fri, 06 Sep 2002 14:01:06 +0100
If I have a class:
class A m n where
f :: m a -> n a
I can declare instances
instance A Maybe Maybe where
f = id
instance A [] [] where
f = id
but if I try and put a default method:
f = id
I get a unification error (less polymorphic than expected).This seems
a little odd - is there a work around for this?
Regards,
Keean Schupke,
Department of Electrical & Electronic Engineering,
Imperial College London.