Debian Codegraph @

toplevel/workerLoop.ml

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 let worker_parse_extra opts extra_args =
12 let stm_opts, extra_args = Stmargs.parse_args opts extra_args in
13 ((),stm_opts), extra_args
14
15 let worker_init init ((),stm_opts) injections ~opts : Vernac.State.t =
16 Flags.quiet := true;
17 init ();
18 Coqtop.init_toploop opts stm_opts injections
19
20 let usage = Boot.Usage.{
21 executable_name = "rocqworker";
22 extra_args = "";
23 extra_options = ("\n" ^ "rocqworker" ^ " specific options:\
24 \n --xml_format=Ppcmds serialize pretty printing messages using the std_ppcmds format\n");
25 }
26
27 let start ~init ~loop args =
28 let open Coqtop in
29 let custom = {
30 parse_extra = worker_parse_extra;
31 usage;
32 initial_args = Coqargs.default;
33 init_extra = worker_init init;
34 run = (fun ((),_) ~opts:_ (_state : Vernac.State.t) ->
35 (* the state is not used since the worker will receive one from master *)
36 loop ());
37 } in
38 start_coq custom args