Debian Codegraph @

src/rocq_elpi_utils.mli

raw symbols SCIP
1 (* rocq-elpi: Coq terms as the object language of elpi *)
2 (* license: GNU Lesser General Public License Version 2.1 or later *)
3 (* ------------------------------------------------------------------------- *)
4
5 val synterp_hoas : Elpi.API.Setup.hoas_descriptor
6 val synterp_quotations : Elpi.API.Setup.quotations_descriptor
7 val synterp_state : Elpi.API.Setup.state_descriptor
8
9 val interp_hoas : Elpi.API.Setup.hoas_descriptor
10 val interp_quotations : Elpi.API.Setup.quotations_descriptor
11 val interp_state : Elpi.API.Setup.state_descriptor
12
13 val to_coq_loc : Elpi.API.Ast.Loc.t -> Loc.t
14 val of_coq_loc : Loc.t -> Elpi.API.Ast.Loc.t
15
16 val elpi_cat : CWarnings.category
17 val elpi_depr_cat : CWarnings.category
18
19 val err : ?loc:Elpi.API.Ast.Loc.t -> Pp.t -> 'a
20
21 (* CompileError, ParserError, Gramlib.Error (coq parser inside quotations) and Sys_error *)
22 val handle_elpi_compiler_errors :
23 loc:Loc.t -> ?error_header:string -> (unit -> 'b) -> 'b
24
25 exception LtacFail of int * Pp.t
26 val ltac_fail_err : ?loc:Elpi.API.Ast.Loc.t -> int -> Pp.t -> 'a
27 val nYI : string -> 'a
28 val safe_destApp : Evd.evar_map ->
29 EConstr.t -> (EConstr.t,EConstr.types,EConstr.ESorts.t, EConstr.EInstance.t, EConstr.ERelevance.t) Constr.kind_of_term * EConstr.t array
30 val mkGHole : Glob_term.glob_constr
31 val pp2string : (Format.formatter -> 'a -> unit) -> 'a -> string
32 val mkApp : depth:int -> Elpi.API.RawData.term -> Elpi.API.RawData.term list -> Elpi.API.RawData.term
33
34 val string_split_on_char : char -> string -> string list
35 val mk_gforall : Glob_term.glob_constr -> Glob_term.glob_decl list -> Glob_term.glob_constr
36 val mk_gfun : Glob_term.glob_constr -> Glob_term.glob_decl list -> Glob_term.glob_constr
37 val manual_implicit_of_binding_kind : Names.Name.t -> Glob_term.binding_kind -> (Names.Name.t * bool) option CAst.t
38 val manual_implicit_of_gdecl : Glob_term.glob_decl -> (Names.Name.t * bool) option CAst.t
39 val binding_kind_of_manual_implicit : (Names.Name.t * bool) option CAst.t -> Glob_term.binding_kind
40
41 val lookup_inductive : Environ.env -> Names.inductive -> Declarations.mutual_inductive_body * Declarations.one_inductive_body
42 val locate_gref : string -> Names.GlobRef.t
43 val locate_qualid : Libnames.qualid -> [ `Gref of Names.GlobRef.t | `Abbrev of Globnames.abbreviation ] option
44 val locate_simple_qualid : Libnames.qualid -> Names.GlobRef.t
45
46 val fold_elpi_term :
47 (depth:int -> 'a -> Elpi.API.Data.term -> 'a) ->
48 'a -> depth:int -> Elpi.API.RawData.view -> 'a
49
50 val uint63 : Uint63.t Elpi.API.Conversion.t
51 val float64 : Float64.t Elpi.API.Conversion.t
52 val projection : Names.Projection.t Elpi.API.Conversion.t
53 val pstring : Pstring.t Elpi.API.Conversion.t
54 val uint63c : Uint63.t Elpi.API.RawOpaqueData.cdata
55 val float64c : Float64.t Elpi.API.RawOpaqueData.cdata
56 val projectionc : Names.Projection.t Elpi.API.RawOpaqueData.cdata
57 val pstringc : Pstring.t Elpi.API.RawOpaqueData.cdata
58
59 val pstring_of_string : string -> Pstring.t option
60 val string_of_pstring : Pstring.t -> string
61
62 val debug : CDebug.t
63 val elpitime : CDebug.t
64 val elpitime_flag : CDebug.flag
65
66 type clause_scope = Local | Regular | Global | SuperGlobal
67 val pp_scope : Format.formatter -> clause_scope -> unit
68
69 val list_map_acc : ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list
70
71 val pr_constr_expr : Environ.env -> Evd.evar_map -> Constrexpr.constr_expr -> Pp.t
72
73 val detype : ?keepunivs:bool -> Environ.env -> Evd.evar_map -> EConstr.t -> Glob_term.glob_constr
74 val detype_closed_glob : Environ.env -> Evd.evar_map -> Ltac_pretype.closed_glob_constr -> Glob_term.glob_constr
75
76 val detype_to_pattern : Environ.env -> Evd.evar_map -> EConstr.t -> Names.Id.Set.t * Pattern.constr_pattern
77
78 type qualified_name = string list
79 val compare_qualified_name : qualified_name -> qualified_name -> int
80 val pr_qualified_name : qualified_name -> Pp.t
81 val show_qualified_name : qualified_name -> string
82 val pp_qualified_name : Format.formatter -> qualified_name -> unit
83
84 val option_map_acc : ('a -> 'b -> 'a * 'c) -> 'a -> 'b option -> 'a * 'c option
85 val option_map_acc2 : (Elpi.API.State.t -> 'b -> Elpi.API.State.t * 'c * Elpi.API.Conversion.extra_goals) -> Elpi.API.State.t -> 'b option -> Elpi.API.State.t * 'c option * Elpi.API.Conversion.extra_goals
86 val option_default : (unit -> 'a) -> 'a option -> 'a
87
88 val coq_version_parser : string -> int * int * int
89
90 val mp2path: Names.ModPath.t -> string list
91 val gr2path: Names.GlobRef.t -> string list
92
93 val eta_contract : Environ.env -> Evd.evar_map -> EConstr.t -> EConstr.t
94
95 val is_sync_anomaly : exn -> bool
96
97 val push_named : Constr.named_declaration -> Environ.env -> Environ.env
98
99 val get_projection_constant : Environ.env -> Names.Projection.Repr.t -> Names.Constant.t
100
101 val prune_uvar : Elpi.API.State.t -> Elpi.API.FlexibleData.Elpi.t -> Elpi.API.RawData.term list -> Elpi.API.State.t * Elpi.API.Conversion.extra_goal