Debian Codegraph @

src/rocq_elpi_vernacular.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 open Rocq_elpi_utils
6 open Rocq_elpi_programs
7 open Rocq_elpi_arg_HOAS
8 open Ltac_plugin
9
10 val atts2impl :
11 depth:int -> Elpi.API.Ast.Loc.t -> Summary.Stage.t -> Elpi.API.State.t -> Attributes.vernac_flags ->
12 Elpi.API.Data.term -> Elpi.API.State.t * Elpi.API.Data.term
13
14 type query =
15 | Ast of (Elpi.API.Data.state -> Elpi.API.Data.state) * Elpi.API.Ast.query
16 | Fun of (Elpi.API.Data.state -> Elpi.API.Data.state * Elpi.API.RawData.term * Elpi.API.Conversion.extra_goals)
17
18 type atts = ((clause_scope * (Str.regexp list option * Str.regexp list option)) * phase option)
19
20 module type Common = sig
21
22 val get_and_compile :
23 loc:Loc.t -> qualified_name -> (Elpi.API.Compile.program * bool) option
24 val run : loc:Loc.t ->
25 Elpi.API.Compile.program -> query ->
26 Elpi.API.Execute.outcome
27
28 val accumulate_files : atts:atts -> loc:Loc.t -> ?program:qualified_name -> string list -> unit
29 val accumulate_extra_deps : atts:atts -> loc:Loc.t -> ?program:qualified_name -> what:what -> qualified_name list -> unit
30 val accumulate_plugin : atts:atts -> loc:Loc.t -> ?program:qualified_name -> string -> unit
31 val accumulate_string : atts:atts -> loc:Loc.t -> ?program:qualified_name -> Elpi.API.Ast.Loc.t * string -> unit
32 val accumulate_db : atts:atts -> loc:Loc.t -> ?program:qualified_name -> qualified_name -> unit
33 val accumulate_db_header : atts:atts -> loc:Loc.t -> ?program:qualified_name -> qualified_name -> unit
34 val accumulate_to_db : atts:atts -> loc:Loc.t -> qualified_name -> Elpi.API.Ast.Loc.t * string -> Names.Id.t list -> unit
35
36 (* Setup *)
37 val load_tactic : loc:Loc.t -> string -> unit
38 val load_command : loc:Loc.t -> string -> unit
39
40 val debug : atts:phase option -> string list -> unit
41 val trace : atts:phase option -> int -> int -> string list -> string list -> unit
42 val trace_browser : atts:phase option -> string list -> unit
43 val bound_steps : atts:phase option -> int -> unit
44 val print : atts:phase option -> loc:Loc.t -> name:qualified_name -> args:string list -> string -> unit
45
46 val create_program : atts:bool option -> loc:Loc.t -> program_name -> init:(Elpi.API.Ast.Loc.t * string) -> unit
47 val create_command : atts:bool option -> loc:Loc.t -> program_name -> unit
48 val create_tactic : loc:Loc.t -> program_name -> unit
49 val create_db : atts:phase option -> loc:Loc.t -> program_name -> init:(Elpi.API.Ast.Loc.t * string) -> unit
50 val create_file : atts:phase option -> loc:Loc.t -> program_name -> init:(Elpi.API.Ast.Loc.t * string) -> unit
51
52 end
53
54 module Synterp : sig include Common
55 val run_program : loc:Loc.t -> qualified_name -> atts:Attributes.vernac_flags -> Cmd.raw list -> (Vernacstate.Synterp.t * Rocq_elpi_builtins_synterp.SynterpAction.RZipper.zipper * (target:Elpi.API.Compile.program -> depth:int -> (Elpi.API.Data.term,string) Stdlib.Result.t)) option
56 val run_in_program : loc:Loc.t -> ?program:qualified_name -> Elpi.API.Ast.Loc.t * string -> Rocq_elpi_builtins_synterp.SynterpAction.RZipper.zipper option
57
58 end
59 module Interp : sig include Common
60 val run_program : loc:Loc.t -> qualified_name -> atts:Attributes.vernac_flags -> syndata:(Vernacstate.Synterp.t * Rocq_elpi_builtins_synterp.SynterpAction.RZipper.zipper * (target:Elpi.API.Compile.program -> depth:int -> (Elpi.API.Data.term,string) Stdlib.Result.t)) option -> Cmd.raw list -> unit
61 val run_in_program : loc:Loc.t -> ?program:qualified_name -> syndata:Rocq_elpi_builtins_synterp.SynterpAction.RZipper.zipper option -> Elpi.API.Ast.Loc.t * string -> unit
62 end
63
64 val document_builtins : unit -> unit
65
66
67
68 val run_tactic : loc:Loc.t -> qualified_name -> atts:Attributes.vernac_flags -> Tacinterp.interp_sign -> Tac.top list -> unit Proofview.tactic
69 val run_in_tactic : loc:Loc.t -> ?program:qualified_name -> Elpi.API.Ast.Loc.t * string -> Tacinterp.interp_sign -> unit Proofview.tactic
70
71 (* move to synterp *)
72 val export_command : atts:proof option -> ?as_:qualified_name -> qualified_name -> unit