[m-dev.] Constructor classes / Functional dependencies

Michael Day mikeday at bigpond.net.au
Fri Aug 3 21:35:19 AEST 2001


> It's high on my list of things-to-do when I start working on Mercury
> full time in October (unless someone is already on the case.)

Ah, good news!

> I *think* functional dependencies at least should be fairly easy to
> add.

>From my somewhat vague thoughts on the issue, it seems that the trickiest
part would be lifting the restrictions on instance declarations and
constraints to make type classes with multiple parameters more practical.

:- 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

...

Michael

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list