[m-rev.] for review: remove reader instance

Ian MacLarty maclarty at csse.unimelb.edu.au
Thu Mar 29 15:26:46 AEST 2007


library/io.m:
	Remove the instance of stream.reader that reads strings
	from io.output_stream.  This instance is only in the
	implementation section of io.m.

	The prefered way to read lines from a stream is to
	define a line type and make this the unit that is read.

Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.377
diff -u -r1.377 io.m
--- library/io.m	21 Mar 2007 22:30:24 -0000	1.377
+++ library/io.m	29 Mar 2007 05:10:30 -0000
@@ -9073,15 +9073,6 @@
     )
 ].
 
-:- instance stream.reader(io.input_stream, string, io, io.error) 
-    where
-[
-    ( get(Stream, Result, !IO) :-
-        io.read_line_as_string(Stream, Result0, !IO),
-        Result = io.result_to_stream_result(Result0)
-    )
-].
-    
 :- instance stream.putback(io.input_stream, char, io, io.error) where
 [
     pred(unget/4) is io.putback_char
--------------------------------------------------------------------------
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