Fundeps and class contexts
Marcin 'Qrczak' Kowalczyk
qrczak@knm.org.pl
10 May 2001 19:13:05 GMT
Would allowing this make sense?
class C a b | a -> b
class C a b => S a
I want to simulate a particular "class synonym" (with four superclasses
instead of one C here) where the type 'b' is uninteresting for its users.
Currently I have to write
class C a b | a -> b
class C a b => S a b | a -> b
and use
f :: S a b => T(a)
instead of
f :: S a => T(a)
even though T(a) usually doesn't contain b. If it does, I would write
f :: (S a, C a b) => T(a)
--
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK