From ec950666a07b248c05f46c8771dcd9383e55c4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezgi=20=C3=87i=C3=A7ek?= Date: Thu, 20 Feb 2020 08:20:39 -0800 Subject: [PATCH] [infer] rely on driving for Procdesc.Node.equal_id Summary: Rather than explicitly defining `equal_id`, let's rely on deriving. Reviewed By: jvillard Differential Revision: D19977777 fbshipit-source-id: 3729b7f69 --- infer/src/IR/Procdesc.ml | 4 +--- infer/src/IR/Procdesc.mli | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/infer/src/IR/Procdesc.ml b/infer/src/IR/Procdesc.ml index 689b1adde..cdb293b5c 100644 --- a/infer/src/IR/Procdesc.ml +++ b/infer/src/IR/Procdesc.ml @@ -26,9 +26,7 @@ end (* =============== START of module Node =============== *) module Node = struct - type id = int [@@deriving compare] - - let equal_id = [%compare.equal: id] + type id = int [@@deriving compare, equal] type destruction_kind = | DestrBreakStmt diff --git a/infer/src/IR/Procdesc.mli b/infer/src/IR/Procdesc.mli index 2c9eba745..140b768c8 100644 --- a/infer/src/IR/Procdesc.mli +++ b/infer/src/IR/Procdesc.mli @@ -24,9 +24,7 @@ module Node : sig type t [@@deriving compare] (** node id *) - type id = private int [@@deriving compare] - - val equal_id : id -> id -> bool + type id = private int [@@deriving compare, equal] type destruction_kind = | DestrBreakStmt