From 2b91a8989687e152f7120aa6c907ffeba8495bab Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Tue, 22 Sep 2020 10:44:51 +0200 Subject: Deprecate the non-qualified equality functions on kerpairs. This allows to quickly spot the parts of the code that rely on the canonical ordering. When possible we directly introduce the quotient-aware versions. --- kernel/names.mli | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'kernel/names.mli') diff --git a/kernel/names.mli b/kernel/names.mli index ea137ad1f4..9a01ea2b43 100644 --- a/kernel/names.mli +++ b/kernel/names.mli @@ -341,27 +341,30 @@ sig (** Comparisons *) module CanOrd : sig + type nonrec t = t val compare : t -> t -> int val equal : t -> t -> bool val hash : t -> int end module UserOrd : sig + type nonrec t = t val compare : t -> t -> int val equal : t -> t -> bool val hash : t -> int end module SyntacticOrd : sig + type nonrec t = t val compare : t -> t -> int val equal : t -> t -> bool val hash : t -> int end - val equal : t -> t -> bool + val equal : t -> t -> bool [@@ocaml.deprecated "Use QConstant.equal"] (** Default comparison, alias for [CanOrd.equal] *) - val hash : t -> int + val hash : t -> int [@@ocaml.deprecated "Use QConstant.hash"] (** Hashing function *) val change_label : t -> Label.t -> t @@ -431,27 +434,30 @@ sig (** Comparisons *) module CanOrd : sig + type nonrec t = t val compare : t -> t -> int val equal : t -> t -> bool val hash : t -> int end module UserOrd : sig + type nonrec t = t val compare : t -> t -> int val equal : t -> t -> bool val hash : t -> int end module SyntacticOrd : sig + type nonrec t = t val compare : t -> t -> int val equal : t -> t -> bool val hash : t -> int end - val equal : t -> t -> bool - (** Default comparison, alias for [CanOrd.equal] *) + val equal : t -> t -> bool [@@ocaml.deprecated "Use QMutInd.equal"] + (** Default comparison, alias for [CanOrd.equal] *) - val hash : t -> int + val hash : t -> int [@@ocaml.deprecated "Use QMutInd.hash"] (** Displaying *) -- cgit v1.2.3