Debian Codegraph @

interp/smartlocate.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 open Names
12 open Libnames
13 open Globnames
14
15 (** [locate_global_with_alias] locates global reference possibly following
16 a notation if this notation has a role of aliasing; raise [Not_found]
17 if not bound in the global env; raise a [UserError] if bound to a
18 syntactic def that does not denote a reference *)
19
20 val locate_global_with_alias : ?head:bool -> qualid -> GlobRef.t
21
22 (** Extract a global_reference from a reference that can be an "alias".
23 If the reference points to a more complex term, we return None *)
24 val global_of_extended_global : extended_global_reference -> GlobRef.t option
25
26 (** Locate a reference taking into account possible "alias" notations.
27 May raise [Nametab.GlobalizationError _] for an unknown reference,
28 or a [UserError] if bound to a syntactic def that does not denote
29 a reference. *)
30 val global_with_alias : ?head:bool -> qualid -> GlobRef.t
31
32 (** The same for constants *)
33 val global_constant_with_alias : qualid -> Constant.t
34
35 (** The same for inductive types *)
36 val global_inductive_with_alias : qualid -> inductive
37
38 (** The same for constructors of an inductive type *)
39 val global_constructor_with_alias : qualid -> constructor
40
41 (** Locate a reference taking into account notations and "aliases" *)
42 val smart_global : ?head:bool -> qualid Constrexpr.or_by_notation -> GlobRef.t
43
44 (** The same for constants *)
45 val smart_global_constant : qualid Constrexpr.or_by_notation -> Constant.t
46
47 (** The same for inductive types *)
48 val smart_global_inductive : qualid Constrexpr.or_by_notation -> inductive
49
50 (** The same for constructors of an inductive type *)
51 val smart_global_constructor : qualid Constrexpr.or_by_notation -> constructor