[m-dev.] Help required with Erlang: Address review comments

Julien Fischer jfischer at opturion.com
Wed Sep 7 15:47:10 AEST 2016


On Wed, 7 Sep 2016, Paul Bone wrote:

> On Wed, Sep 07, 2016 at 02:52:11PM +1000, Julien Fischer wrote:
>>
>>
>> On Wed, 7 Sep 2016, Paul Bone wrote:
>>
>>> Address review comments
>>>
>>> library/io.m:
>>>   As above.
>>> ---
>>> library/io.m | 150 ++++++++++++++++++++++++++++++++++++-----------------------
>>> 1 file changed, 91 insertions(+), 59 deletions(-)
>>>
>>> :- pragma foreign_proc("Erlang",
>>> -    do_open_binary(FileName::in, Mode::in, ResultCode::out,
>>> +    do_open_binary(FileName::in, Mode::in, Result::out,
>>>        StreamId::out, Stream::out, _IO0::di, _IO::uo),
>>>    [will_not_call_mercury, promise_pure, tabled_for_io, thread_safe],
>>> "
>>> @@ -9814,12 +9846,12 @@ set_binary_output_stream(binary_output_stream(NewStream),
>>>    case mercury__io:mercury_open_stream(FileNameStr, ModeStr) of
>>>        {ok, Stream} ->
>>>            {'ML_stream', StreamId, _Pid} = Stream,
>>> -            ResultCode = 0;
>>> +            Result = ok;
>>
>> Isn't it just:
>>
>>    Result = {ok};
>>
>> etc?  (That is at least, what the reference manual section on Erlang
>> data passing conventions suggests that it is.)
>
> Doh! that was it.

I'll adjust the reference manual to it a litle more obvious.

Julien.


More information about the developers mailing list