From 1a0df1029a2a2d0838b81f8639ba14a4cc3421bb Mon Sep 17 00:00:00 2001 From: Josh Berdine <jjb@fb.com> Date: Tue, 29 Nov 2016 16:36:32 -0800 Subject: [PATCH] ppx_compare CallSite Reviewed By: cristianoc Differential Revision: D4232388 fbshipit-source-id: 2673480 --- infer/src/IR/CallSite.ml | 10 +--------- infer/src/IR/CallSite.mli | 4 +--- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/infer/src/IR/CallSite.ml b/infer/src/IR/CallSite.ml index 3893db8e2..61c4dddf3 100644 --- a/infer/src/IR/CallSite.ml +++ b/infer/src/IR/CallSite.ml @@ -14,15 +14,7 @@ type t = pname : Procname.t; loc : Location.t; } - -let compare t1 t2 = - if t1 == t2 - then 0 - else - let n = Procname.compare t1.pname t2.pname in - if n <> 0 - then n - else Location.compare t1.loc t2.loc +[@@deriving compare] let equal t1 t2 = compare t1 t2 = 0 diff --git a/infer/src/IR/CallSite.mli b/infer/src/IR/CallSite.mli index 7b7e0e08c..fe13d13e0 100644 --- a/infer/src/IR/CallSite.mli +++ b/infer/src/IR/CallSite.mli @@ -9,9 +9,7 @@ module F = Format -type t - -val compare : t -> t -> int +type t [@@deriving compare] val equal : t -> t -> bool