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

Paul Bone paul at bone.id.au
Wed Sep 7 16:08:05 AEST 2016


On Wed, Sep 07, 2016 at 03:47:10PM +1000, Julien Fischer wrote:
> 
> 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.

To be fair, it's probably already the kind of thing that would be obvious to
someone who actually knows Erlang.


-- 
Paul Bone
http://paul.bone.id.au


More information about the developers mailing list