| 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 | |
| 13 | (** Whether the [Generate Goal Names] option is enabled. *) |
| 14 | val generate_goal_names : unit -> bool |
| 15 | |
| 16 | (** Represents an evar name map. *) |
| 17 | type t |
| 18 | |
| 19 | (** Returns an empty name map. *) |
| 20 | val empty : t |
| 21 | |
| 22 | (** Adds a binding for the given undefined evar to the given basename. |
| 23 | The absolute path is obtained using the parent of the evar. *) |
| 24 | val add : Id.t -> Evar.t -> ?parent:Evar.t -> t -> t |
| 25 | |
| 26 | (** Adds a (potentially fresh) binding for the given undefined evar to the given |
| 27 | basename by first checking for conflicts. *) |
| 28 | val add_fresh : Id.t -> Evar.t -> ?parent:Evar.t -> t -> t |
| 29 | |
| 30 | (** Removes the name of the given evar. |
| 31 | This indicates that the evar was defined, and therefore is no longer |
| 32 | accessible by name. *) |
| 33 | val remove : Evar.t -> t -> t |
| 34 | |
| 35 | (** Transfers the name of the first evar to the second. *) |
| 36 | val transfer_name : Evar.t -> Evar.t -> t -> t |
| 37 | |
| 38 | (** Returns the qualified name associated to the evar, if any. *) |
| 39 | val name_of : Evar.t -> t -> Libnames.full_path option |
| 40 | |
| 41 | (** Returns [true] if the evar has a name. |
| 42 | Equivalent to [name_of ev <> None] but faster since it does not compute the |
| 43 | fully qualified name of [ev]. *) |
| 44 | val has_name : Evar.t -> t -> bool |
| 45 | |
| 46 | (** Returns [true] if the evar has a name that is unambiguous. *) |
| 47 | val has_unambiguous_name : Evar.t -> t -> bool |
| 48 | |
| 49 | (** Resolves the given (partially) qualified name to an evar. |
| 50 | If the name resolution failed, raises [Not_found]. *) |
| 51 | val resolve : Libnames.qualid -> t -> Evar.t |