[m-rev.] diff: further library consistency improvements

Julien Fischer juliensf at csse.unimelb.edu.au
Wed May 25 12:01:27 AEST 2011


Branches: main

Further library consistency improvements.

library.term.m:
 	Change the argument ordering of the predicate create_var/3.
 	(This breaks backwards compatibility but that should be okay
 	as most code uses the varset module rather than calling this
 	directly.)

 	Fix the layout in a spot.

library/string.m:
library/type_desc.m:
 	Change predicates and functions that use a "_det" suffix in
 	their name to use a "det_" prefix as in the rest of the library
 	modules.  Deprecate the suffix versions.

library/varset.m:
 	Delete a reference to the graph module.

NEWS:
 	Announce the above changes.

library/construct.m:
library/varset.m:
library/term_to_xml.m:
compiler/passes_aux.m:
tests/hard_coded/construct_test.m:
tests/hard_coded/deep_copy.m:
tests/hard_coded/write.m:
tests/hard_coded/write_binary.m:
tests/hard_coded/write_reg1.m:
 	Conform to the above changes.

Julien.

Index: NEWS
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/NEWS,v
retrieving revision 1.576
diff -u -r1.576 NEWS
--- NEWS	24 May 2011 07:35:29 -0000	1.576
+++ NEWS	24 May 2011 17:41:06 -0000
@@ -68,7 +68,7 @@
    sparse_bitset.delete_list/3, sparse_bitset.remove/3,
    sparse_bitset.remove_list/3, sparse_bitset.remove_leq/3,
    sparse_bitset.remove_gt/3, sparse_bitset.remove_least/3,
-  tree234.set/4, tree234.remove/4, tree234.remove_smallest/4,
+  term.create_var/3, tree234.set/4, tree234.remove/4, tree234.remove_smallest/4,
    tree234.update/4, tree_bitset.insert/3, tree_bitset.insert_list/3,
    tree_bitset.delete/3, tree_bitset.delete_list/3, tree_bitset.remove/3,
    tree_bitset.remove_list/3 and tree_bitset.remove_least/3
@@ -119,9 +119,11 @@
    a future release: dir.basename_det/1, list.replace_nth_det/3,
    list.replace_nth_det/4, list.index0_det/2, list.index1_det/2,
    list.index0_det/2, list.index1_det/2, list.last_det/1, stack.top_det/1,
-  stack.pop_det/3.
+  stack.pop_det/3, string.remove_suffix_det/2, string.index_det/2,
+  string.index_det/3, string.set_char_det/3, string.set_char_det/4 and
+  type_desc.ground_pseudo_type_desc_type_to_type_desc_det/1.

-  The versions of these procedure that use "det_" as a prefix should be
+  The versions of these procedures that use "det_" as a prefix should be
    used instead.  (We have added these where they did not already exist.)

  * The deprecated modules graph, group and relation are no longer included
Index: compiler/passes_aux.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/passes_aux.m,v
retrieving revision 1.105
diff -u -r1.105 passes_aux.m
--- compiler/passes_aux.m	23 May 2011 05:08:09 -0000	1.105
+++ compiler/passes_aux.m	24 May 2011 17:35:06 -0000
@@ -605,7 +605,7 @@
          )
      ; should_dump_stage(StageNum, StageNumStr, StageName, DumpTraceStages) ->
          module_info_get_dump_hlds_base_file_name(HLDS, BaseFileName),
-        DumpFileName = string.remove_suffix_det(BaseFileName, ".hlds_dump") ++
+        DumpFileName = string.det_remove_suffix(BaseFileName, ".hlds_dump") ++
              ".trace_counts." ++ StageNumStr ++ "-" ++ StageName ++
              UserFileSuffix,
          write_out_trace_counts(DumpFileName, MaybeTraceCountsError, !IO),
