[m-rev.] diff: Remove many io module prefixes in io.m
Julien Fischer
jfischer at opturion.com
Wed Aug 24 17:06:43 AEST 2016
Hi Paul,
On Wed, 24 Aug 2016, Paul Bone wrote:
> Remove many io module prefixes in io.m
>
> This change removes many unambiguous module prefixes. Specially those in
> the head or declaration of a predicate or function. But also those within
> bodies that are unambiguous, both for the compiler and humans.
>
> library/io.m:
> As above.
> ---
> library/io.m | 1711 +++++++++++++++++++++++++++++-----------------------------
> 1 file changed, 851 insertions(+), 860 deletions(-)
>
> diff --git a/library/io.m b/library/io.m
> index 371ca93..6066d7e 100644
> --- a/library/io.m
> +++ b/library/io.m
> @@ -112,14 +112,14 @@
> ; eof
> ; error(string, int). % error message, line number
>
> -:- type io.error. % Use error_message to decode it.
> +:- type error. % Use error_message to decode it.
Personally, I find that clearer if that's left qualified.
>
> % Poly-type is used for write_many and format,
> % which do printf-like formatting.
> %
> -:- type io.poly_type == string.poly_type.
> +:- type poly_type == string.poly_type.
Ditto with that one. Uses of that one need to be qualified in any case
(in order to avoid the ambiguity that results with string.poly_type.)
I would actually be in favour of deleting the equivalence io.poly_type/0
entirely. (That may break existing things, but only in a very minor
way.)
Julien.
More information about the reviews
mailing list