[mercury-users] Present state of type classes - especially for parametrized types

Mark Brown mark at csse.unimelb.edu.au
Sun Oct 8 21:42:41 AEST 2006


On 08-Oct-2006, Jrg Roman Rudnick <joerg.rudnick at t-online.de> wrote:
> Another idea is delegating the dependency to a second type class, e.g.,
> 
> :-typeclass dependingOn(D1, D2) <= (D1 -> D1) where [].
> :-instance dependingOn(string, string) where [].
> 
> :-instance fringe(list(T1), container(T2)) <= dependingOn(T1,T2) where [ 
> ... ]
> 
> leading to:
> functional dependency not satisfied: type variable T2 occurs in
> the range of the functional dependency, but is not in the
> domain.

I'm planning to add support for this soon (that is, in the next few weeks).

Cheers,
Mark.

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



More information about the users mailing list