Index: library/construct.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/construct.m,v
retrieving revision 1.47
diff -u -r1.47 construct.m
--- library/construct.m	20 May 2011 04:16:52 -0000	1.47
+++ library/construct.m	24 May 2011 15:50:11 -0000
@@ -549,7 +549,7 @@
      Num0 >= 0,
      Num = Num0 - 1,
      ( get_functor(TypeInfo, Num, Functor, Arity, ArgPseudoTypes) ->
-        ArgTypes = list.map(ground_pseudo_type_desc_to_type_desc_det,
+        ArgTypes = list.map(det_ground_pseudo_type_desc_to_type_desc,
              ArgPseudoTypes),
          FunctorNumber = Num
      ;
Index: library/string.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/string.m,v
retrieving revision 1.309
diff -u -r1.309 string.m
--- library/string.m	20 May 2011 04:16:52 -0000	1.309
+++ library/string.m	24 May 2011 17:29:26 -0000
@@ -142,10 +142,15 @@
      %
  :- pred string.remove_suffix(string::in, string::in, string::out) is semidet.

-    % string.remove_suffix_det(String, Suffix) returns the same value
+    % string.det_remove_suffix(String, Suffix) returns the same value
      % as string.remove_suffix, except it aborts if String does not end
      % with Suffix.
      %
+:- func string.det_remove_suffix(string, string) = string.
+
+    % An obsolete synonym for the above.
+    %
+:- pragma obsolete(string.remove_suffix_det/2).
  :- func string.remove_suffix_det(string, string) = string.

      % string.remove_suffix_if_present(Suffix, String) returns `String' minus
@@ -492,18 +497,23 @@
      %
  :- pred string.index(string::in, int::in, char::uo) is semidet.

-    % string.index_det(String, Index, Char):
+    % string.det_index(String, Index, Char):
      % `Char' is the character (code point) in `String', beginning at the
      % code unit `Index'.
      % Calls error/1 if `Index' is out of range (negative, or greater than
      % or equal to the length of `String'), or if an illegal sequence is
      % detected.
      %
+:- func string.det_index(string, int) = char.
+:- pred string.det_index(string::in, int::in, char::uo) is det.
+
+:- pragma obsolete(string.index_det/2).
  :- func string.index_det(string, int) = char.
+:- pragma obsolete(string.index_det/3).
  :- pred string.index_det(string::in, int::in, char::uo) is det.

-    % A synonym for index_det/2:
-    % String ^ elem(Index) = string.index_det(String, Index).
+    % A synonym for det_index/2:
+    % String ^ elem(Index) = string.det_index(String, Index).
      %
  :- func string ^ elem(int) = char.

@@ -512,7 +522,7 @@
      % code unit `Index'.
      % WARNING: behavior is UNDEFINED if `Index' is out of range
      % (negative, or greater than or equal to the length of `String').
-    % This version is constant time, whereas string.index_det
+    % This version is constant time, whereas string.det_index
      % may be linear in the length of the string. Use with care!
      %
  :- func string.unsafe_index(string, int) = char.
@@ -625,25 +635,33 @@
  % strings into static data even when they might be updated.
  %:- mode string.set_char(in, in, di, uo) is semidet.

-    % string.set_char_det(Char, Index, String0, String):
+    % string.det_set_char(Char, Index, String0, String):
      % `String' is `String0', with the code point beginning at code unit
      % `Index' removed and replaced by `Char'.
      % Calls error/1 if `Index' is out of range (negative, or greater than
      % or equal to the length of `String0').
      %
+:- func string.det_set_char(char, int, string) = string.
+:- pred string.det_set_char(char, int, string, string).
+:- mode string.det_set_char(in, in, in, out) is det.
+% XXX This mode is disabled because the compiler puts constant
+% strings into static data even when they might be updated.
+%:- mode string.det_set_char(in, in, di, uo) is det.
+
+    % Deperecated synonyms for the above.
+    %
+:- pragma obsolete(string.set_char_det/3).
  :- func string.set_char_det(char, int, string) = string.
+:- pragma obsolete(string.set_char_det/4).
  :- pred string.set_char_det(char, int, string, string).
  :- mode string.set_char_det(in, in, in, out) is det.
-% XXX This mode is disabled because the compiler puts constant
-% strings into static data even when they might be updated.
-%:- mode string.set_char_det(in, in, di, uo) is det.

      % string.unsafe_set_char(Char, Index, String0, String):
      % `String' is `String0', with the code point beginning at code unit
      % `Index' removed and replaced by `Char'.
      % WARNING: behavior is UNDEFINED if `Index' is out of range
      % (negative, or greater than or equal to the length of `String0').
-    % This version is constant time, whereas string.set_char_det
+    % This version is constant time, whereas string.det_set_char
      % may be linear in the length of the string. Use with care!
      %
  :- func string.unsafe_set_char(char, int, string) = string.
@@ -1135,25 +1153,31 @@
      N = (Base * N0) - M,
      ( N =< N0 ; Base \= 10 ).       % Fail on underflow for base 10 numbers.

-% It is important to inline string.index and string.index_det.
+% It is important to inline string.index and string.det_index.
  % so that the compiler can do loop invariant hoisting
  % on calls to string.length that occur in loops.
-:- pragma inline(string.index_det/3).
+:- pragma inline(string.det_index/3).

  string.index_det(String, Int, Char) :-
+    string.det_index(String, Int, Char).
+
+string.det_index(String, Int, Char) :-
      ( string.index(String, Int, Char0) ->
          Char = Char0
      ;
-        error("string.index_det: index out of range")
+        error("string.det_index: index out of range")
      ).

-String ^ elem(Index) = index_det(String, Index).
+String ^ elem(Index) = det_index(String, Index).
+
+string.set_char_det(Char, Int, !String) :-
+    string.det_set_char(Char, Int, !String).

-string.set_char_det(Char, Int, String0, String) :-
+string.det_set_char(Char, Int, String0, String) :-
      ( string.set_char(Char, Int, String0, String1) ->
          String = String1
      ;
-        error("string.set_char_det: index out of range")
+        error("string.det_set_char: index out of range")
      ).

  string.foldl(Closure, String, !Acc) :-
@@ -1294,11 +1318,14 @@
      string.suffix(String, Suffix),
      string.left(String, length(String) - length(Suffix), StringWithoutSuffix).

-string.remove_suffix_det(String, Suffix) = StringWithoutSuffix :-
+string.remove_suffix_det(String, Suffix) =
+    string.det_remove_suffix(String, Suffix).
+
+string.det_remove_suffix(String, Suffix) = StringWithoutSuffix :-
      ( string.remove_suffix(String, Suffix, StringWithoutSuffixPrime) ->
          StringWithoutSuffix = StringWithoutSuffixPrime
      ;
-        error("string.remove_suffix_det: string does not have given suffix")
+        error("string.det_remove_suffix: string does not have given suffix")
      ).

  string.remove_suffix_if_present(Suffix, String) = Out :-
@@ -3950,7 +3977,7 @@
          PrecMantissaStr = MantissaStr
      ; Prec < FracStrLen ->
          UnroundedFrac = string.substring(FractionStr, 0, Prec),
-        NextDigit = string.index_det(FractionStr, Prec),
+        NextDigit = string.det_index(FractionStr, Prec),
          (
              UnroundedFrac \= "",
              (char.to_int(NextDigit) - char.to_int('0')) >= 5
@@ -4338,7 +4365,7 @@

  /*-----------------------------------------------------------------------*/

-% It's important to inline string.index and string.index_det.
+% It's important to inline string.index and string.det_index.
  % so that the compiler can do loop invariant hoisting
  % on calls to string.length that occur in loops.
  :- pragma inline(string.index/3).
@@ -5961,14 +5988,19 @@
  string.duplicate_char(C, N) = S :-
      string.duplicate_char(C, N, S).

-string.index_det(S, N) = C :-
-    string.index_det(S, N, C).
+string.index_det(S, N) = string.det_index(S, N).
+
+string.det_index(S, N) = C :-
+    string.det_index(S, N, C).

  string.unsafe_index(S, N) = C :-
      string.unsafe_index(S, N, C).

-string.set_char_det(C, N, S0) = S :-
-    string.set_char_det(C, N, S0, S).
+string.set_char_det(C, N, S0) =
+    string.det_set_char(C, N, S0).
+
+string.det_set_char(C, N, S0) = S :-
+    string.det_set_char(C, N, S0, S).

  string.unsafe_set_char(C, N, S0) = S :-
      string.unsafe_set_char(C, N, S0, S).
Index: library/term.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/term.m,v
retrieving revision 1.134
diff -u -r1.134 term.m
--- library/term.m	23 May 2011 14:36:10 -0000	1.134
+++ library/term.m	24 May 2011 16:35:29 -0000
@@ -357,8 +357,7 @@
      % create_var(VarSupply0, Variable, VarSupply):
      % Create a fresh variable (var) and return the updated var_supply.
      %
-:- pred create_var(var_supply(T), var(T), var_supply(T)).
-:- mode create_var(in, out, out) is det.
+:- pred create_var(var(T)::out, var_supply(T)::in, var_supply(T)::out) is det.

      % var_id(Variable):
      % Returns a unique number associated with this variable w.r.t.
@@ -692,7 +691,8 @@

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

-type_to_term(Val, Term) :- type_to_univ(Val, Univ),
+type_to_term(Val, Term) :-
+    type_to_univ(Val, Univ),
      univ_to_term(Univ, Term).

  univ_to_term(Univ, Term) :-
@@ -1108,7 +1108,7 @@

  init_var_supply(var_supply(0)).

-create_var(var_supply(V0), var(V), var_supply(V)) :-
+create_var(var(V), var_supply(V0), var_supply(V)) :-
      % We number variables using sequential numbers.
      V = V0 + 1.

Index: library/term_to_xml.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/term_to_xml.m,v
retrieving revision 1.22
diff -u -r1.22 term_to_xml.m
--- library/term_to_xml.m	3 May 2011 04:35:01 -0000	1.22
+++ library/term_to_xml.m	24 May 2011 16:08:25 -0000
@@ -1322,7 +1322,7 @@
              get_elements_and_args(MakeElement, TypeDesc,
                  [RootElement], [_], [_], [PseudoArgTypes], _)
          ->
-            ArgTypes = list.map(ground_pseudo_type_desc_to_type_desc_det,
+            ArgTypes = list.map(det_ground_pseudo_type_desc_to_type_desc,
                  PseudoArgTypes),
              put(Stream, "<!DOCTYPE ", !State),
              put(Stream, RootElement, !State),
@@ -1526,7 +1526,7 @@
          MaybeFunctors, MaybeArities, ArgPseudoTypeLists,
          AttributeLists),
      ArgTypeLists = list.map(list.map(
-        ground_pseudo_type_desc_to_type_desc_det), ArgPseudoTypeLists),
+        det_ground_pseudo_type_desc_to_type_desc), ArgPseudoTypeLists),
      list.condense(ArgTypeLists, ChildArgTypes),
      put(Stream, "<!-- Elements for functors of type """, !State),
      write_xml_escaped_string(Stream, type_name(TypeDesc), !State),
Index: library/type_desc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/type_desc.m,v
retrieving revision 1.71
diff -u -r1.71 type_desc.m
--- library/type_desc.m	2 Jan 2011 17:24:42 -0000	1.71
+++ library/type_desc.m	24 May 2011 17:18:10 -0000
@@ -67,8 +67,12 @@
      % Convert a pseudo_type_desc describing a ground type to a type_desc.
      % If the pseudo_type_desc describes a non-ground type, abort.
      %
-:- func ground_pseudo_type_desc_to_type_desc_det(pseudo_type_desc) = type_desc
-    is det.
+:- func det_ground_pseudo_type_desc_to_type_desc(pseudo_type_desc) = type_desc.
+
+    % An obsolete synonym for the above.
+    %
+:- pragma obsolete(ground_pseudo_type_desc_to_type_desc_det/1).
+:- func ground_pseudo_type_desc_to_type_desc_det(pseudo_type_desc) = type_desc.

      % The function type_of/1 returns a representation of the type
      % of its argument.
@@ -445,11 +449,14 @@
          fail
      ).

