Module Stm
state-transaction-machine interface
module AsyncOpts : sig ... endtype interactive_top=|TopLogical of Names.DirPath.t|TopPhysical of stringtype stm_doc_type=|VoDoc of string|VioDoc of string|Interactive of interactive_topThe STM document type
stm_doc_typedetermines some properties such as what uncompleted proofs are allowed and what gets recorded to aux files.
type stm_init_options={doc_type : stm_doc_type;iload_path : Loadpath.coq_path list;require_libs : (string * string option * bool option) list;stm_options : AsyncOpts.stm_opt;}Coq initialization options:
doc_type: Type of document being created.
require_libs: list of libraries/modules to be pre-loaded at startup. A tuple(modname,modfrom,import)is equivalent toFrom modfrom Require modname;importworks similarly toLibrary.require_library_from_dirpath,Some falsewill import the module,Some truewill additionally export it.
val init_core : unit -> unitinit_coreperforms some low-level initialization; should go away in future releases.
val new_doc : stm_init_options -> doc * Stateid.tnew_doc optCreates a new document with optionsopt
val parse_sentence : doc:doc -> Stateid.t -> entry:(Pvernac.proof_mode option -> 'a Pcoq.Entry.t) -> Pcoq.Parsable.t -> 'aparse_sentence sid entry paReads a sentence frompawith parsing statesidand non terminalentry.entryreceives in input the current proof mode.sidshould be associated with a valid parsing state (which may not be the case if an error was raised at parsing time).
val add : doc:doc -> ontop:Stateid.t -> ?newtip:Stateid.t -> bool -> Vernacexpr.vernac_control -> doc * Stateid.t * [ `NewTip | `Unfocus of Stateid.t ]val get_prev_proof : doc:doc -> Stateid.t -> Proof.t optionval get_proof : doc:doc -> Stateid.t -> Proof.t optionval query : doc:doc -> at:Stateid.t -> route:Feedback.route_id -> Pcoq.Parsable.t -> unit
val edit_at : doc:doc -> Stateid.t -> doc * [ `NewTip | `Focus of focus ]val observe : doc:doc -> Stateid.t -> docval finish : doc:doc -> docval wait : doc:doc -> docval stop_worker : string -> unitval join : doc:doc -> docval snapshot_vio : create_vos:bool -> doc:doc -> output_native_objects:bool -> Names.DirPath.t -> string -> docval reset_task_queue : unit -> unit
val check_task : string -> tasks -> int -> boolval info_tasks : tasks -> (string * float * int) listval finish_tasks : string -> Library.seg_univ -> Library.seg_proofs -> tasks -> Library.seg_univ * Library.seg_proofsval get_current_state : doc:doc -> Stateid.tval get_ldir : doc:doc -> Names.DirPath.tval get_ast : doc:doc -> Stateid.t -> Vernacexpr.vernac_control optionval set_compilation_hints : string -> unitval set_perspective : doc:doc -> Stateid.t list -> unit
module ProofTask : AsyncTaskQueue.Taskmodule TacTask : AsyncTaskQueue.Taskmodule QueryTask : AsyncTaskQueue.Taskmodule DynBlockData : Dyn.Stype static_block_declaration={block_start : Stateid.t;block_stop : Stateid.t;dynamic_switch : Stateid.t;carry_on_data : DynBlockData.t;}type document_node={indentation : int;ast : Vernacexpr.vernac_control;id : Stateid.t;}type document_view={entry_point : document_node;prev_node : document_node -> document_node option;}type static_block_detection= document_view -> static_block_declaration optiontype recovery_action={base_state : Stateid.t;goals_to_admit : Goal.goal list;recovery_command : Vernacexpr.vernac_control option;}type dynamic_block_error_recovery= doc -> static_block_declaration -> [ `ValidBlock of recovery_action | `Leaks ]
val register_proof_block_delimiter : Vernacextend.proof_block_name -> static_block_detection -> dynamic_block_error_recovery -> unit
val state_computed_hook : (doc:doc -> Stateid.t -> in_cache:bool -> unit) Hook.tval unreachable_state_hook : (doc:doc -> Stateid.t -> Exninfo.iexn -> unit) Hook.tval state_ready_hook : (doc:doc -> Stateid.t -> unit) Hook.tval forward_feedback_hook : (Feedback.feedback -> unit) Hook.tval document_add_hook : (Vernacexpr.vernac_control -> Stateid.t -> unit) Hook.tUser adds a sentence to the document (after parsing)
val get_doc : Feedback.doc_id -> docval state_of_id : doc:doc -> Stateid.t -> [ `Valid of Vernacstate.t option | `Expired | `Error of exn ]val current_proof_depth : doc:doc -> intval get_all_proof_names : doc:doc -> Names.Id.t listval stm_debug : bool Stdlib.refEnable STM debugging