aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/names.ml
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/names.ml')
-rw-r--r--kernel/names.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/names.ml b/kernel/names.ml
index 02587bad9..0aa26fb9c 100644
--- a/kernel/names.ml
+++ b/kernel/names.ml
@@ -82,6 +82,12 @@ struct
type t = Anonymous (** anonymous identifier *)
| Name of Id.t (** non-anonymous identifier *)
+ let is_anonymous = function
+ | Anonymous -> true
+ | Name _ -> false
+
+ let is_name = not % is_anonymous
+
let compare n1 n2 = match n1, n2 with
| Anonymous, Anonymous -> 0
| Name id1, Name id2 -> Id.compare id1 id2