[m-rev.] for review: delete see/seen/tell/told from io.m
Peter Wang
novalazy at gmail.com
Sat Mar 5 15:08:24 AEDT 2022
On Sat, 05 Mar 2022 13:34:17 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>
> 2022-03-05 12:26 GMT+11:00 "Peter Wang" <novalazy at gmail.com>:
> > On Sat, 05 Mar 2022 04:43:51 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> >> Set K: We could move the predicates operating in the globals to a new
> >> module globals.m, if we didn't mind the name clash with compiler/globals.m.
> >> PROPOSAL: move them to io.globals.m now
> >
> > PROPOSAL: deprecate and remove them
>
> I am not sure what you mean: deprecating a predicate is meaningful only
> if you leave it in place.
Yes, leave the predicates in place but deprecate them, and remove them
in a future release. The globals interface has been superceded by
module-level mutable variables.
> There is another issue that I came across while updating the NEWS file
> for this diff. In the section for changes to the Mercury library, we list
> all the predicates deletes and/or moved. That's fine. The question is,
> should we list them all *also* in the section for changes that may break
> compatibility, or should the entry for that section be merely something
> that points readers to the affected modules in the library section.
> The update to the NEWS file in the attached diff was the part I was
> most expecting feedback on.
> diff --git a/NEWS b/NEWS
> index 980382b94..563c4db8b 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -8,9 +8,25 @@ Changes that may break compatibility
> read_term_with_op_table/5 have been removed from the `term_io` module
> of the Mercury standard library.
>
> +* Some obsolete predicates have been removed from the `io` module;
> + see below.
> +
Removing obsolete predicates is normal and expected. I don't think
there's any need to list the modules from which obsolete predicates have
been deleted every release.
But since io.m is undergoing quite a large reorganisation, we might want
to call attention to it with something like:
Some parts of the io.m module have been separated out into
submodules. For now, forwarding predicates have been provided ..
> diff --git a/tests/hard_coded/remove_file.m b/tests/hard_coded/remove_file.m
> index 1e2e301bf..6dc3153da 100644
> --- a/tests/hard_coded/remove_file.m
> +++ b/tests/hard_coded/remove_file.m
> @@ -65,9 +67,9 @@ main(!IO) :-
> io.print_line(RemoveAgainErrorMsg, !IO)
> )
> ;
> - TellResult = io.error(TellError),
> + OpenOutputResult = io.error(OpenOutputError),
> io.print("Tell failed: ", !IO),
Update the error message if you like.
The rest is fine.
Peter
More information about the reviews
mailing list