package coq-core
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=0cfaa70f569be9494d24c829e6555d46
sha512=8ee967c636b67b22a4f34115871d8f9b9114df309afc9ddf5f61275251088c6e21f6cf745811df75554d30f4cebb6682f23eeb2e88b771330c4b60ce3f6bf5e2
doc/coq-core.printing/Printer/index.html
Module PrinterSource
These are the entry points for printing terms, context, tac, ...
Terms
Printers for terms.
The "lconstr" variant does not require parentheses to isolate the expression from the surrounding context (for instance 3 + 4 will be written 3 + 4). The "constr" variant (w/o "l") enforces parentheses whenever the term is not an atom (for instance, 3 will be written 3 but 3 + 4 will be written (3 + 4).
~inctx:true indicates that the term is intended to be printed in a context where its type is known so that a head coercion would be skipped, or implicit arguments inferable from the context will not be made explicit. For instance, if foo is declared as a coercion, foo bar will be printed as bar if inctx is true and as foo bar otherwise.
~scope:some_scope_name indicates that the head of the term is intended to be printed in scope some_scope_name. It defaults to None.
~impargs:some_list_of_binding_kind indicates the implicit arguments of the external quatification. Only used for printing types (not terms), and at toplevel (only "l" versions). It defaults to None.
val pr_constr_env :
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
Constr.constr ->
Pp.tval pr_lconstr_env :
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
Constr.constr ->
Pp.tval pr_constr_n_env :
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
Constrexpr.entry_relative_level ->
Constr.constr ->
Pp.tSame, but resilient to Nametab errors. Prints fully-qualified names when shortest_qualid_of_global has failed. Prints "??" in case of remaining issues (such as reference not in env).
val pr_econstr_env :
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
EConstr.t ->
Pp.tval pr_leconstr_env :
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
EConstr.t ->
Pp.tval pr_econstr_n_env :
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
Constrexpr.entry_relative_level ->
EConstr.t ->
Pp.tval pr_etype_env :
?goal_concl_style:bool ->
Environ.env ->
Evd.evar_map ->
EConstr.types ->
Pp.tval pr_letype_env :
?goal_concl_style:bool ->
Environ.env ->
Evd.evar_map ->
?impargs:Glob_term.binding_kind list ->
EConstr.types ->
Pp.tval pr_open_constr_env :
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
Evd.open_constr ->
Pp.tval pr_open_lconstr_env :
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
Evd.open_constr ->
Pp.tval pr_constr_under_binders_env :
Environ.env ->
Evd.evar_map ->
Ltac_pretype.constr_under_binders ->
Pp.tval pr_lconstr_under_binders_env :
Environ.env ->
Evd.evar_map ->
Ltac_pretype.constr_under_binders ->
Pp.tPrinters for types. Types are printed in scope "type_scope" and under the constraint of being of type a sort.
The "ltype" variant does not require parentheses to isolate the expression from the surrounding context (for instance nat * bool will be written nat * bool). The "type" variant (w/o "l") enforces parentheses whenever the term is not an atom (for instance, nat will be written nat but nat * bool will be written (nat * bool).
~goal_concl_style:true tells to print the type the same way as command Show would print a goal. Concretely, it means that all names of goal/section variables and all names of variables referred by de Bruijn indices (if any) in the given environment and all short names of global definitions of the current module must be avoided while printing bound variables. Otherwise, short names of global definitions are printed qualified and only names of goal/section variables and rel names that do _not_ occur in the scope of the binder to be printed are avoided.
val pr_ltype_env :
?goal_concl_style:bool ->
Environ.env ->
Evd.evar_map ->
?impargs:Glob_term.binding_kind list ->
Constr.types ->
Pp.tval pr_type_env :
?goal_concl_style:bool ->
Environ.env ->
Evd.evar_map ->
Constr.types ->
Pp.tval pr_closed_glob_n_env :
?goal_concl_style:bool ->
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
Constrexpr.entry_relative_level ->
Ltac_pretype.closed_glob_constr ->
Pp.tval pr_closed_glob_env :
?goal_concl_style:bool ->
?inctx:bool ->
?scope:Notation_term.scope_name ->
Environ.env ->
Evd.evar_map ->
Ltac_pretype.closed_glob_constr ->
Pp.tval pr_lconstr_pattern_env :
Environ.env ->
Evd.evar_map ->
_ Pattern.constr_pattern_r ->
Pp.tUniverse constraints
val pr_universe_instance_constraints :
Evd.evar_map ->
UVars.Instance.t ->
Univ.Constraints.t ->
Pp.tval pr_universe_ctx :
Evd.evar_map ->
?variance:UVars.Variance.t array ->
UVars.UContext.t ->
Pp.tval pr_abstract_universe_ctx :
Evd.evar_map ->
?variance:UVars.Variance.t array ->
?priv:Univ.ContextSet.t ->
UVars.AbstractContext.t ->
Pp.tval pr_universes :
Evd.evar_map ->
?variance:UVars.Variance.t array ->
?priv:Univ.ContextSet.t ->
Declarations.universes ->
Pp.tval universe_binders_with_opt_names :
UVars.AbstractContext.t ->
UnivNames.full_name_list option ->
UnivNames.universe_binders * UnivNames.rev_bindersuniverse_binders_with_opt_names ref l
If l is Some univs return the universe binders naming the bound levels of ref by univs (generating names for Anonymous). May error if the lengths mismatch.
Otherwise return the bound universe names registered for ref.
Inefficient on large contexts due to name generation.
Printing global references using names as short as possible
val pr_notation_interpretation_env :
Environ.env ->
Evd.evar_map ->
Glob_term.glob_constr ->
Pp.tContexts
Display compact contexts of goals (simple hyps on the same line)
Predicates
Proofs, these functions obey Hyps Limit and Compact contexts.
pr_open_subgoals ~quiet ?diffs proof shows the context for proof as used by, for example, coqtop. The first active goal is printed with all its antecedents and the conclusion. The other active goals only show their conclusions. If diffs is Some oproof, highlight the differences between the old proof oproof, and proof. quiet disables printing messages as Feedback.
val pr_evars_int :
Evd.evar_map ->
shelf:Evar.t list ->
given_up:Evar.t list ->
int ->
Evd.undefined Evd.evar_info Evar.Map.t ->
Pp.ttype axiom = | Constant of Names.Constant.t| Positive of Names.MutInd.t| Guarded of Names.GlobRef.t| TypeInType of Names.GlobRef.t| UIP of Names.MutInd.t
Declarations for the "Print Assumption" command
type context_object = | Variable of Names.Id.t| Axiom of axiom * (Names.Label.t * Constr.rel_context * Constr.types) list| Opaque of Names.Constant.t| Transparent of Names.Constant.t
module ContextObjectSet : Set.S with type elt = context_objectmodule ContextObjectMap :
CMap.ExtS with type key = context_object and module Set := ContextObjectSetTells if flag "Printing Goal Names" is activated