diff --git a/infer/src/IR/Localise.ml b/infer/src/IR/Localise.ml index 2e154bc93..d20ab3b41 100644 --- a/infer/src/IR/Localise.ml +++ b/infer/src/IR/Localise.ml @@ -15,7 +15,10 @@ open! Utils module F = Format (** type of string used for localisation *) -type t = string +type t = string [@@deriving compare] + +let equal s1 s2 = + compare s1 s2 = 0 (** pretty print a localised string *) let pp fmt s = Format.fprintf fmt "%s" s @@ -26,12 +29,6 @@ let from_string s = s (** convert a localised string to an ordinary string *) let to_string s = s -(** compare two localised strings *) -let compare (s1: string) (s2: string) = Pervasives.compare s1 s2 - -let equal s1 s2 = - compare s1 s2 = 0 - let analysis_stops = "ANALYSIS_STOPS" let array_out_of_bounds_l1 = "ARRAY_OUT_OF_BOUNDS_L1" let array_out_of_bounds_l2 = "ARRAY_OUT_OF_BOUNDS_L2" diff --git a/infer/src/IR/Localise.mli b/infer/src/IR/Localise.mli index e351b8fea..f24be7f1b 100644 --- a/infer/src/IR/Localise.mli +++ b/infer/src/IR/Localise.mli @@ -13,7 +13,9 @@ open! Utils (** Support for localisation *) (** type of string used for localisation *) -type t +type t [@@deriving compare] + +val equal : t -> t -> bool (** pretty print a localised string *) val pp : Format.formatter -> t -> unit @@ -24,11 +26,6 @@ val from_string : string -> t (** convert a localised string to an ordinary string *) val to_string : t -> string -(** compare two localised strings *) -val compare : t -> t -> int - -val equal : t -> t -> bool - val analysis_stops : t val array_out_of_bounds_l1 : t val array_out_of_bounds_l2 : t