mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
Add io.write_line_cc/4.
library/io.m:
Add a version of io.write_line_cc that takes an explicit stream argument.
NEWS:
Announce the addition.
browser/interactive_query.m:
Use the new predicate.
This commit is contained in:
3
NEWS
3
NEWS
@@ -124,6 +124,9 @@ Changes to the Mercury standard library
|
||||
|
||||
### Changes to the `io` module
|
||||
|
||||
* The following predicate has been added to this module:
|
||||
- pred `write_line_cc/4`
|
||||
|
||||
* The following obsolete predicates have been removed:
|
||||
|
||||
- pred `make_temp/3` (replacement: `make_temp_file/3`)
|
||||
|
||||
@@ -940,8 +940,7 @@ write_binding(OutputStream, Bindings, Output, !IO) :-
|
||||
|
||||
report_exception(OutputStream, Excp, !IO) :-
|
||||
io.write_string(OutputStream, "*** caught exception: ", !IO),
|
||||
io.write_cc(OutputStream, Excp, !IO),
|
||||
io.nl(OutputStream, !IO).
|
||||
io.write_line_cc(OutputStream, Excp, !IO).
|
||||
|
||||
%---------------------------------------------------------------------------%
|
||||
%
|
||||
|
||||
@@ -1183,6 +1183,8 @@
|
||||
:- mode write_line(in, in, in, di, uo) is cc_multi.
|
||||
|
||||
:- pred write_line_cc(T::in, io::di, io::uo) is cc_multi.
|
||||
:- pred write_line_cc(io.text_output_stream::in, T::in, io::di, io::uo)
|
||||
is cc_multi.
|
||||
|
||||
% Writes a binary representation of a term to the current binary output
|
||||
% stream or to the specified stream, in a format suitable for reading in
|
||||
@@ -8848,6 +8850,10 @@ write_line_cc(X, !IO) :-
|
||||
io.write_cc(X, !IO),
|
||||
io.nl(!IO).
|
||||
|
||||
write_line_cc(Stream, X, !IO) :-
|
||||
io.write_cc(Stream, X, !IO),
|
||||
io.nl(Stream, !IO).
|
||||
|
||||
%---------------------%
|
||||
|
||||
write_binary(Term, !IO) :-
|
||||
|
||||
Reference in New Issue
Block a user