diff options
| author | Emilio Jesus Gallego Arias | 2019-07-08 12:23:00 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-07-08 12:23:00 +0200 |
| commit | d6954d853ac1e0bdcf63a50b9d96fcb38559d8a9 (patch) | |
| tree | 5c17149292f54e3bfe3b4d3977825a10c3de8a92 /toplevel/workerLoop.ml | |
| parent | ae7fc8bc74289bd8a1eca48c8ca8ecf923888285 (diff) | |
| parent | f2779d48d3b7735687444e22b16cdb7cb8f7ce60 (diff) | |
Merge PR #10246: Investigations in the initialization of coq binaries and command line (part 1)
Reviewed-by: ejgallego
Ack-by: gares
Ack-by: herbelin
Diffstat (limited to 'toplevel/workerLoop.ml')
| -rw-r--r-- | toplevel/workerLoop.ml | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/toplevel/workerLoop.ml b/toplevel/workerLoop.ml index d362f9db22..5f80ac475c 100644 --- a/toplevel/workerLoop.ml +++ b/toplevel/workerLoop.ml @@ -13,18 +13,28 @@ let rec parse = function | x :: rest -> x :: parse rest | [] -> [] -let arg_init init ~opts extra_args = - let extra_args = parse extra_args in +let worker_parse_extra ~opts extra_args = + (), parse extra_args + +let worker_init init () ~opts = Flags.quiet := true; init (); - CoqworkmgrApi.(init !async_proofs_worker_priority); - opts, extra_args + Coqtop.init_toploop opts + +let worker_specific_usage name = Usage.{ + executable_name = name; + extra_args = ""; + extra_options = ("\n" ^ name ^ " specific options:\ +\n --xml_format=Ppcmds serialize pretty printing messages using the std_ppcmds format\n"); +} -let start ~init ~loop = +let start ~init ~loop name = let open Coqtop in let custom = { + parse_extra = worker_parse_extra; + help = worker_specific_usage name; opts = Coqargs.default; - init = arg_init init; - run = (fun ~opts:_ ~state:_ -> loop ()); + init = worker_init init; + run = (fun () ~opts:_ _state (* why is state not used *) -> loop ()); } in start_coq custom |
