Debian Codegraph @

plugins/ltac2/tac2print.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 Tac2expr
12 open Tac2val
13 open Names
14
15 val pr_tacref : Id.Set.t -> ltac_constant -> Pp.t
16 (** Prints the shortest name for the constant. Also works for
17 constants not in the nametab (because they're local to another
18 module). *)
19
20 (** {5 Printing types} *)
21
22 type typ_level =
23 | T5_l
24 | T5_r
25 | T2
26 | T1
27 | T0
28
29 val pr_typref : type_constant -> Pp.t
30 val pr_glbtype_gen : ('a -> string) -> typ_level -> 'a glb_typexpr -> Pp.t
31 val pr_glbtype : ('a -> string) -> 'a glb_typexpr -> Pp.t
32
33 (** {5 Printing expressions} *)
34
35 val pr_constructor : ltac_constructor -> Pp.t
36 val pr_internal_constructor : type_constant -> int -> bool -> Pp.t
37 val pr_projection : ltac_projection -> Pp.t
38 val pr_glbexpr_gen : exp_level -> avoid:Id.Set.t -> glb_tacexpr -> Pp.t
39 val pr_glbexpr : avoid:Id.Set.t -> glb_tacexpr -> Pp.t
40 val pr_partial_pat : PartialPat.t -> Pp.t
41
42 val pr_rawexpr_gen : exp_level -> avoid:Id.Set.t -> raw_tacexpr -> Pp.t
43
44 val pr_syntax_class : sexpr -> Pp.t
45
46 (** Print main commands, without the "Ltac2" prefix *)
47 val pr_strexpr : strexpr -> Pp.t
48
49 (** Utility function *)
50 val partial_pat_of_glb_pat : glb_pat -> PartialPat.t
51
52 val ids_of_pattern : Id.Set.t -> raw_patexpr -> Id.Set.t
53
54 (** {5 Printing values}*)
55
56 type val_printer =
57 { val_printer : 'a. Environ.env -> Evd.evar_map -> valexpr -> 'a glb_typexpr list -> Pp.t }
58
59 val register_val_printer : type_constant -> val_printer -> unit
60
61 val pr_valexpr : Environ.env -> Evd.evar_map -> valexpr -> 'a glb_typexpr -> Pp.t
62
63 (** {5 Utilities} *)
64
65 val int_name : unit -> (int -> string)
66 (** Create a function that give names to integers. The names are generated on
67 the fly, in the order they are encountered. *)