[m-rev.] trivial diff: remove redundant promise

Julien Fischer juliensf at csse.unimelb.edu.au
Fri May 4 16:57:22 AEST 2007


Estimated hours taken: 0
Branches: main

library/univ.m:
 	Fix a copy-and-paste error:  the (in, out) mode of type_to_univ/2
 	does not need to promise that its output is unique.

library/private_builtin.m:
 	Fix a comment:  var/1 has not been use to implement type_to_univ/2
 	since 2001.

 	Fix some formatting.

Julien.

Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.166
diff -u -r1.166 private_builtin.m
--- library/private_builtin.m	13 Feb 2007 01:58:54 -0000	1.166
+++ library/private_builtin.m	4 May 2007 06:21:12 -0000
@@ -1225,7 +1225,7 @@
      % introduces calls to store_at_ref. Any other use is will cause bad things
      % to happen.
  :- type store_at_ref_type(T)
-    ---> store_at_ref_type(int).
+    --->    store_at_ref_type(int).

      % unused/0 should never be called.
      % The compiler sometimes generates references to this procedure,
@@ -1265,10 +1265,9 @@

  :- interface.

-    % var/1 is intended to make it possible to write code that effectively
-    % has different implementations for different modes (see type_to_univ
-    % in univ.m as an example). It has to be impure to ensure that
-    % reordering doesn't cause the wrong mode to be selected.
+    % var/1 is intended to make it possible to write code that effectively has
+    % different implementations for different modes.  It has to be impure to
+    % ensure that reordering doesn't cause the wrong mode to be selected.
      %
  :- impure pred var(T).
  :-    mode var(ui) is failure.
Index: library/univ.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/univ.m,v
retrieving revision 1.5
diff -u -r1.5 univ.m
--- library/univ.m	18 Jan 2007 07:33:04 -0000	1.5
+++ library/univ.m	4 May 2007 06:23:10 -0000
@@ -117,8 +117,7 @@
      Univ0 = 'new univ_cons'(T),
      unsafe_promise_unique(Univ0, Univ).
  type_to_univ(T::in, Univ::out) :-
-    Univ0 = 'new univ_cons'(T),
-    unsafe_promise_unique(Univ0, Univ).
+    Univ = 'new univ_cons'(T).
  type_to_univ(T::out, Univ::in) :-
      Univ = univ_cons(T0),
      private_builtin.typed_unify(T0, T).

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