[m-rev.] diff: fix a bug in io.print_line/{4,5}

Julien Fischer jfischer at opturion.com
Mon Dec 22 10:52:09 AEDT 2014


Fix a bug in io.print_line/{4,5}.

library/io.m:
     In the above predicates, the trailing newline should
     be written to the specified stream, not the standard
     output.

Julien.

diff --git a/library/io.m b/library/io.m
index f42147e..8ff2c3a 100644
--- a/library/io.m
+++ b/library/io.m
@@ -4827,11 +4827,11 @@ io.print_line(Term, !IO) :-

  io.print_line(Stream, Term, !IO) :-
      io.print(Stream, Term, !IO),
-    io.nl(!IO).
+    io.nl(Stream, !IO).

  io.print_line(Stream, NonCanon, Term, !IO) :-
      io.print(Stream, NonCanon, Term, !IO),
-    io.nl(!IO).
+    io.nl(Stream, !IO).

  io.print_line_cc(Term, !IO) :-
      io.print_cc(Term, !IO),



More information about the reviews mailing list