[mercury-users] The Logic of Mercury

Thomas Conway conway at cs.mu.OZ.AU
Wed Sep 8 17:27:18 AEST 1999


On Wed, Sep 08, 1999 at 02:14:40PM EST, Lee Naish wrote:
> Sounds like you are trying to undermine my position without actually
> disagreeing with it.  Perhaps you believe it but don't want to.

No. Just trying to find out/

> Sure, there are uses.  I've *thought* of uses a few times but never uses
> such things in practice (sometimes its turned out there is a simpler way
> which is just as good).

I have used them occasionally, but in Mercury without polymorphic modes,
they're a hassle, so I have tended to use other solutions. The place where
I've found them to be desirable is in interpreters where it is nice to be
able to represent builtins as functions in the normal table of functions.
eg:

:- type func_id
	--->	string/int. % Name/Arity

:- type func_def
	--->	builtin(pred(interp_state, interp_state))
	;	user(user_func_def)
	.

:- type func_table	==	map(func_id, func_def).

-- 
 Thomas Conway )O+     Every sword has two edges.
     Mercurian            <conway at cs.mu.oz.au>
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list