<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">I understand the problem but I just can’t figure out the solution! I am passing an accumulator, I want to add strings to it as I go (eventually), I am so far in Prolog mode, learning Mercury as I port my code and I think I have hit a learning opportunity!</div><div class=""><br class=""></div><div class="">The code (tabs here for clarity, tabbing is 4-spaces in my file):</div><div class=""><br class=""></div><font face="Courier" class="">:- pred translate(<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>list(string)::in, command_line.felt_options::in,<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>io::di, io::uo) is det.<br class=""><br class="">translate(Files, Options, !IO) :-<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>translate_(Options, Files, [], !IO).<br class=""><br class=""><br class="">:- pred translate_(<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>command_line.felt_options::in,<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>list(string)::in,<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>list(string)::out,<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>io::di, io::uo) is det.<br class=""><br class="">translate_(_, [], _Acc, !IO) :-<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>trace [<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>run_time(env("FELT_DBG")),<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>io(!Dbg)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>]<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(io.format("translate_: all done\n", [], !Dbg)).<br class=""><br class="">translate_(Options, [File|Files], Acc, !IO) :-<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>trace [<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>run_time(env("FELT_DBG")),<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>io(!Dbg)<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>]<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>(io.format("translate_: %s\n", [s(File)], !Dbg)),<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>translate_(Options, Files, Acc, !IO).</font><br class=""><br class=""><div class="">The error:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier" class="">felt.m:074: In `translate'(in, in, di, uo):</font></div><div class=""><font face="Courier" class="">felt.m:074: error: determinism declaration not satisfied.</font></div><div class=""><font face="Courier" class="">felt.m:074: Declared `det', inferred `semidet'.</font></div><div class=""><font face="Courier" class="">felt.m:084: In argument 3 of call to predicate `felt.translate_'/5:</font></div><div class=""><font face="Courier" class="">felt.m:084: unification with `V_12' can fail.</font></div><div class=""><font face="Courier" class="">felt.m:100: In clause for `translate_(in, in, out, di, uo)':</font></div><div class=""><font face="Courier" class="">felt.m:100: mode mismatch in disjunction.</font></div><div class=""><font face="Courier" class="">felt.m:100: The variable `HeadVar__3' has the following instantiation states.</font></div><div class=""><font face="Courier" class="">felt.m:093: In this branch, `HeadVar__3' has instantiatedness</font></div><div class=""><font face="Courier" class="">felt.m:093: free.</font></div><div class=""><font face="Courier" class="">felt.m:100: In this branch, `HeadVar__3' has instantiatedness</font></div><div class=""><font face="Courier" class="">felt.m:100: ground.</font></div></div><div class=""><br class=""></div><div class="">I —get— the error but I don’t know what to do!</div><div class="">Help!</div><div class=""><br class=""></div><div class="">:)</div><div class="">Sean</div><div class=""><br class=""></div></body></html>