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

Holger Krug hkrug at rationalizer.com
Fri Aug 10 00:27:32 AEST 2001


> :- failing detmap3(A::mode_a, B::mode_bn, C::mode_c) = out throws E :- <body>.
> 
> <body> may reference A, B, C according to their input inst and has
> to bind E. A `failing' declaration might be added for each declared mode
> separately.

Maybe better:

:- failing detmap3(A::mode_a, B::mode_bn, C::mode_c) = out throws(<fun>).

Here <fun> is a functional expression possibly referring to A, B, C,
resp.:

:- failing detmap3(A::mode_a, B::mode_bn, C::mode_c) = out throws(E) <body>.

Here <body> is predicate bindng E.

-- 
Holger Krug
hkrug at rationalizer.com
--------------------------------------------------------------------------
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