-ground_pseudo_type_desc_to_type_desc_det(PseudoTypeDesc) = TypeDesc :-
+ground_pseudo_type_desc_to_type_desc_det(PseudoTypeDesc) =
+    det_ground_pseudo_type_desc_to_type_desc(PseudoTypeDesc).
+
+det_ground_pseudo_type_desc_to_type_desc(PseudoTypeDesc) = TypeDesc :-
      ( pseudo_type_desc_is_ground(PseudoTypeDesc) ->
          private_builtin.unsafe_type_cast(PseudoTypeDesc, TypeDesc)
      ;
-        error("ground_pseudo_type_desc_to_type_desc_det: not ground")
+        error("det_ground_pseudo_type_desc_to_type_desc: not ground")
      ).

  :- pragma foreign_proc("C",
Index: library/varset.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/varset.m,v
retrieving revision 1.89
diff -u -r1.89 varset.m
--- library/varset.m	6 May 2011 05:03:28 -0000	1.89
+++ library/varset.m	24 May 2011 16:34:00 -0000
@@ -19,11 +19,11 @@
  % Associated with each variable there can be both a name and a value
  % (binding).
  %
-% There may be some design flaws in the relationship between varset.m,
-% term.m, and graph.m.  Once we have implemented unique modes and
-% destructive assignment, we will need to rethink the design;  we may
-% end up modifying these modules considerably, or we may end up
-% making new single-threaded versions of these modules.
+% There may be some design flaws in the relationship between varset.m, and
+% term.m.  Once we have implemented unique modes and destructive assignment, we
+% will need to rethink the design;  we may end up modifying these modules
+% considerably, or we may end up making new single-threaded versions of these
+% modules.
  %
  %-----------------------------------------------------------------------------%
  %-----------------------------------------------------------------------------%
@@ -303,23 +303,23 @@

  varset.new_var(Var, !VarSet) :-
      MaxId0 = !.VarSet ^ var_supply,
-    term.create_var(MaxId0, Var, MaxId),
+    term.create_var(Var, MaxId0, MaxId),
      !VarSet ^ var_supply := MaxId.

  varset.new_named_var(Name, Var,
          varset(!.MaxId, !.Names, Values), varset(!:MaxId, !:Names, Values)) :-
-    term.create_var(!.MaxId, Var, !:MaxId),
+    term.create_var(Var, !MaxId),
      map.set(Var, Name, !Names).

  varset.new_uniquely_named_var(Name, Var,
          varset(!.MaxId, !.Names, Values), varset(!:MaxId, !:Names, Values)) :-
-    term.create_var(!.MaxId, Var, !:MaxId),
+    term.create_var(Var, !MaxId),
      N = term.var_id(Var),
      map.set(Var, string.format("%s_%d", [s(Name), i(N)]), !Names).

  varset.new_maybe_named_var(MaybeName, Var,
          varset(!.MaxId, !.Names, Values), varset(!:MaxId, !:Names, Values)) :-
-    term.create_var(!.MaxId, Var, !:MaxId),
+    term.create_var(Var, !MaxId),
      (
          MaybeName = no
      ;
@@ -375,8 +375,8 @@
      ( N = Max ->
          RevVars = RevVars0
      ;
-        term.create_var(N, Var, N1),
-        RevVars = varset.vars_2(N1, Max, [Var | RevVars0])
+        term.create_var(Var, N, NPrime),
+        RevVars = varset.vars_2(NPrime, Max, [Var | RevVars0])
      ).

  %-----------------------------------------------------------------------------%
@@ -487,8 +487,8 @@
      ( !.SupplyB = MaxSupplyB ->
          true
      ;
-        term.create_var(!.Supply, Var, !:Supply),
-        term.create_var(!.SupplyB, VarB, !:SupplyB),
+        term.create_var(Var, !Supply),
+        term.create_var(VarB, !SupplyB),
          ( map.search(NamesB, VarB, NameB) ->
              map.det_insert(Var, NameB, !Names)
          ;
@@ -516,8 +516,8 @@
      ( !.SupplyB = MaxSupplyB ->
          true
      ;
-        term.create_var(!.Supply, Var, !:Supply),
-        term.create_var(!.SupplyB, VarB, !:SupplyB),
+        term.create_var(Var, !Supply),
+        term.create_var(VarB, !SupplyB),
          map.det_insert(VarB, Var, !Subst),
          varset.merge_renaming_without_names_2(!.SupplyB, MaxSupplyB,
              !Supply, !Subst)
@@ -548,8 +548,8 @@
      ( !.SupplyB = MaxSupplyB ->
          true
      ;
-        term.create_var(!.Supply, Var, !:Supply),
-        term.create_var(!.SupplyB, VarB, !:SupplyB),
+        term.create_var(Var, !Supply),
+        term.create_var(VarB, !SupplyB),
          ( map.search(NamesB, VarB, NameB) ->
              map.det_insert(Var, NameB, !Names)
          ;
@@ -578,8 +578,8 @@
      ( !.SupplyB = MaxSupplyB ->
          true
      ;
-        term.create_var(!.Supply, Var, !:Supply),
-        term.create_var(!.SupplyB, VarB, !:SupplyB),
+        term.create_var(Var, !Supply),
+        term.create_var(VarB, !SupplyB),
          Replacement = term.variable(Var, context_init),
          map.det_insert(VarB, Replacement, !Subst),
          varset.merge_subst_without_names_2(!.SupplyB, MaxSupplyB,
Index: tests/hard_coded/construct_test.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/construct_test.m,v
retrieving revision 1.7
diff -u -r1.7 construct_test.m
--- tests/hard_coded/construct_test.m	30 Aug 2007 05:46:02 -0000	1.7
+++ tests/hard_coded/construct_test.m	25 May 2011 01:43:30 -0000
@@ -300,7 +300,7 @@
  test_other -->
  	io__write_string("TESTING OTHER TYPES\n"),
  	{ term__init_var_supply(VarSupply) },
-	{ term__create_var(VarSupply, Var, NewVarSupply) },
+	{ term__create_var(Var, VarSupply, NewVarSupply) },
  	test_all(Var), newline,
  	test_all(VarSupply), newline,
  	test_all(NewVarSupply), newline,
Index: tests/hard_coded/deep_copy.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/deep_copy.m,v
retrieving revision 1.4
diff -u -r1.4 deep_copy.m
--- tests/hard_coded/deep_copy.m	29 Mar 2006 08:07:59 -0000	1.4
+++ tests/hard_coded/deep_copy.m	24 May 2011 23:05:08 -0000
@@ -219,7 +219,7 @@
  test_other -->
  	io__write_string("TESTING OTHER TYPES\n"),
  	{ term__init_var_supply(VarSupply) },
-	{ term__create_var(VarSupply, Var, NewVarSupply) },
+	{ term__create_var(Var, VarSupply, NewVarSupply) },
  	test_all(Var),
  	test_all(VarSupply),
  	test_all(NewVarSupply),
Index: tests/hard_coded/expand.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/expand.m,v
retrieving revision 1.9
diff -u -r1.9 expand.m
--- tests/hard_coded/expand.m	5 Jan 2007 02:19:45 -0000	1.9
+++ tests/hard_coded/expand.m	25 May 2011 01:44:01 -0000
@@ -199,7 +199,7 @@
  test_other -->
  	io.write_string("TESTING OTHER TYPES\n"),
  	{ term.init_var_supply(VarSupply) },
-	{ term.create_var(VarSupply, Var, NewVarSupply) },
+	{ term.create_var(Var, VarSupply, NewVarSupply) },
  	test_all(Var), newline,
  	test_all(VarSupply), newline,
  	test_all(NewVarSupply), newline,
Index: tests/hard_coded/write.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/write.m,v
retrieving revision 1.9
diff -u -r1.9 write.m
--- tests/hard_coded/write.m	20 May 2011 16:54:30 -0000	1.9
+++ tests/hard_coded/write.m	25 May 2011 01:44:30 -0000
@@ -139,7 +139,7 @@
  test_other -->
  	io__write_string("TESTING OTHER TYPES\n"),
  	{ term__init_var_supply(VarSupply) },
-	{ term__create_var(VarSupply, Var, NewVarSupply) },
+	{ term__create_var(Var, VarSupply, NewVarSupply) },
  	io__write(Var), newline,
  	io__write(VarSupply), newline,
  	io__write(NewVarSupply), newline,
Index: tests/hard_coded/write_binary.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/write_binary.m,v
retrieving revision 1.4
diff -u -r1.4 write_binary.m
--- tests/hard_coded/write_binary.m	12 Sep 2005 09:02:29 -0000	1.4
+++ tests/hard_coded/write_binary.m	25 May 2011 01:45:07 -0000
@@ -143,7 +143,7 @@
  test_other -->
  	io__write_string("TESTING OTHER TYPES\n"),
  	{ term__init_var_supply(VarSupply `with_type` var_supply(generic)) },
-	{ term__create_var(VarSupply, Var, NewVarSupply) },
+	{ term__create_var(Var, VarSupply, NewVarSupply) },
  	do_test(Var),
  	do_test(VarSupply),
  	do_test(NewVarSupply),
Index: tests/hard_coded/write_reg1.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/write_reg1.m,v
retrieving revision 1.3
diff -u -r1.3 write_reg1.m
--- tests/hard_coded/write_reg1.m	29 Mar 2006 08:08:02 -0000	1.3
+++ tests/hard_coded/write_reg1.m	25 May 2011 01:45:39 -0000
@@ -121,7 +121,7 @@
  test_other -->
  	io__write_string("TESTING OTHER TYPES\n"),
  	{ term__init_var_supply(VarSupply) },
-	{ term__create_var(VarSupply, Var, NewVarSupply) },
+	{ term__create_var(Var, VarSupply, NewVarSupply) },
  	io__write(Var), newline,
  	io__write(VarSupply), newline,
  	io__write(NewVarSupply), newline,

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