> Is the following legal?  It doesn't violate any stated restriction I think.
> 
>       Class Foo a where x::a
> 
>       instance Foo a => Foo a where x = x
> 
> Satish


As far as I'm aware, this is perfectly legal (the Foo a in the context
is redundant, Foo a can always be inferred from Foo a).  It just
defines a non-terminating value for x (in general recursive instances
are quite useful -- e.g. equality over lists).

Why do you think it should be illegal?

Kevin

Reply via email to