[m-rev.] diff: fundeps, polymorphic instances

Ralph Becket rafe at csse.unimelb.edu.au
Mon Oct 30 11:55:52 AEDT 2006


Mark Brown, Sunday, 29 October 2006:
> Estimated hours taken: 16
> Branches: main
> 
> Support polymorphic instances of typeclasses with functional dependencies.
> We do this by allowing type variables in the range arguments, which must be
> distinct according to existing typeclass restrictions, to be determined
> from type variables in the domain arguments by the functional dependencies
> on the instance constraints.

This suggests to me that you are allowing 

:- instance foo(list(T), T) where ...

given that

:- typeclass foo(T1, T2) <= (T1 -> T2), ...

Which would be wonderful.  But that isn't illustrated in your example :-(
Have I misunderstood your change?

-- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list