[mercury-users] functional dependencies (again)

Michael Day mikeday at yeslogic.com
Wed Dec 18 18:15:06 AEDT 2002


About a year ago I posted this:

   :- typeclass foo(A, B) given A >> B.

   :- instance foo(list(T), T). % an error in the second parameter

   :- pred bar(C) <= foo(C, int). % an error in the constraint

The last example is now supported, which has made using multi-parameter
type classes slightly more practical. However the simple functional
dependency from the first example still can't be used, which is
unfortunate as this simple case is enough to solve a great variety of
problems that arise with multi-parameter type classes.

How much work would be required to add support for just this case?

Michael

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list