diff options
Diffstat (limited to 'library')
| -rw-r--r-- | library/globnames.ml | 8 | ||||
| -rw-r--r-- | library/globnames.mli | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/library/globnames.ml b/library/globnames.ml index 63cb2c69bd..e55a7b5499 100644 --- a/library/globnames.ml +++ b/library/globnames.ml @@ -73,13 +73,7 @@ let global_of_constr c = match kind c with | Var id -> VarRef id | _ -> raise Not_found -let is_global c t = - match c, kind t with - | ConstRef c, Const (c', _) -> Constant.equal c c' - | IndRef i, Ind (i', _) -> eq_ind i i' - | ConstructRef i, Construct (i', _) -> eq_constructor i i' - | VarRef id, Var id' -> Id.equal id id' - | _ -> false +let is_global = Constr.isRefX let printable_constr_of_global = function | VarRef id -> mkVar id diff --git a/library/globnames.mli b/library/globnames.mli index d61cdd2b64..fb59cbea4e 100644 --- a/library/globnames.mli +++ b/library/globnames.mli @@ -32,6 +32,7 @@ val destIndRef : GlobRef.t -> inductive val destConstructRef : GlobRef.t -> constructor val is_global : GlobRef.t -> constr -> bool +[@@ocaml.deprecated "Use [Constr.isRefX] instead."] val subst_constructor : substitution -> constructor -> constructor val subst_global : substitution -> GlobRef.t -> GlobRef.t * constr Univ.univ_abstracted option @@ -44,6 +45,7 @@ val printable_constr_of_global : GlobRef.t -> constr (** Turn a construction denoting a global reference into a global reference; raise [Not_found] if not a global reference *) val global_of_constr : constr -> GlobRef.t +[@@ocaml.deprecated "Use [Constr.destRef] instead (throws DestKO instead of Not_found)."] (** {6 Extended global references } *) |
