aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/names.mli
diff options
context:
space:
mode:
authorGravatar Matej Kosik <m4tej.kosik@gmail.com>2016-02-18 14:19:21 +0100
committerGravatar Matej Kosik <m4tej.kosik@gmail.com>2016-02-18 14:19:21 +0100
commite4c9dfe7277ec2e2c4b1e40f60044ba4cade8e61 (patch)
treee6138370f9b1c2e174f9b13bf0f11e4f39aa667e /kernel/names.mli
parent93c03652fea5914307b0a6b72b7fec6f9aaec305 (diff)
ADD: Names.Name.is_{anonymous,name}
Two new (trivial) functions were added: Names.Name.is_anonymous : Names.Name.t -> bool Names.Name.is_name : Names.Name.t -> bool They enable us to write a more compact code. (example: commit "99633f4" in "relation-extraction" module of "coq-contribs").
Diffstat (limited to 'kernel/names.mli')
-rw-r--r--kernel/names.mli6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/names.mli b/kernel/names.mli
index 40f96813f..6380b17fb 100644
--- a/kernel/names.mli
+++ b/kernel/names.mli
@@ -68,6 +68,12 @@ sig
type t = Anonymous (** anonymous identifier *)
| Name of Id.t (** non-anonymous identifier *)
+ val is_anonymous : t -> bool
+ (** Return [true] iff a given name is [Anonymous]. *)
+
+ val is_name : t -> bool
+ (** Return [true] iff a given name is [Name _]. *)
+
val compare : t -> t -> int
(** Comparison over names. *)