[m-rev.] diff: delete obsolete procedures and modules from stdlib
Julien Fischer
jfischer at opturion.com
Thu May 16 17:47:50 AEST 2013
Delete obsolete procedures and modules from the standard library.
library/array.m:
library/array2d.m:
library/bitmap.m:
library/store.m:
library/thread.semaphore.m:
library/version_array2d.m:
library/version_bitmap.m:
library/version_hash_table.m:
library/version_store.m:
Delete predicates that were deprecated in Mercury 13.05 and before.
library/version_array.m
Delete the deprecated function new/2.
Deprecate unsafe_new/2 and unsafe_init/2 to replace it.
(We had overlooked this previously.)
library/string.m:
Delete the deprecated function set_char_char/3.
(We will leave the other deprecated procedures in this module
for at least another release.)
library/svlist.m:
library/svpqueue.m:
library/svstack.m:
Delete these modules: they were only ever needed as a transitional
mechanism.
library/library.m:
Conform to the above changes.
doc/Mmakefile:
Unrelated change: delete references to files that have been
deleted since we moved to git.
tests/hard_coded/*/*.m
tests/tabling/*.m:
Update test cases where they made use of predicates that have
now been deleted from the standard library.
Julien.
diff --git a/doc/Mmakefile b/doc/Mmakefile
index 1c957e0..4700857 100644
--- a/doc/Mmakefile
+++ b/doc/Mmakefile
@@ -246,18 +246,10 @@ library-menu.texi_pp: ../VERSION $(LIBRARY_DIR)/*.m
case $$filename in \
$(LIBRARY_DIR)/backjump.m) \
;; \
- $(LIBRARY_DIR)/bintree.m) \
- ;; \
- $(LIBRARY_DIR)/bintree_set.m) \
- ;; \
$(LIBRARY_DIR)/erlang_conf.m) \
;; \
$(LIBRARY_DIR)/erlang_rtti_implementation.m) \
;; \
- $(LIBRARY_DIR)/graph.m) \
- ;; \
- $(LIBRARY_DIR)/group.m) \
- ;; \
$(LIBRARY_DIR)/mer_std.m) \
;; \
$(LIBRARY_DIR)/mutvar.m) \
@@ -278,8 +270,6 @@ library-menu.texi_pp: ../VERSION $(LIBRARY_DIR)/*.m
;; \
$(LIBRARY_DIR)/stm_builtin.m) \
;; \
- $(LIBRARY_DIR)/svrelation.m) \
- ;; \
$(LIBRARY_DIR)/table_builtin.m) \
;; \
$(LIBRARY_DIR)/term_size_prof_builtin.m) \
@@ -298,18 +288,10 @@ library-chapters.texi_pp: ../VERSION
$(LIBRARY_DIR)/[a-z]*.m
case $$filename in \
$(LIBRARY_DIR)/backjump.m) \
;; \
- $(LIBRARY_DIR)/bintree.m) \
- ;; \
- $(LIBRARY_DIR)/bintree_set.m) \
- ;; \
$(LIBRARY_DIR)/erlang_conf.m) \
;; \
$(LIBRARY_DIR)/erlang_rtti_implementation.m) \
;; \
- $(LIBRARY_DIR)/graph.m) \
- ;; \
- $(LIBRARY_DIR)/group.m) \
- ;; \
$(LIBRARY_DIR)/mer_std.m) \
;; \
$(LIBRARY_DIR)/mutvar.m) \
@@ -330,8 +312,6 @@ library-chapters.texi_pp: ../VERSION
$(LIBRARY_DIR)/[a-z]*.m
;; \
$(LIBRARY_DIR)/stm_builtin.m) \
;; \
- $(LIBRARY_DIR)/svrelation.m) \
- ;; \
$(LIBRARY_DIR)/table_builtin.m) \
;; \
$(LIBRARY_DIR)/term_size_prof_builtin.m) \
diff --git a/library/array.m b/library/array.m
index f041f27..b65f79c 100644
--- a/library/array.m
+++ b/library/array.m
@@ -226,12 +226,6 @@
:- func array.set(array(T), int, T) = array(T).
:- mode array.set(array_di, in, in) = array_uo is det.
- % An obsolete synonym for array.set/4.
- %
-:- pragma obsolete(array.svset/4).
-:- pred array.svset(int, T, array(T), array(T)).
-:- mode array.svset(in, in, array_di, array_uo) is det.
-
% array.semidet_set sets the nth element of an array, and returns
% the resulting array. It fails if the index is out of bounds.
%
@@ -244,12 +238,6 @@
:- pred array.unsafe_set(int, T, array(T), array(T)).
:- mode array.unsafe_set(in, in, array_di, array_uo) is det.
- % An obsolete synonym for array.unsafe_set/4.
- %
-:- pragma obsolete(array.unsafe_svset/4).
-:- pred array.unsafe_svset(int, T, array(T), array(T)).
-:- mode array.unsafe_svset(in, in, array_di, array_uo) is det.
-
% array.slow_set sets the nth element of an array, and returns the
% resulting array. The initial array is not required to be unique,
% so the implementation may not be able to use destructive update.
@@ -1581,13 +1569,6 @@ array.set(Index, Item, !Array) :-
array.unsafe_set(Index, Item, !Array)
).
-array.svset(Index, Item, !Array) :-
- ( bounds_checks, \+ array.in_bounds(!.Array, Index) ->
- out_of_bounds_error(!.Array, Index, "array.set")
- ;
- array.unsafe_svset(Index, Item, !Array)
- ).
-
'unsafe_elem :='(Index, !.Array, Value) = !:Array :-
array.unsafe_set(Index, Value, !Array).
@@ -1605,20 +1586,6 @@ array.svset(Index, Item, !Array) :-
Array = Array0;
").
-:- pragma foreign_proc("C",
- array.unsafe_svset(Index::in, Item::in, Array0::array_di,
Array::array_uo),
- [will_not_call_mercury, promise_pure, thread_safe,
will_not_modify_trail,
- does_not_affect_liveness,
- sharing(yes(int, T, array(T), array(T)), [
- cel(Array0, []) - cel(Array, []),
- cel(Item, []) - cel(Array, [T])
- ])
- ],
-"
- Array0->elements[Index] = Item; /* destructive update! */
- Array = Array0;
-").
-
:- pragma foreign_proc("C#",
array.unsafe_set(Index::in, Item::in, Array0::array_di,
Array::array_uo),
[will_not_call_mercury, promise_pure, thread_safe],
@@ -1627,14 +1594,6 @@ array.svset(Index, Item, !Array) :-
Array = Array0;
}").
-:- pragma foreign_proc("C#",
- array.unsafe_svset(Index::in, Item::in, Array0::array_di,
Array::array_uo),
- [will_not_call_mercury, promise_pure, thread_safe],
-"{
- Array0.SetValue(Item, Index); /* destructive update! */
- Array = Array0;
-}").
-
:- pragma foreign_proc("Erlang",
array.unsafe_set(Index::in, Item::in, Array0::array_di,
Array::array_uo),
[will_not_call_mercury, promise_pure, thread_safe],
@@ -1642,13 +1601,6 @@ array.svset(Index, Item, !Array) :-
Array = setelement(Index + 1, Array0, Item)
").
-:- pragma foreign_proc("Erlang",
- array.unsafe_svset(Index::in, Item::in, Array0::array_di,
Array::array_uo),
- [will_not_call_mercury, promise_pure, thread_safe],
-"
- Array = setelement(Index + 1, Array0, Item)
-").
-
:- pragma foreign_proc("Java",
array.unsafe_set(Index::in, Item::in, Array0::array_di,
Array::array_uo),
[will_not_call_mercury, promise_pure, thread_safe],
@@ -1667,24 +1619,6 @@ array.svset(Index, Item, !Array) :-
Array = Array0; /* destructive update! */
").
-:- pragma foreign_proc("Java",
- array.unsafe_svset(Index::in, Item::in, Array0::array_di,
Array::array_uo),
- [will_not_call_mercury, promise_pure, thread_safe],
-"
- if (Array0 instanceof int[]) {
- ((int[]) Array0)[Index] = (Integer) Item;
- } else if (Array0 instanceof double[]) {
- ((double[]) Array0)[Index] = (Double) Item;
- } else if (Array0 instanceof char[]) {
- ((char[]) Array0)[Index] = (Character) Item;
- } else if (Array0 instanceof boolean[]) {
- ((boolean[]) Array0)[Index] = (Boolean) Item;
- } else {
- ((Object[]) Array0)[Index] = Item;
- }
- Array = Array0; /* destructive update! */
-").
-
%-----------------------------------------------------------------------------%
% lower bounds other than zero are not supported
diff --git a/library/array2d.m b/library/array2d.m
index d13383e..45dd4b9 100644
--- a/library/array2d.m
+++ b/library/array2d.m
@@ -45,13 +45,6 @@
:- func init(int, int, T) = array2d(T).
:- mode init(in, in, in) = array2d_uo is det.
- % new(M, N, X) = array2d([[X11, ..., X1N], ..., [XM1, ..., XMN]])
- % where each XIJ = X. An exception is thrown if M < 0 or N < 0.
- %
-:- pragma obsolete(new/3).
-:- func new(int, int, T ) = array2d(T).
-:- mode new(in, in, in) = array2d_uo is det.
-
% array2d([[X11, ..., X1N], ..., [XM1, ..., XMN]]) constructs a array2d
% of size M * N, with the special case that bounds(array2d([]), 0, 0).
%
@@ -154,11 +147,9 @@
init(M, N, X) =
( if M >= 0, N >= 0
then array2d(M, N, array.init(M * N, X))
- else func_error("array2d.new: bounds must be non-negative")
+ else func_error("array2d.init: bounds must be non-negative")
).
-new(M, N, X) = init(M, N, X).
-
%-----------------------------------------------------------------------------%
array2d([]) = array2d(0, 0, make_empty_array).
diff --git a/library/bitmap.m b/library/bitmap.m
index d2551ac..5bb2a1a 100644
--- a/library/bitmap.m
+++ b/library/bitmap.m
@@ -76,24 +76,10 @@
%
:- func init(num_bits::in, bool::in) = (bitmap::bitmap_uo) is det.
- % new(N, B) creates a bitmap of size N (indexed 0 .. N-1)
- % setting each bit if B = yes and clearing each bit if B = no.
- % An exception is thrown if N is negative.
- %
-:- pragma obsolete(bitmap.new/2).
-:- func new(num_bits, bool) = bitmap.
-:- mode new(in, in) = bitmap_uo is det.
-
% A synonym for init(N, no).
%
:- func init(num_bits::in) = (bitmap::bitmap_uo) is det.
- % Same as new(N, no).
- %
-:- pragma obsolete(bitmap.new/1).
-:- func new(num_bits) = bitmap.
-:- mode new(in) = bitmap_uo is det.
-
% Create a new copy of a bitmap.
%
:- func copy(bitmap) = bitmap.
@@ -452,17 +438,13 @@ init(N) = init(N, no).
init(N, B) = BM :-
( if N < 0 then
- throw_bitmap_error("bitmap.new: negative size") = _ : int
+ throw_bitmap_error("bitmap.init: negative size") = _ : int
else
X = initializer(B),
BM0 = initialize_bitmap(allocate_bitmap(N), N, X),
BM = clear_filler_bits(BM0)
).
-new(N, B) = init(N, B).
-
-new(N) = init(N).
-
%-----------------------------------------------------------------------------%
resize(!.BM, NewSize, InitializerBit) = !:BM :-
diff --git a/library/library.m b/library/library.m
index 64dee72..7e1f0ab 100644
--- a/library/library.m
+++ b/library/library.m
@@ -115,9 +115,6 @@
:- import_module stream.string_writer.
:- import_module string.
:- import_module string.builder.
-:- import_module svlist.
-:- import_module svpqueue.
-:- import_module svstack.
:- import_module table_statistics.
:- import_module term.
:- import_module term_io.
@@ -287,9 +284,6 @@ mercury_std_library_module("stream").
mercury_std_library_module("stream.string_writer").
mercury_std_library_module("string").
mercury_std_library_module("string.builder").
-mercury_std_library_module("svlist").
-mercury_std_library_module("svpqueue").
-mercury_std_library_module("svstack").
mercury_std_library_module("table_builtin").
mercury_std_library_module("table_statistics").
mercury_std_library_module("term").
diff --git a/library/store.m b/library/store.m
index 283b847..a25e65a 100644
--- a/library/store.m
+++ b/library/store.m
@@ -51,11 +51,6 @@
%
:- some [S] pred store.init(store(S)::uo) is det.
- % A synonym for the above.
- %
-:- pragma obsolete(store.new/1).
-:- some [S] pred store.new(store(S)::uo) is det.
-
%-----------------------------------------------------------------------------%
%
% Mutvars
@@ -279,9 +274,6 @@ store_compare(_, _, _) :-
:- type generic_mutvar(T, S) ---> mutvar(private_builtin.ref(T)).
:- type generic_ref(T, S) ---> ref(private_builtin.ref(T)).
-store.new(S) :-
- store.init(S).
-
store.init(S) :-
store.do_init(S).
diff --git a/library/string.m b/library/string.m
index 884f7f7..69e1d9a 100644
--- a/library/string.m
+++ b/library/string.m
@@ -638,14 +638,6 @@
% 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.
-
% 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'.
@@ -1227,9 +1219,6 @@ string.det_index(String, Int, Char) :-
String ^ elem(Index) = det_index(String, Index).
-string.set_char_det(Char, Int, !String) :-
- string.det_set_char(Char, Int, !String).
-
string.det_set_char(Char, Int, String0, String) :-
( string.set_char(Char, Int, String0, String1) ->
String = String1
@@ -6135,9 +6124,6 @@ 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) =
- string.det_set_char(C, N, S0).
-
string.det_set_char(C, N, S0) = S :-
string.det_set_char(C, N, S0, S).
diff --git a/library/svlist.m b/library/svlist.m
deleted file mode 100644
index 38369ab..0000000
--- a/library/svlist.m
+++ /dev/null
@@ -1,104 +0,0 @@
-%---------------------------------------------------------------------------%
-% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
-%---------------------------------------------------------------------------%
-% Copyright (C) 2011 The University of Melbourne.
-%
-% This file may only be copied under the terms of the GNU Library General
-% Public License - see the file COPYING.LIB in the Mercury distribution.
-%---------------------------------------------------------------------------%
-%
-% File: svlist.m.
-% Authors: fjh, conway, trd, zs, philip, warwick, ...
-% Stability: medium to high.
-%
-% This file provides an interface to the 'list' ADT that is conducive to
the
-% use of state variable notation. The predicates here do the same thing as
-% their counterparts in the pqueue module; the only difference is the order
-% of the arguments.
-%
-%---------------------------------------------------------------------------%
-%---------------------------------------------------------------------------%
-
-:- module svlist.
-:- interface.
-
-:- import_module list.
-
-%---------------------------------------------------------------------------%
-
- % svlist.delete(Elem, List, Remainder):
- %
- % True iff `Elem' occurs in `List', and `Remainder' is the result of
- % deleting one occurrence of `Elem' from `List'.
- %
-:- pred svlist.delete(T, list(T), list(T)).
-:- mode svlist.delete(in, in, in) is semidet.
-:- mode svlist.delete(in, in, out) is nondet.
-:- mode svlist.delete(out, in, out) is nondet.
-:- mode svlist.delete(in, out, in) is multi.
-
- % svlist.delete_first(Elem, List0, List) is true iff Elem occurs in
List0
- % and List is List0 with the first occurrence of Elem removed.
- %
-:- pred svlist.delete_first(T::in, list(T)::in, list(T)::out) is semidet.
-
- % svlist.delete_elems(Elems, List0, List) is true iff List is List0
with
- % all occurrences of all elements of Elems removed.
- %
-:- pred svlist.delete_elems(list(T)::in, list(T)::in, list(T)::out) is det.
-
- % svlist.replace(D, R, List0, List) is true iff List is List0
- % with an occurrence of D replaced with R.
- %
-:- pred svlist.replace(T, T, list(T), list(T)).
-:- mode svlist.replace(in, in, in, in) is semidet.
-:- mode svlist.replace(in, in, in, out) is nondet.
-
- % svlist.replace_first(D, R, List0, List) is true iff List is List0
- % with the first occurrence of D replaced with R.
- %
-:- pred svlist.replace_first(T::in, T::in, list(T)::in, list(T)::out)
- is semidet.
-
- % svlist.replace_all(D, R, List0, List) is true iff List is List0
- % with all occurrences of D replaced with R.
- %
-:- pred svlist.replace_all(T::in, T::in, list(T)::in, list(T)::out) is det.
-
- % svlist.det_replace_nth(N, R, List0, List) is true iff List is List0
- % with Nth element replaced with R.
- % Aborts if N < 1 or if length of List0 < N.
- % (Position numbers start from 1.)
- %
-:- pred svlist.det_replace_nth(int::in, T::in, list(T)::in, list(T)::out)
- is det.
-
-%---------------------------------------------------------------------------%
-%---------------------------------------------------------------------------%
-
-:- implementation.
-
-svlist.delete(E, !List) :-
- list.delete(!.List, E, !:List).
-
-svlist.delete_first(E, !List) :-
- list.delete_first(!.List, E, !:List).
-
-svlist.delete_elems(Elems, !List) :-
- list.delete_elems(!.List, Elems, !:List).
-
-svlist.replace(D, R, !List) :-
- list.replace(!.List, D, R, !:List).
-
-svlist.replace_first(D, R, !List) :-
- list.replace_first(!.List, D, R, !:List).
-
-svlist.replace_all(D, R, !List) :-
- list.replace_all(!.List, D, R, !:List).
-
-svlist.det_replace_nth(N, R, !List) :-
- list.det_replace_nth(!.List, N, R, !:List).
-
-%---------------------------------------------------------------------------%
-:- end_module svlist.
-%---------------------------------------------------------------------------%
diff --git a/library/svpqueue.m b/library/svpqueue.m
deleted file mode 100644
index fada7f3..0000000
--- a/library/svpqueue.m
+++ /dev/null
@@ -1,56 +0,0 @@
-%---------------------------------------------------------------------------%
-% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
-%---------------------------------------------------------------------------%
-% Copyright (C) 2011-2012 The University of Melbourne.
-%
-% This file may only be copied under the terms of the GNU Library General
-% Public License - see the file COPYING.LIB in the Mercury distribution.
-%---------------------------------------------------------------------------%
-%
-% File: svpqueue.m.
-% Main author: conway.
-% Stability: high.
-%
-% This file provides an interface to the 'pqueue' ADT that is conducive to
the
-% use of state variable notation. The predicates here do the same thing as
-% their counterparts in the pqueue module; the only difference is the order
-% of the arguments.
-%
-%---------------------------------------------------------------------------%
-%---------------------------------------------------------------------------%
-
-:- module svpqueue.
-:- interface.
-
-:- import_module pqueue.
-
-%---------------------------------------------------------------------------%
-
- % Insert a value V with key K into a priority queue
- % and return the new priority queue.
- %
-:- pragma obsolete(svpqueue.insert/4).
-:- pred svpqueue.insert(K::in, V::in, pqueue(K, V)::in, pqueue(K, V)::out)
- is det.
-
- % Remove the smallest item from the priority queue.
- % Fails if the priority queue is empty.
- %
-:- pragma obsolete(svpqueue.remove/4).
-:- pred svpqueue.remove(K::out, V::out, pqueue(K, V)::in, pqueue(K,
V)::out)
- is semidet.
-
-%---------------------------------------------------------------------------%
-%---------------------------------------------------------------------------%
-
-:- implementation.
-
-svpqueue.insert(K, V, !PQ) :-
- pqueue.insert(K, V, !PQ).
-
-svpqueue.remove(K, V, !PQ) :-
- pqueue.remove(K, V, !PQ).
-
-%---------------------------------------------------------------------------%
-:- end_module svpqueue.
-%---------------------------------------------------------------------------%
diff --git a/library/svstack.m b/library/svstack.m
deleted file mode 100644
index 99705cd..0000000
--- a/library/svstack.m
+++ /dev/null
@@ -1,76 +0,0 @@
-%---------------------------------------------------------------------------%
-% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
-%---------------------------------------------------------------------------%
-% Copyright (C) 2011-2012 The University of Melbourne.
-% This file may only be copied under the terms of the GNU Library General
-% Public License - see the file COPYING.LIB in the Mercury distribution.
-%---------------------------------------------------------------------------%
-%
-% File: stack.m.
-% Main author: fjh.
-% Stability: high.
-%
-% This file provides an interface to the 'stack' ADT that is conducive to
the
-% use of state variable notation. The predicates here do the same thing as
-% their counterparts in the stack module; the only difference is the order
of
-% the arguments.
-%
-%--------------------------------------------------------------------------%
-
-:- module svstack.
-:- interface.
-
-:- import_module list.
-:- import_module stack.
-
-%--------------------------------------------------------------------------%
-
- % `svstack.push(Elem, Stack0, Stack)' is true iff `Stack' is
- % the stack which results from pushing `Elem' onto the top
- % of `Stack0'.
- %
-:- pragma obsolete(svstack.push/3).
-:- pred svstack.push(T::in, stack(T)::in, stack(T)::out) is det.
-
- % `svstack.push_list(Elems, Stack0, Stack)' is true iff `Stack'
- % is the stack which results from pushing the elements of the
- % list `Elems' onto the top of `Stack0'.
- %
-:- pragma obsolete(svstack.push_list/3).
-:- pred svstack.push_list(list(T)::in, stack(T)::in, stack(T)::out) is det.
-
- % `svstack.pop(Elem, Stack0, Stack)' is true iff `Stack0' is
- % a non-empty stack whose top element is `Elem', and `Stack'
- % the stack which results from popping `Elem' off `Stack0'.
- %
-:- pragma obsolete(svstack.pop/3).
-:- pred svstack.pop(T::out, stack(T)::in, stack(T)::out) is semidet.
-
- % `svstack.det_pop' is like `svstack.pop' except that it will
- % call error/1 rather than failing if given an empty stack.
- %
-:- pragma obsolete(svstack.det_pop/3).
-:- pred svstack.det_pop(T::out, stack(T)::in, stack(T)::out) is det.
-
-%--------------------------------------------------------------------------%
-%--------------------------------------------------------------------------%
-
-:- implementation.
-
-%--------------------------------------------------------------------------%
-
-svstack.push(E, !S) :-
- stack.push(E, !S).
-
-svstack.push_list(Es, !S) :-
- stack.push_list(Es, !S).
-
-svstack.pop(E, !S) :-
- stack.pop(E, !S).
-
-svstack.det_pop(E, !S) :-
- stack.det_pop(E, !S).
-
-%--------------------------------------------------------------------------%
-:- end_module svstack.
-%--------------------------------------------------------------------------%
diff --git a/library/thread.semaphore.m b/library/thread.semaphore.m
index 0a050db..d497fe9 100644
--- a/library/thread.semaphore.m
+++ b/library/thread.semaphore.m
@@ -33,20 +33,10 @@
%
:- pred semaphore.init(semaphore::out, io::di, io::uo) is det.
- % A synonym for the above.
- %
-:- pragma obsolete(semaphore.new/3).
-:- pred semaphore.new(semaphore::out, io::di, io::uo) is det.
-
% Returns a new semaphore `Sem' with its counter initialized to Count.
%
:- impure func semaphore.init(int::in) = (semaphore::uo) is det.
- % A synonym for the above.
- %
-:- pragma obsolete(semaphore.new/1).
-:- impure func semaphore.new(int::in) = (semaphore::uo) is det.
-
% wait(Sem, !IO) blocks until the counter associated with `Sem'
% becomes greater than 0, whereupon it wakes, decrements the
% counter and returns.
@@ -116,12 +106,6 @@ ML_finalize_semaphore(void *obj, void *cd);
%-----------------------------------------------------------------------------%
-new(Semaphore, !IO) :-
- init(Semaphore, !IO).
-
-new(Count) = Semaphore :-
- impure Semaphore = init(Count).
-
init(Semaphore, !IO) :-
promise_pure (
impure Semaphore = init(0)
diff --git a/library/version_array.m b/library/version_array.m
index 609e9a4..c1c0b3d 100644
--- a/library/version_array.m
+++ b/library/version_array.m
@@ -79,11 +79,6 @@
%
:- func init(int, T) = version_array(T).
- % new(N, X) returns an array of size N with each item initialised to X.
- %
-:- pragma obsolete(new/2).
-:- func new(int, T) = version_array(T).
-
% Same as empty/0 except the resulting version_array is not thread
safe.
%
% That is your program can crash or behave strangely if you attempt to
@@ -94,7 +89,7 @@
%
:- func unsafe_empty = version_array(T).
- % Same as new(N, X) except the resulting version_array is not thread
safe.
+ % Same as init(N, X) except the resulting version_array is not thread
safe.
%
% That is your program can crash or behave strangely if you attempt to
% concurrently access or update the array from different threads, or
any
@@ -102,6 +97,11 @@
% However this version is much quicker if you guarantee that you never
% concurrently access the version array.
%
+:- func unsafe_init(int, T) = version_array(T).
+
+ % An obsolete synonym for the above.
+ %
+:- pragma obsolete(unsafe_new/2).
:- func unsafe_new(int, T) = version_array(T).
% version_array(Xs) returns an array constructed from the items in the
list
@@ -249,10 +249,6 @@
%-----------------------------------------------------------------------------%
-new(N, X) = version_array.init(N, X).
-
-%-----------------------------------------------------------------------------%
-
version_array([]) = version_array.empty.
version_array([X | Xs]) = VA :-
VA0 = version_array.init(1 + list.length(Xs), X),
@@ -660,8 +656,10 @@ cmp_version_array_2(I, Size, VAa, VAb, R) :-
VA = new ML_sva(ML_uva.init(N, X));
").
+unsafe_new(N, X) = unsafe_init(N, X).
+
:- pragma foreign_proc("C",
- version_array.unsafe_new(N::in, X::in) = (VA::out),
+ version_array.unsafe_init(N::in, X::in) = (VA::out),
[will_not_call_mercury, promise_pure, thread_safe,
will_not_modify_trail,
does_not_affect_liveness, may_not_duplicate],
"
@@ -688,7 +686,7 @@ cmp_version_array_2(I, Size, VAa, VAb, R) :-
").
:- pragma foreign_proc("C#",
- version_array.unsafe_new(N::in, X::in) = (VA::out),
+ version_array.unsafe_init(N::in, X::in) = (VA::out),
[will_not_call_mercury, promise_pure, thread_safe,
will_not_modify_trail,
does_not_affect_liveness, may_not_duplicate],
"
@@ -696,7 +694,7 @@ cmp_version_array_2(I, Size, VAa, VAb, R) :-
").
:- pragma foreign_proc("Java",
- version_array.unsafe_new(N::in, X::in) = (VA::out),
+ version_array.unsafe_init(N::in, X::in) = (VA::out),
[will_not_call_mercury, promise_pure, thread_safe,
will_not_modify_trail,
does_not_affect_liveness, may_not_duplicate],
"
diff --git a/library/version_array2d.m b/library/version_array2d.m
index f77ced2..36b5e9c 100644
--- a/library/version_array2d.m
+++ b/library/version_array2d.m
@@ -45,14 +45,6 @@
%
:- func init(int, int, T) = version_array2d(T).
- % new(M, N, X) = version_array2d([[X11, ..., X1N], ..., [XM1, ...,
XMN]])
- % where each XIJ = X.
- %
- % An exception is thrown if M < 0 or N < 0.
- %
-:- pragma obsolete(new/3).
-:- func new(int, int, T) = version_array2d(T).
-
% version_array2d([[X11, ..., X1N], ..., [XM1, ..., XMN]]) ^ elem(I,
J) = X
% where X is the J+1th element of the I+1th row (i.e. indices start
from
% zero.)
@@ -145,8 +137,6 @@ init(M, N, X) =
else func_error("version_array2d.new: bounds must be non-negative")
).
-new(M, N, X) = init(M, N, X).
-
%-----------------------------------------------------------------------------%
bounds(version_array2d(M, N, _A), M, N).
diff --git a/library/version_bitmap.m b/library/version_bitmap.m
index abecc08..cbfc294 100644
--- a/library/version_bitmap.m
+++ b/library/version_bitmap.m
@@ -36,13 +36,6 @@
%
:- func init(int, bool) = version_bitmap.
- % new(N, B) creates a version_bitmap of size N (indexed 0 .. N-1)
- % setting each bit if B = yes and clearing each bit if B = no.
- % An exception is thrown if N is negative.
- %
-:- pragma obsolete(new/2).
-:- func new(int, bool) = version_bitmap.
-
% Returns the number of bits in a version_bitmap.
%
:- func num_bits(version_bitmap) = int.
@@ -137,8 +130,6 @@
%-----------------------------------------------------------------------------%
-new(N, B) = init(N, B).
-
init(N, B) = BM :-
( if N < 0 then
throw(software_error("version_bitmap.init: negative size"))
diff --git a/library/version_hash_table.m b/library/version_hash_table.m
index 04d3389..15085aa 100644
--- a/library/version_hash_table.m
+++ b/library/version_hash_table.m
@@ -49,10 +49,6 @@
:- func init(hash_pred(K)::in(hash_pred), int::in, float::in) =
(version_hash_table(K, V)::out) is det.
-:- pragma obsolete(new/3).
-:- func new(hash_pred(K)::in(hash_pred), int::in, float::in) =
- (version_hash_table(K, V)::out) is det.
-
% unsafe_init(HashPred, N, MaxOccupancy)
%
% Like init/3, but the constructed hash table is backed by a
non-thread safe
@@ -66,20 +62,12 @@
:- func unsafe_init(hash_pred(K)::in(hash_pred), int::in, float::in) =
(version_hash_table(K, V)::out) is det.
-:- pragma obsolete(unsafe_new/3).
-:- func unsafe_new(hash_pred(K)::in(hash_pred), int::in, float::in) =
- (version_hash_table(K, V)::out) is det.
-
% init_default(HashFn) constructs a hash table with default size and
% occupancy arguments.
%
:- func init_default(hash_pred(K)::in(hash_pred)) =
(version_hash_table(K, V)::out) is det.
-:- pragma obsolete(new_default/1).
-:- func new_default(hash_pred(K)::in(hash_pred)) =
- (version_hash_table(K, V)::out) is det.
-
% unsafe_init_default(HashFn)
%
% Like init_default/3 but the constructed hash table is backed by a
@@ -88,10 +76,6 @@
:- func unsafe_init_default(hash_pred(K)::in(hash_pred)) =
(version_hash_table(K, V)::out) is det.
-:- pragma obsolete(unsafe_new_default/1).
-:- func unsafe_new_default(hash_pred(K)::in(hash_pred)) =
- (version_hash_table(K, V)::out) is det.
-
% Retrieve the hash_pred associated with a hash table.
%
% :- func hash_pred(version_hash_table(K, V)) = hash_pred(K).
@@ -254,12 +238,8 @@
init(HashPred, N, MaxOccupancy) = init_2(HashPred, N, MaxOccupancy, yes).
-new(HashPred, N, MaxOccupancy) = init_2(HashPred, N, MaxOccupancy, yes).
-
unsafe_init(HashPred, N, MaxOccupancy) = init_2(HashPred, N, MaxOccupancy,
no).
-unsafe_new(HashPred, N, MaxOccupancy) = init_2(HashPred, N, MaxOccupancy,
no).
-
:- func init_2(hash_pred(K)::in(hash_pred), int::in, float::in, bool::in) =
(version_hash_table(K, V)::out) is det.
@@ -280,7 +260,7 @@ init_2(HashPred, N, MaxOccupancy, NeedSafety) = HT :-
Buckets = version_array.init(NumBuckets, ht_nil)
;
NeedSafety = no,
- Buckets = version_array.unsafe_new(NumBuckets, ht_nil)
+ Buckets = version_array.unsafe_init(NumBuckets, ht_nil)
),
HT = ht(0, MaxOccupants, HashPred, Buckets)
).
@@ -290,10 +270,8 @@ init_2(HashPred, N, MaxOccupancy, NeedSafety) = HT :-
% These numbers are picked out of thin air.
%
init_default(HashPred) = init(HashPred, 7, 0.9).
-new_default(HashPred) = init(HashPred, 7, 0.9).
unsafe_init_default(HashPred) = unsafe_init(HashPred, 7, 0.9).
-unsafe_new_default(HashPred) = unsafe_init(HashPred, 7, 0.9).
%-----------------------------------------------------------------------------%
diff --git a/library/version_store.m b/library/version_store.m
index 66b073a..31389cf 100644
--- a/library/version_store.m
+++ b/library/version_store.m
@@ -39,11 +39,6 @@
%
:- some [S] func init = version_store(S).
- % A synonym for the above.
- %
-:- pragma obsolete(new/0).
-:- some [S] func new = version_store(S).
-
% new_mutvar(X, Mutvar, VS0, VS) adds a new mutvar with value
reference X
% to the version store.
%
@@ -131,8 +126,6 @@ init = version_store(VA) `with_type`
version_store(some_version_store_type) :-
%
VA = version_array.init(256, univ(counter.init(1) `with_type`
counter)).
-new = init.
-
%-----------------------------------------------------------------------------%
new_mutvar(X, Mutvar, VS0, VS) :-
diff --git a/tests/hard_coded/bit_buffer_test.m
b/tests/hard_coded/bit_buffer_test.m
index c6166e7..8bafaf2 100644
--- a/tests/hard_coded/bit_buffer_test.m
+++ b/tests/hard_coded/bit_buffer_test.m
@@ -432,7 +432,7 @@ do_write(check_buffer_status(_), !Buffer).
requests_to_bitmap(Requests) = !:BM :-
Size = request_list_length(Requests, 0),
- !:BM = bitmap.new(Size),
+ !:BM = bitmap.init(Size),
list.foldl2(request_to_bitmap, Requests, 0, _, !BM).
:- func request_list_length(list(request), int) = int.
@@ -598,7 +598,7 @@ do_read(Desc, ReqIndex, bits(ExpectedWord0, NumBits),
!Buffer) :-
do_read(Desc, ReqIndex, bitmap(SourceBM, Index, NumBits), !Buffer) :-
some [!BM] (
- !:BM = bitmap.new(SourceBM ^ num_bits),
+ !:BM = bitmap.init(SourceBM ^ num_bits),
( Index = 0, NumBits = SourceBM ^ num_bits ->
get_bitmap(!BM, BitsRead, GetResult, !Buffer)
;
@@ -606,7 +606,7 @@ do_read(Desc, ReqIndex, bitmap(SourceBM, Index,
NumBits), !Buffer) :-
),
(
GetResult = ok,
- ExpectedBM0 = bitmap.new(SourceBM ^ num_bits),
+ ExpectedBM0 = bitmap.init(SourceBM ^ num_bits),
ExpectedBM = copy_bits(SourceBM, Index,
ExpectedBM0, Index, NumBits),
( ExpectedBM = !.BM ->
diff --git a/tests/hard_coded/bitmap_empty.m
b/tests/hard_coded/bitmap_empty.m
index ac7af06..ac7e59a 100644
--- a/tests/hard_coded/bitmap_empty.m
+++ b/tests/hard_coded/bitmap_empty.m
@@ -21,7 +21,7 @@
main(!IO) :-
io.write_string("-- new\n", !IO),
- A0 = bitmap.new(0, no) : bitmap,
+ A0 = bitmap.init(0, no) : bitmap,
io.write(A0, !IO),
io.nl(!IO),
@@ -34,7 +34,7 @@ main(!IO) :-
io.write_string("-- resize\n", !IO),
some [B0, B1, B2, B3] (
- B0 = bitmap.new(0, no),
+ B0 = bitmap.init(0, no),
B1 = resize(B0, 0, no), % no change
io.write(B1, !IO),
io.nl(!IO),
@@ -48,7 +48,7 @@ main(!IO) :-
io.write_string("-- shrink_without_copying\n", !IO),
some [B0, B1] (
- B0 = bitmap.new(4, no),
+ B0 = bitmap.init(4, no),
B1 = shrink_without_copying(B0, 0),
io.write(B1, !IO),
io.nl(!IO)
@@ -117,7 +117,7 @@ main(!IO) :-
io.write_string("-- ^bits:=\n", !IO),
some [B0, B1] (
- B0 = bitmap.new(0, no),
+ B0 = bitmap.init(0, no),
B1 = B0 ^ bits(0, 0) := 0,
io.write(B1, !IO),
io.nl(!IO)
@@ -138,7 +138,7 @@ main(!IO) :-
io.write_string("-- ^byte:=\n", !IO),
some [B0, B1] (
(try [] (
- B0 = bitmap.new(0, no),
+ B0 = bitmap.init(0, no),
B1 = B0 ^ byte(0) := 0
)
then
@@ -168,7 +168,7 @@ main(!IO) :-
io.write_string("-- flip\n", !IO),
some [B0, B1] (
(try [] (
- B0 = bitmap.new(0, no),
+ B0 = bitmap.init(0, no),
B1 = flip(B0, 0)
)
then
@@ -180,8 +180,8 @@ main(!IO) :-
)
),
- A1 = bitmap.new(0, no),
- A2 = bitmap.new(0, no),
+ A1 = bitmap.init(0, no),
+ A2 = bitmap.init(0, no),
io.write_string("-- complement\n", !IO),
Bcompl = complement(A1),
@@ -210,9 +210,9 @@ main(!IO) :-
io.write_string("-- append_list\n", !IO),
some [B0, B1, B2, B3] (
- B0 = bitmap.new(1, yes),
- B1 = bitmap.new(0, yes),
- B2 = bitmap.new(1, yes),
+ B0 = bitmap.init(1, yes),
+ B1 = bitmap.init(0, yes),
+ B2 = bitmap.init(1, yes),
B3 = append_list([B0, B1, B2]),
io.write(B3, !IO),
io.nl(!IO)
@@ -220,8 +220,8 @@ main(!IO) :-
io.write_string("-- copy_bits\n", !IO),
some [B0, B1, B2] (
- B0 = bitmap.new(1, yes),
- B1 = bitmap.new(0, yes),
+ B0 = bitmap.init(1, yes),
+ B1 = bitmap.init(0, yes),
B2 = copy_bits(B0, 0, B1, 0, 0),
io.write(B2, !IO),
io.nl(!IO)
@@ -229,7 +229,7 @@ main(!IO) :-
io.write_string("-- copy_bits_in_bitmap\n", !IO),
some [B0, B1] (
- B0 = bitmap.new(0, no),
+ B0 = bitmap.init(0, no),
B1 = copy_bits_in_bitmap(B0, 0, 0, 0),
io.write(B1, !IO),
io.nl(!IO)
@@ -237,8 +237,8 @@ main(!IO) :-
io.write_string("-- copy_bytes\n", !IO),
some [B0, B1, B2] (
- B0 = bitmap.new(8, yes),
- B1 = bitmap.new(0, no),
+ B0 = bitmap.init(8, yes),
+ B1 = bitmap.init(0, no),
B2 = copy_bytes(B0, 0, B1, 0, 0),
io.write(B2, !IO),
io.nl(!IO)
@@ -246,7 +246,7 @@ main(!IO) :-
io.write_string("-- copy_bytes_in_bitmap\n", !IO),
some [B0, B1] (
- B0 = bitmap.new(0, no),
+ B0 = bitmap.init(0, no),
B1 = copy_bytes_in_bitmap(B0, 0, 0, 0),
io.write(B1, !IO),
io.nl(!IO)
@@ -274,8 +274,8 @@ main(!IO) :-
io.write_string("-- bitmap_equal\n", !IO),
some [B0, B1] (
- B0 = bitmap.new(0, no),
- B1 = bitmap.new(0, no),
+ B0 = bitmap.init(0, no),
+ B1 = bitmap.init(0, no),
( B0 = B1 ->
io.write_string("equal\n", !IO)
;
@@ -285,8 +285,8 @@ main(!IO) :-
io.write_string("-- bitmap_compare\n", !IO),
some [B0, B1] (
- B0 = bitmap.new(0, no),
- B1 = bitmap.new(0, no),
+ B0 = bitmap.init(0, no),
+ B1 = bitmap.init(0, no),
compare(Compare, B0, B1),
io.write(Compare, !IO),
io.nl(!IO)
diff --git a/tests/hard_coded/bitmap_test.m b/tests/hard_coded/bitmap_test.m
index d3e6ba8..cbb1dcb 100644
--- a/tests/hard_coded/bitmap_test.m
+++ b/tests/hard_coded/bitmap_test.m
@@ -172,7 +172,7 @@ run_test({}, !IO) :-
test_binary_io(!IO),
some [!BM] (
- !:BM = bitmap.new(64, yes),
+ !:BM = bitmap.init(64, yes),
!:BM = !.BM ^ bits(32, 16) := 0b1011011100100101,
test_exception(
((pred) is semidet :-
@@ -362,9 +362,9 @@ test_binary_op_2(BMStr1, BM1, OpStr, Op, BMStr2, BM2,
Writer, !IO) :-
test_binary_io(!IO) :-
FileName = "bitmap_test_output",
- BMa0 = bitmap.new(64, yes),
+ BMa0 = bitmap.init(64, yes),
BMa = BMa0 ^ bits(32, 16) := 0b1011011100100101,
- BMb0 = bitmap.new(47, yes),
+ BMb0 = bitmap.init(47, yes),
BMb = BMb0 ^ bits(11, 16) := 0b1011010110100101,
io.open_binary_output(FileName, OpenRes, !IO),
(
@@ -375,7 +375,7 @@ test_binary_io(!IO) :-
io.open_binary_input(FileName, OpenInputRes, !IO),
(
OpenInputRes = ok(IStream),
- InputBMa0 = bitmap.new(64, no),
+ InputBMa0 = bitmap.init(64, no),
io.read_bitmap(IStream, InputBMa0, InputBMa,
BytesReadA, ReadResA, !IO),
(
@@ -387,7 +387,7 @@ test_binary_io(!IO) :-
;
io.write_string("First read failed\n", !IO)
),
- InputBMb0 = bitmap.new(32, no),
+ InputBMb0 = bitmap.init(32, no),
io.read_bitmap(IStream, InputBMb0, InputBMb1,
BytesReadB, ReadResB, !IO),
@@ -420,9 +420,9 @@ test_binary_io(!IO) :-
test_text_io(!IO) :-
FileName = "bitmap_test_output2",
- BMa0 = bitmap.new(64, yes),
+ BMa0 = bitmap.init(64, yes),
BMa = BMa0 ^ bits(32, 16) := 0b1011011100100101,
- BMb0 = bitmap.new(47, yes),
+ BMb0 = bitmap.init(47, yes),
BMb = BMb0 ^ bits(11, 16) := 0b1011010110100101,
io.write_string("BMa = ", !IO),
io.write(BMa, !IO),
diff --git a/tests/hard_coded/bitmap_tester.m
b/tests/hard_coded/bitmap_tester.m
index 9a38992..b49e69c 100644
--- a/tests/hard_coded/bitmap_tester.m
+++ b/tests/hard_coded/bitmap_tester.m
@@ -191,7 +191,7 @@
%-----------------------------------------------------------------------------%
-new(N, B) = new(N, B) - new(N, B).
+new(N, B) = bitmap.init(N, B) - new(N, B).
%-----------------------------------------------------------------------------%
diff --git a/tests/hard_coded/exceptions/tricky_try_store.m
b/tests/hard_coded/exceptions/tricky_try_store.m
index ce6d4eb..e2d03a2 100644
--- a/tests/hard_coded/exceptions/tricky_try_store.m
+++ b/tests/hard_coded/exceptions/tricky_try_store.m
@@ -1,5 +1,5 @@
-% There is one tricky aspect with exception__try_store. If we're not
-% careful, the user could use `store__extract_ref_value', which destroys
+% There is one tricky aspect with exception.try_store. If we're not
+% careful, the user could use `store.extract_ref_value', which destroys
% the store and extracts the referenced value without making a copy.
% The user could then throw the extracted value, and if the handler gets
% both the extracted value and a unique version of the store, then it
@@ -22,7 +22,7 @@
:- module tricky_try_store.
:- interface.
:- import_module io.
-:- pred main(io__state::di, io__state::uo) is cc_multi.
+:- pred main(io::di, io::uo) is cc_multi.
:- implementation.
:- import_module exception, store, list.
@@ -31,19 +31,19 @@
:- mode tricky(in, out, di, uo) is det.
tricky(Key, _Output, Store0, _Store) :-
- store__extract_ref_value(Store0, Key, Value),
+ store.extract_ref_value(Store0, Key, Value),
throw(Value).
-main -->
- { store__new(Store0) },
- { store__new_ref(mklist("initial"), Key, Store0, Store1) },
- { store__arg_ref(Key, 0, SubKey, Store1, Store2) },
- { exception__try_store(tricky(Key), Result, Store2, Store3) },
- print("Result = "), print(Result), nl,
- { store__set_ref_value(SubKey, "updated", Store3, Store) },
- print("Result = "), print(Result), nl,
- { store__extract_ref_value(Store, Key, Val) },
- print("Val = "), print(Val), nl.
+main(!IO) :-
+ store.init(Store0),
+ store.new_ref(mklist("initial"), Key, Store0, Store1),
+ store.arg_ref(Key, 0, SubKey, Store1, Store2),
+ exception.try_store(tricky(Key), Result, Store2, Store3),
+ print("Result = ", !IO), print(Result, !IO), nl(!IO),
+ store.set_ref_value(SubKey, "updated", Store3, Store),
+ print("Result = ", !IO), print(Result, !IO), nl(!IO),
+ store.extract_ref_value(Store, Key, Val),
+ print("Val = ", !IO), print(Val, !IO), nl(!IO).
% XXX the current compiler has a bug whereby it generates static ground
terms
% even for things that are used in `di' modes. To avoid that bug,
diff --git a/tests/hard_coded/null_char.m b/tests/hard_coded/null_char.m
index edb154c..dea5055 100644
--- a/tests/hard_coded/null_char.m
+++ b/tests/hard_coded/null_char.m
@@ -56,7 +56,7 @@ test2(String) :-
:- pred test3(string::out) is det.
test3(String) :-
- String = string.set_char_det(nul, 2, "1234").
+ String = string.det_set_char(nul, 2, "1234").
:- pred test4(string::out) is det.
diff --git a/tests/hard_coded/test_array2d.m
b/tests/hard_coded/test_array2d.m
index f378f6e..d7fcd11 100644
--- a/tests/hard_coded/test_array2d.m
+++ b/tests/hard_coded/test_array2d.m
@@ -52,7 +52,7 @@ main(!IO) :-
write_array2d("Two_b", Two_b, !IO),
io.nl(!IO),
- Zeroes = array2d.new(3, 3, 0),
+ Zeroes = array2d.init(3, 3, 0),
write_array2d("Zeroes", Zeroes, !IO),
io.nl(!IO),
diff --git a/tests/hard_coded/test_semaphore.m
b/tests/hard_coded/test_semaphore.m
index aeaaf1b..7598b44 100644
--- a/tests/hard_coded/test_semaphore.m
+++ b/tests/hard_coded/test_semaphore.m
@@ -15,7 +15,7 @@
:- import_module thread.semaphore.
main(!IO) :-
- semaphore.new(S, !IO),
+ semaphore.init(S, !IO),
semaphore.signal(S, !IO),
semaphore.signal(S, !IO),
semaphore.wait(S, !IO),
diff --git a/tests/hard_coded/version_hash_table_delete.m
b/tests/hard_coded/version_hash_table_delete.m
index 0bd69c5..3f579fb 100644
--- a/tests/hard_coded/version_hash_table_delete.m
+++ b/tests/hard_coded/version_hash_table_delete.m
@@ -20,7 +20,7 @@
main(!IO) :-
some [!HT] (
- !:HT = version_hash_table.new_default(generic_hash),
+ !:HT = version_hash_table.init_default(generic_hash),
list.foldl(fill, keys, !HT),
list.foldl(version_hash_table.delete, keys, !HT),
Residue = version_hash_table.to_assoc_list(!.HT),
diff --git a/tests/hard_coded/version_hash_table_test.m
b/tests/hard_coded/version_hash_table_test.m
index 691d22e..3a9986d 100644
--- a/tests/hard_coded/version_hash_table_test.m
+++ b/tests/hard_coded/version_hash_table_test.m
@@ -24,7 +24,7 @@
main(!IO) :-
% Test `fold' which had an off-by-one bug.
some [!HT] (
- !:HT = version_hash_table.new_default(generic_hash),
+ !:HT = version_hash_table.init_default(generic_hash),
version_hash_table.set("one", 1, !HT),
version_hash_table.set("two", 2, !HT),
version_hash_table.set("three", 3, !HT),
diff --git a/tests/tabling/expand_bitmap.m b/tests/tabling/expand_bitmap.m
index 3855d55..05df33c 100644
--- a/tests/tabling/expand_bitmap.m
+++ b/tests/tabling/expand_bitmap.m
@@ -21,8 +21,8 @@ main(!IO) :-
random__init(0, RS0),
random__permutation(range(0, 1023), Perm, RS0, RS1),
- BM1 = bitmap.new(45, yes) ^ bits(20, 8) := 0b10001001,
- BM2 = bitmap.new(123, no) ^ bits(10, 8) := 0b10101010,
+ BM1 = bitmap.init(45, yes) ^ bits(20, 8) := 0b10001001,
+ BM2 = bitmap.init(123, no) ^ bits(10, 8) := 0b10101010,
choose_signs_and_enter(Perm, BM1, Solns1, RS1, RS2),
( test_tables(Solns1, yes) ->
io__write_string("First test successful.\n", !IO)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20130516/458fda9c/attachment.html>
More information about the reviews
mailing list