no non-typevariable in instance declarations
Marcin 'Qrczak' Kowalczyk
14 Nov 2000 19:41:21 GMT
Tue, 14 Nov 2000 16:17:48 -0200, José Romildo Malaquias <[email protected]> pisze:
> But this is not relevant to my question. Removing the instance
> instance C Integer where
> ty _ = "Integer"
> from the program (so that there is no instance overlapping now)
> does not help.
In this case your instance would be the only one possible (any other
would overlap) and it could be equally well written as a plain function.
Actually Haskell 98 has more severe restriction than non-overlapping
instances. The instance head must be a type constructor applied to
as many distinct type variables as needed to let the kinds match.
"instance Foo [Int]" is as non-standard as "instance Foo a".
__("< Marcin Kowalczyk * [email protected] http://qrczak.ids.net.pl/
^^ SYGNATURA ZASTĘPCZA