[m-users.] How to get rid of warning message?

Volker Wysk post at volker-wysk.de
Wed Jul 12 02:44:10 AEST 2023


Hi!

I have this predicate in one module:

:- pred update_recorder_statistics(update_recorder::in, io::di, io::uo) 
is cc_multi.


It's meant to be passed as the second argument of this predicate in the same
module:

:- pred rec_continue(
    recorder::in,
    pred(rec, io, io) :: pred(in, di, uo) is cc_multi,
    io::di, io::uo
) is cc_multi.


I call it from a second module, like this:

rec_continue(Rec, update_recorder_statistics, !IO)


When I compile the first module, I get this warning:

fisactions.m:120: In `update_recorder_statistics'(in, di, uo):
fisactions.m:120:   warning: determinism declaration could be tighter.
fisactions.m:120:   Declared `cc_multi', inferred `det'.


How to get rid of that message? When I change "cc_multi" to "det", the
warning vanishes, but then I get this error in the second module:

fis.m:105: In clause for `main1(di, uo)':
fis.m:105:   in argument 2 of call to predicate `fisactions.rec_continue'/4:
fis.m:105:   mode error: variable `V_61' has instantiatedness
fis.m:105:   `/* unique */ (pred(in, di, uo) is det)',
fis.m:105:   expected instantiatedness was `(pred(in, di, uo) is cc_multi)'.



Cheers
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20230711/6f014cbe/attachment.sig>


More information about the users mailing list