[m-dev.] Adding default clauses to the language.

Ralph Becket rbeck at microsoft.com
Thu Aug 9 23:45:01 AEST 2001


> From: Peter Schachte [mailto:schachte at cs.mu.OZ.AU]
> Sent: 09 August 2001 14:35
> To: mercury-developers at cs.mu.OZ.AU
> Subject: Re: [m-dev.] Adding default clauses to the language.
> 
> On Thu, Aug 09, 2001 at 02:29:33PM +0200, Holger Krug wrote:
> > Maybe:
> >
> > :- failing detmap3(in, in, in) = out throws Exc.
> 
> The syntax looks pretty nice, and you could put it in the
implementation
> section, which is good.  But it won't let you use arguments of the
goal in
> the exception term, which I think is important.

Could we borrow from the special case code for distinct modes approach?

E.g. 

otherwise det_map3(F::in, Xs::in, Ys::in, Zs::in) = Result::out :-
	<body>.

This would support different otherwise clauses for each mode.

- Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list