[m-users.] Confused my det/multi error message, full disjunction of type in place.
Sean Charles (emacstheviking)
objitsu at gmail.com
Sun Dec 4 23:02:58 AEDT 2022
> On 4 Dec 2022, at 10:50, Julien Fischer <jfischer at opturion.com> wrote:
>
> On Sun, 4 Dec 2022, Sean Charles (emacstheviking) wrote:
>
>> And the code, I just don't understand, as usual, what the compiler is
>> trying to tell me. The io.nl/2 <http://io.nl/2> is det, so that can't fail, and
>> presumably the field update can't fail either. And why hasn't this
>> error been raised on all the other cases?
>> 59 :- pred write_(fstate::in, fstate::out, fi::in, io::di, io::uo) is det.
>> 60
>> 61 write_(!S, nl, !IO) :-
>> 62 io.nl <http://io.nl/>(!IO),
>> 63 !:S = !.S ^nl_written := yes.
>> 64
>> 65 write_(!S, brace_o, !IO) :-
>> 66 write_(!S, s("{"), !IO),
>> 67 !:S = !.S ^tab_size := !.S ^tab_size+1.
> ^^^
>> 68 write_(!S, nl, !IO).
>
> Presuambly, the period marked above is actually supposed to be a comma.
> (Because it's a period, you have two clauses that match nl.)
Why would it be a comma? I just don't understand, "!,S" ??? That's a syntax error surely?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20221204/bdd27136/attachment-0001.html>
More information about the users
mailing list