Debian Codegraph @

toplevel/coqtop.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 (** Definition of custom toplevels.
12 [init_extra] is used to do custom initialization
13 [run] launches a custom toplevel.
14 *)
15
16 type ('a,'b) custom_toplevel =
17 { parse_extra : Coqargs.t -> string list -> 'a * string list
18 ; usage : Boot.Usage.specific_usage
19 ; init_extra : 'a -> Coqargs.injection_command list -> opts:Coqargs.t -> 'b
20 ; initial_args : Coqargs.t
21 ; run : 'a -> opts:Coqargs.t -> 'b -> unit
22 }
23
24 (** The generic Rocq main module. [start custom] will parse the command line,
25 print the banner, initialize the load path, load the input state,
26 load the files given on the command line, load the resource file,
27 produce the output state if any, and finally will launch
28 [custom.run].
29
30 The [string list] argument is typically [List.tl (Array.to_list Sys.argv)].
31 *)
32 val start_coq : ('a * Stm.AsyncOpts.stm_opt,'b) custom_toplevel -> string list -> unit
33
34 (** Prepare state for interactive loop *)
35
36 val init_toploop : Coqargs.t -> Stm.AsyncOpts.stm_opt -> Coqargs.injection_command list -> Vernac.State.t
37
38 (** The specific characterization of the coqtop_toplevel *)
39
40 type query = PrintTags | PrintModUid of string list
41 type run_mode = Interactive | Batch | Query of query
42
43 type toplevel_options = {
44 run_mode : run_mode;
45 color_mode : Colors.color;
46 }
47
48 val coqtop_toplevel : (toplevel_options * Stm.AsyncOpts.stm_opt,Vernac.State.t) custom_toplevel
49
50 val ltac_debug_answer : DebugHook.Answer.t -> unit
51
52 val ltac_debug_parse : unit -> DebugHook.Action.t