[mercury-users] Typeclasses & parameters

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Jun 1 19:15:12 AEST 2007


On Tue, 29 May 2007 doug.auclair at logicaltypes.com wrote:

> I also tried the functional dependency approach, but ran right back
> into the issue raised in a separate thread about functional dependencies
> and typeclass constraints.
>
> This issue and other similar ones raised in threads (the restriction
> against typeclassing polymorphic types, "functional insts", etc) seem to
> be addressed by dependently-typed languages ... perhaps a review of the
> things Mercury does so well (modes, insts, types, typeclasses, determinism)
> vis-a-vis dependent types could yield a language that is more expressive
> with a stronger type correctness?

Maybe, but integrating dependent types into Mercury would, I suspect,
be a rather large research problem in its own right.

As Peter mentioned, Nick's problem could be dealt with using 
constructor classes if Mercury supported them.  The thing about both
constructor classes and looser restrictions on polymorphic instances
is that in principle there is little or no research to be done, just
lots of implementation.  Mark outlined the tasks that need to be done
for the latter in the thread entitled `Type class instance constraints'
on mercury-developers.  A lot of those tasks are also necessary for
the implementation of constructor classes.

Cheers,
Julien.
--------------------------------------------------------------------------
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