[m-users.] A predicate taking a lists of predicates as input?
Anders Lundstedt
mercury-users at anderslundstedt.se
Thu Sep 25 01:32:05 AEST 2025
Thanks everyone for the help! Now another, related, issue.
Using as input to ? a DCG rule that is not semidet, for example one
constructed with ? itself gives a compilation error. I think this is
due to the following:
:- inst ta_rule == (pred(in, out) is semidet).
Here is an example of a problematic DCG rule:
% gives compilation error, but not if the both the determinism of ? and of
% this predicate is changed to semidet, in which case we get warnings about
% too loose determinism for ?
:- pred test_1(list(char)::in, list(char)::out) is det.
test_1 --> ?([['a'], ?([['b']])]).
Again, any advice greatly appreciated!
Best,
Anders
More information about the users
mailing list