Debian Codegraph @

ide/rocqide/protocol/xmlprotocol.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 (** * Applicative part of the interface of RocqIDE calls to Rocq *)
12
13 open Interface
14 open Xml_datatype
15
16 type 'a call
17
18 type unknown_call = Unknown : 'a call -> unknown_call
19
20 val add : add_sty -> add_rty call
21 val edit_at : edit_at_sty -> edit_at_rty call
22 val query : query_sty -> query_rty call
23 val goals : goals_sty -> goals_rty call
24 val hints : hints_sty -> hints_rty call
25 val status : status_sty -> status_rty call
26 val mkcases : mkcases_sty -> mkcases_rty call
27 val evars : evars_sty -> evars_rty call
28 val search : search_sty -> search_rty call
29 val get_options : get_options_sty -> get_options_rty call
30 val set_options : set_options_sty -> set_options_rty call
31 val quit : quit_sty -> quit_rty call
32 val init : init_sty -> init_rty call
33 val stop_worker : stop_worker_sty -> stop_worker_rty call
34 (* internal use (fake_ide) only, do not use *)
35 val wait : wait_sty -> wait_rty call
36 (* retrocompatibility *)
37 val interp : interp_sty -> interp_rty call
38 val print_ast : print_ast_sty -> print_ast_rty call
39 val annotate : annotate_sty -> annotate_rty call
40 val proof_diff : proof_diff_sty -> proof_diff_rty call
41 val db_cmd : db_cmd_sty -> db_cmd_rty call
42 val db_upd_bpts : db_upd_bpts_sty -> db_upd_bpts_rty call
43 val db_continue : db_continue_sty -> db_continue_rty call
44 val db_stack : db_stack_sty -> db_stack_rty call
45 val db_vars : db_vars_sty -> db_vars_rty call
46 val db_configd : db_configd_sty -> db_configd_rty call
47 val subgoals : subgoals_sty -> subgoals_rty call
48
49 val abstract_eval_call : handler -> 'a call -> bool * 'a value
50
51 (** * Protocol version *)
52
53 val protocol_version : string
54
55 (** By default, we still output messages in Richpp so we are
56 compatible with 8.6, however, 8.7 aware clients will want to
57 set this to Ppcmds *)
58 type msg_format = Richpp of { width : int; depth : int } | Ppcmds
59
60 (** * XML data marshalling *)
61
62 val of_call : 'a call -> xml
63 val to_call : xml -> unknown_call
64
65 val of_answer : msg_format -> 'a call -> 'a value -> xml
66 val to_answer : 'a call -> xml -> 'a value
67
68 (* Prints the documentation of this module *)
69 val document : (xml -> string) -> unit
70
71 (** * Debug printing *)
72
73 val pr_call : 'a call -> string
74 val pr_value : 'a value -> string
75 val pr_full_value : 'a call -> 'a value -> string
76
77 (** Classification of messages handled by different mechanisms *)
78 type msg_type = Feedback | LtacDebugInfo | Other
79
80 (* EJGA: We could even include the decoding info here *)
81 val msg_kind : xml -> msg_type
82
83 (** * Serialization of feedback *)
84 val of_feedback : msg_format -> Feedback.feedback -> xml
85 val to_feedback : xml -> Feedback.feedback
86
87 (** * Serialization of debugger output *)
88 val of_ltac_debug_answer : tag:string -> Pp.t -> xml
89 val to_ltac_debug_answer : xml -> string * Pp.t
90
91 (** * reply for db_vars message *)
92 val of_vars : (string * Pp.t) list -> xml
93
94 (** * reply for db_stack message *)
95 val of_stack : (string * (string * int list) option) list -> xml