[m-rev.] diff: address old XXX comments in library

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jan 4 01:08:27 AEDT 2012


Branches: main

Address some old XXXs in the library.

library/term.m:
 	Delete an ancient comment regarding the choice of type
 	qualification operator; it's been ':' for quite some time
 	now.

library/ops.m:
 	Not being able to modify the table of Mercury operators
 	is a good thing, not an XXX.

library/term_io.m:
 	Delete an ancient comment regarding user-defined operators
 	for the term parser being NYI.  We aren't likely to ever
 	implement them in the way described in the comment since
 	the op_table/1 type class provides an alternative way
 	of dealing with the problem.

 	Delete a comment in the interface that says we are
 	in the interface.  For the source code this is obvious,
 	it occurs directly below the interface declaration
 	and for the library reference manual it is redundant clutter
 	since everyting in the manual is an interface.

Julien.

Index: library/ops.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/ops.m,v
retrieving revision 1.73
diff -u -r1.73 ops.m
--- library/ops.m	29 Dec 2010 04:52:21 -0000	1.73
+++ library/ops.m	3 Jan 2012 13:03:29 -0000
@@ -18,9 +18,6 @@
  % Mercury operator table defined in the Mercury Language Reference Manual.
  %
  % See samples/calculator2.m for an example program.
-%
-% XXX In the current implementation the table of Mercury operators
-% is fixed and cannot be modified at run-time.
  %
  %-----------------------------------------------------------------------------%
  %-----------------------------------------------------------------------------%
Index: library/term.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/term.m,v
retrieving revision 1.136
diff -u -r1.136 term.m
--- library/term.m	25 Jul 2011 07:54:21 -0000	1.136
+++ library/term.m	3 Jan 2012 13:58:05 -0000
@@ -745,9 +745,7 @@
  univ_to_term_special_case("univ", "univ", [], Univ, Context, Term) :-
      det_univ_to_type(Univ, NestedUniv),
      Term = functor(atom("univ"),
-        % XXX what operator should we use for type qualification?
-        [functor(atom(":"),  % TYPE_QUAL_OP
-            [ValueTerm, TypeTerm], Context)], Context),
+        [functor(atom(":"), [ValueTerm, TypeTerm], Context)], Context),
      type_info_to_term(Context, univ_type(NestedUniv), TypeTerm),
      NestedUnivValue = univ_value(NestedUniv),
      type_to_term(NestedUnivValue, ValueTerm).
Index: library/term_io.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/term_io.m,v
retrieving revision 1.90
diff -u -r1.90 term_io.m
--- library/term_io.m	17 May 2011 05:37:30 -0000	1.90
+++ library/term_io.m	3 Jan 2012 12:32:07 -0000
@@ -29,23 +29,6 @@

  %-----------------------------------------------------------------------------%

-% External interface: exported predicates
-
-% The following are not yet implemented.
-%
-% :- type op_type ---> fx; fy; xf; yf; xfx; xfy; yfx; fxx; fxy; fyx; fyy.
-%
-%   % term_io.op(Prec, Type, OpName, !IO):
-%   % Define an operator as per Prolog op/3 for future calls
-%   % to term_io.read_term.
-% :- pred term_io.op(int::in, op_type::in, string::in, io::di, io::uo) is det.
-%
-% :- type op_details ---> op(int, op_type, string).
-%
-%   % Return a list containing all the current operator definitions.
-%   % Does not modify the io.state.
-% :- pred term_io.current_ops(list(op_details)::out, io::di, io::uo) is det.
-
  :- type read_term(T)
      --->    eof
      ;       error(string, int)

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