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

Jörg Roman Rudnick joerg.rudnick at t-online.de
Tue Oct 3 10:26:18 AEST 2006


Dear experienced ones,


trying study the mailing lists for the present state of type classes - 
especially inhowfar parametrized types (list(T), queue(T), map(K, V)...) 
are supported - am afraid I just got lost following the threads (or the 
threads diverged to other concerns like pro's & con's of Microsoft 
support).

Unfortunately, neither I found a working example in Mercury source file 
code (doing a grep), nor did own experimenting (trying functional 
dependencies, typeclassing the element type...) lead to a final success. 
Appearing to be an extremely useful construct (especially from the 
standpoint of didactics - my intent is to express the pseudo code snips 
of Russell/Norvig in Mercury which was pretty satisfying, if not to say 
impressively stylish, so far), I assume you intended it for a special 
purpose I am afraid I do not thoroughly understand...

Is it at all your aim to express abstract data types (like queues, 
lists, maps) by typeclasses or would you rather achieve this by other 
means, e.g., generic discriminating unions? Which would you consider to 
be straightforward?

This subject seems to have found great interest about six years ago 
(constructor classes, usage of kinds, ...), but it apparently hasn't 
entered the language manual - it would be great to have somebody propose 
what to do in this case.

Any comments?


Thank you in advance,

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