[m-users.] Predicate declared nondet error: mode mismatch in disjunction.

Sean Charles (emacstheviking) objitsu at gmail.com
Thu May 20 22:34:32 AEST 2021


Julien, I changed the duff line to

bifmap(“require”, require).

I changed the determinism to semidet and it has all compiled just fine, have I escaped something by the luck of the ignorant? What were you thinking the compiler would say?  :D

Ahh…. I see what you might have meant… nondet. I changed it to semidet before I compiled it. You were right after all! LOL

words.m:099: In `bifmap'(in, out):
words.m:099:   warning: determinism declaration could be tighter.
words.m:099:   Declared `nondet', inferred `semidet'.

Sean


> On 20 May 2021, at 12:52, Julien Fischer <jfischer at opturion.com> wrote:
> 
> 
> 
> On Thu, 20 May 2021, Sean Charles (emacstheviking) wrote:
> 
> ...
> 
>> In the words.err file it has listed every single line of my predicate. In this case the disjunction (I think) is the entire set of bifmap/2 declarations. I have attached the complete contents of my source file this time, sorry for
>> the size of it. I am pretty sure I don’t have any duplicates either, this has been a long cut and paste and totally reorganise from my Prolog code so I suspected some kind of cut and paste error could have crept in but if so I have
>> failed to spot it.
>> I am also assuming that `nondet` is correct for its determinism, I
>> know it CAN fail i.e. a string that is not a keyword and for the
>> examples given above it could succeed more than once.
> 
> When you fix the mode error, you find that the compiler will have
> something to say about that last bit ...
> 
> Julien.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20210520/b07df808/attachment.html>


More information about the users mailing list