Debian Codegraph @

interp/constrextern.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 Termops
13 open EConstr
14 open Environ
15 open Libnames
16 open Glob_term
17 open Pattern
18 open Constrexpr
19 open Notation_term
20 open Ltac_pretype
21
22 (** Translation of pattern, cases pattern, glob_constr and term into syntax
23 trees for printing *)
24
25 type extern_env = {
26 vars : Id.Set.t;
27 uvars : UnivNames.universe_binders;
28 flags : PrintingFlags.Extern.t;
29 }
30 val extern_env : flags:PrintingFlags.Extern.t -> env -> Evd.evar_map -> extern_env
31
32 val extern_cases_pattern : flags:PrintingFlags.Extern.t -> Id.Set.t -> 'a cases_pattern_g -> cases_pattern_expr
33 val extern_glob_constr : extern_env -> 'a glob_constr_g -> constr_expr
34 val extern_glob_type : ?impargs:Glob_term.binding_kind list -> extern_env -> 'a glob_constr_g -> constr_expr
35 val extern_constr_pattern : flags:PrintingFlags.Extern.t -> names_context -> Evd.evar_map ->
36 constr_pattern -> constr_expr
37 val extern_uninstantiated_pattern : flags:PrintingFlags.Extern.t -> names_context -> Evd.evar_map ->
38 uninstantiated_pattern -> constr_expr
39 val extern_closed_glob : ?goal_concl_style:bool -> ?inctx:bool -> ?scope:scope_name ->
40 flags:PrintingFlags.t -> env -> Evd.evar_map -> closed_glob_constr -> constr_expr
41
42 (** If [b=true] in [extern_constr b env c] then the variables in the first
43 level of quantification clashing with the variables in [env] are renamed.
44 ~lax is for debug printing, when the constr might not be well typed in
45 env, sigma
46 *)
47
48 val extern_constr : ?inctx:bool -> ?scope:scope_name ->
49 flags:PrintingFlags.t -> env -> Evd.evar_map -> constr -> constr_expr
50 val extern_constr_in_scope : ?inctx:bool -> scope_name ->
51 flags:PrintingFlags.t -> env -> Evd.evar_map -> constr -> constr_expr
52 val extern_reference : ?loc:Loc.t -> Id.Set.t -> GlobRef.t -> qualid
53 val extern_type : ?goal_concl_style:bool ->
54 flags:PrintingFlags.t -> env -> Evd.evar_map ->
55 ?impargs:Glob_term.binding_kind list -> types -> constr_expr
56 val extern_sort : universes:bool -> qualities:bool -> Evd.evar_map -> Sorts.t -> sort_expr
57 val extern_rel_context : flags:PrintingFlags.t -> env -> Evd.evar_map ->
58 rel_context -> local_binder_expr list
59
60 (** Customization of the global_reference printer *)
61 val set_extern_reference :
62 (?loc:Loc.t -> Id.Set.t -> GlobRef.t -> qualid) -> unit
63 val get_extern_reference :
64 unit -> (?loc:Loc.t -> Id.Set.t -> GlobRef.t -> qualid)
65
66 (** Probably shouldn't be used *)
67 val empty_extern_env : flags:PrintingFlags.Extern.t -> extern_env
68
69 val set_max_depth : int option -> unit