[m-rev.] trivial diff: style fixes for stream modules

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jan 10 00:02:26 AEDT 2007


Estimated hours taken: 0.1
Branches: main

library/stream.m:
library/stream.string_writer.m:
 	Fix some minor departures from our coding standard.

 	Delete some duplicate imports.

Julien.

Index: library/stream.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/stream.m,v
retrieving revision 1.4
diff -u -r1.4 stream.m
--- library/stream.m	21 Dec 2006 11:11:32 -0000	1.4
+++ library/stream.m	9 Jan 2007 12:49:35 -0000
@@ -297,6 +297,7 @@
      % put_list(Stream, Write, Sep, List, !State).
      %
      % Write all the elements List to Stream separated by Sep.
+    %
  :- pred put_list(Stream, pred(Stream, T, State, State),
      pred(Stream, State, State), list(T), State, State)
      <= stream.output(Stream, State).
Index: library/stream.string_writer.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/stream.string_writer.m,v
retrieving revision 1.2
diff -u -r1.2 stream.string_writer.m
--- library/stream.string_writer.m	5 Jan 2007 01:14:06 -0000	1.2
+++ library/stream.string_writer.m	9 Jan 2007 12:53:13 -0000
@@ -10,17 +10,21 @@
  % Authors: trd, fjh, stayl
  %
  % Predicates to write to streams that accept strings.
+%
+%-----------------------------------------------------------------------------%
  %-----------------------------------------------------------------------------%
-:- module stream.string_writer.

+:- module stream.string_writer.
  :- interface.

-:- import_module deconstruct.
-:- import_module univ.
  :- import_module char.
+:- import_module deconstruct.
+:- import_module io.
  :- import_module list.
  :- import_module string.
-:- import_module io.
+:- import_module univ.
+
+%-----------------------------------------------------------------------------%

  :- pred put_int(Stream::in, int::in, State::di, State::uo) is det
      <= stream.writer(Stream, string, State).
@@ -120,6 +124,8 @@
      stream.writer(Stream, char, State)).

  %-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
+
  :- implementation.

  :- interface.
@@ -167,17 +173,15 @@
  :- pragma type_spec(put_char/4, (Stream = io.output_stream, State = io.state)).

  %-----------------------------------------------------------------------------%
+
  :- implementation.

  :- import_module array.
  :- import_module int.
-:- import_module io.
  :- import_module require.
  :- import_module rtti_implementation.
-:- import_module string.
  :- import_module term_io.
  :- import_module type_desc.
-:- import_module univ.

  put_int(Stream, Int, !State) :-
      (

--------------------------------------------------------------------------
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