[m-rev.] diff: Rename version_hash_table.equals/2
Paul Bone
paul at bone.id.au
Fri Oct 18 11:46:25 AEDT 2013
Branch: release, master.
This simple change has already been discussed.
Rename version_hash_table.equals/2
Rename version_hash_table.equals/2 to equal/2 as this name is more
consistent with the rest of the standard library. Normally when renaming
predicates and functions in the standard library we deprecate them.
However, version_hash_table.equals/2 hasn't existed for very long and so
very little code depends on it's name.
library/version_hash_table.m:
As above.
---
library/version_hash_table.m | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/library/version_hash_table.m b/library/version_hash_table.m
index 5e061b6..7376614 100644
--- a/library/version_hash_table.m
+++ b/library/version_hash_table.m
@@ -215,11 +215,11 @@
% Test if two version_hash_tables are equal. This predicate is used by
% unifications on the version_hash_table type.
%
-:- pred equals(version_hash_table(K, V)::in, version_hash_table(K, V)::in)
+:- pred equal(version_hash_table(K, V)::in, version_hash_table(K, V)::in)
is semidet.
% This pragma is required because termination analysis can't analyse the use
% of higher order code.
-:- pragma terminates(equals/2).
+:- pragma terminates(equal/2).
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
@@ -251,7 +251,7 @@
ht_hash_pred :: hash_pred(K),
ht_buckets :: buckets(K, V)
)
- where equality is version_hash_table.equals.
+ where equality is version_hash_table.equal.
:- type buckets(K, V) == version_array(hash_table_alist(K, V)).
@@ -858,7 +858,7 @@ fold_p(P, List, !A) :-
%-----------------------------------------------------------------------------%
-equals(A, B) :-
+equal(A, B) :-
( pointer_equal(A, B) ->
true
;
--
1.8.4.rc3
More information about the reviews
mailing list