[m-rev.] diff: minor changes in extras/stream

Peter Wang wangp at students.csse.unimelb.edu.au
Thu Mar 29 16:12:18 AEST 2007


extras/stream/stream_util.string_builder.m:
        Replace a use of string.join_list by string.append_list.

extras/stream/tests/stream_util_test.m:
        stream.format is now stream.string_writer.format.

extras/stream/tests/.nocopyright:
        Add this.

Index: stream_util.string_builder.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/stream/stream_util.string_builder.m,v
retrieving revision 1.1
diff -u -r1.1 stream_util.string_builder.m
--- stream_util.string_builder.m        5 Dec 2006 03:12:06 -0000       1.1
+++ stream_util.string_builder.m        29 Mar 2007 06:06:10 -0000
@@ -1,7 +1,7 @@
 %-----------------------------------------------------------------------------%
 % vim: ft=mercury ts=4 sw=4 et
 %-----------------------------------------------------------------------------%
-% Copyright (C) 2006 The University of Melbourne.
+% Copyright (C) 2006-2007 The University of Melbourne.
 % This file may only be copied under the terms of the GNU Library General
 % Public License - see the file COPYING.LIB in the Mercury distribution.
 %-----------------------------------------------------------------------------%
@@ -84,4 +84,4 @@

 string_builder_state_to_string(State) = String :-
     State = string_builder_state(StringList),
-    String = string.join_list("", list.reverse(StringList)).
+    String = string.append_list(list.reverse(StringList)).
Index: tests/.nocopyright
===================================================================
RCS file: tests/.nocopyright
diff -N tests/.nocopyright
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/.nocopyright  29 Mar 2007 06:06:10 -0000
@@ -0,0 +1 @@
+stream_util_test.m
Index: tests/stream_util_test.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/stream/tests/stream_util_test.m,v
retrieving revision 1.1
diff -u -r1.1 stream_util_test.m
--- tests/stream_util_test.m    5 Dec 2006 03:12:07 -0000       1.1
+++ tests/stream_util_test.m    29 Mar 2007 06:06:10 -0000
@@ -14,6 +14,7 @@
 :- import_module list.
 :- import_module pprint.
 :- import_module stream.
+:- import_module stream.string_writer.
 :- import_module stream_util.
 :- import_module stream_util.string_builder.
 :- import_module string.
@@ -32,8 +33,7 @@
         pprint.write(Stream, 0, to_doc([4, 5, 6]),
             !State),
         put(Stream, "\n", !State),
-        stream.format(Stream, "%.2f", [f(3.14)],
-            !State),
+        string_writer.format(Stream, "%.2f", [f(3.14)], !State),
         put(Stream, "\n", !State),
         String = string_builder_state_to_string(!.State),
         io.write_string(String, !IO)
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list