[m-users.] Cannot execute a predicate from a Discriminated Union

Mark Brown mark at mercurylang.org
Sun Jun 28 20:48:32 AEST 2015


On Sun, Jun 28, 2015 at 10:29 AM, Charles Shuller
<charles.shuller at gmail.com> wrote:
> On Sat, Jun 27, 2015 at 11:27 PM, Mark Brown <mark at mercurylang.org> wrote:
>> The inst you need to declare would look something like:
>>
>> :- inst test == bound(ground, pred(m) is d).
>>
>> where m and d represent the mode and determinism.
>>
>
> No joy.  bound/2 is not defined.
>

Sorry, I left a functor out.

>
> :- inst test
>     ---> test(ground, pred(out) is semidet).

I meant something like that.  :-)

> Also, I got the idea that the :-inst name == bound(...;...;...)  form of
> inst was creating a name for an inst-tree which could later be applied as a
> mode, was that completely wrong??

The two forms mean the same thing. The way you wrote it is probably
more readable.

Cheers,
Mark.



More information about the users mailing list