[mercury-users] a typeclassful random.m

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Thu Feb 22 13:57:43 AEDT 2007


Dear all,

I've been using Julian's typeclassed random.m, and I find myself
using the following pattern when typeclassing arguments of a
predicate:

:- pred foo(arg1, ..., argN, RNG, RNG) <= prng(RNG, _).

Julian may have the best answer here, but maybe others in the
maillist have input, too -- is there a need to have the second
argument at all in the typeclass?  If so, what are the uses of the
second argument, and how would it be used practically.

Put another way: perhaps the protocol can be modified to
provide the user a simpler typeclass specification of only one
argument for the majority (in my case, for all) of uses?

Sincerely,
Doug Auclair

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