aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/global.mli
blob: da0386be1d09b8a20ed6c2e9db315aabaee07190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

(*i $Id$ i*)

(*i*)
open Names
open Univ
open Term
open Sign
open Declarations
open Inductive
open Environ
open Safe_typing
(*i*)

(* This module defines the global environment of Coq. 
   The functions below are exactly the same as the ones in [Typing],
   operating on that global environment. *)

val safe_env : unit -> safe_environment
val env : unit -> env

val universes : unit -> universes
val context : unit -> context
val named_context : unit -> named_context

val push_named_assum : identifier * constr -> unit
val push_named_def : identifier * constr -> unit

val add_parameter : section_path -> constr -> local_names -> unit
val add_constant : section_path -> constant_entry -> local_names -> unit
val add_discharged_constant : section_path -> Cooking.recipe -> 
  local_names -> unit
val add_mind : section_path -> mutual_inductive_entry -> local_names -> unit
val add_constraints : constraints -> unit

val pop_named_decls : identifier list -> unit

val lookup_named : identifier -> constr option * types
val lookup_constant : section_path -> constant_body
val lookup_mind : section_path -> mutual_inductive_body
val lookup_mind_specif : inductive -> inductive_instance

val set_opaque : section_path -> unit
val set_transparent : section_path -> unit

val export : string -> compiled_env
val import : compiled_env -> unit

(*s Some functions of [Environ] instanciated on the global environment. *)

val sp_of_global : global_reference -> section_path

(*s This is for printing purpose *)
val qualid_of_global : global_reference -> Nametab.qualid
val string_of_global : global_reference -> string

(*s Function to get an environment from the constants part of the global
    environment and a given context. *)

val env_of_context : named_context -> env

(*s Re-exported functions of [Inductive], composed with 
    [lookup_mind_specif]. *)

val mind_is_recursive : inductive -> bool
val mind_nconstr : inductive -> int
val mind_nparams : inductive -> int
val mind_nf_lc : inductive -> constr array