Skip to content

Commit

Permalink
Merge pull request #429 from SkySkimmer/coqargs-pure
Browse files Browse the repository at this point in the history
Adapt to coq/coq#19757 (Coqargs is pure)
  • Loading branch information
SkySkimmer authored Oct 30, 2024
2 parents 8dbcdb3 + 2da8238 commit a86129f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion serapi/serapi_protocol.ml
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ let exec_cmd (st : State.t) (cmd : cmd) : answer_kind list * State.t =
| NewDoc opts ->
(* spawn_args probably wrong *)
let stm_options = Stm.AsyncOpts.default_opts ~spawn_args:[] in
let require_libs = Option.default [{Coqargs.lib="Stdlib.Init.Prelude"; prefix=None; export=Some Lib.Export; allow_failure=false}] opts.require_libs in
let require_libs = Option.default [{Coqargs.lib="Stdlib.Init.Prelude"; prefix=None; export=Some Export; allow_failure=false}] opts.require_libs in
Stm.init_process stm_options;
let ndoc = { Stm.doc_type = Stm.(Interactive opts.top_name)
; injections = List.map (fun x -> Coqargs.RequireInjection x) require_libs
Expand Down
4 changes: 4 additions & 0 deletions serlib_extra/ser_coqargs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ type top =
[%import: Coqargs.top]
[@@deriving sexp]

type export_flag =
[%import: Coqargs.export_flag]
[@@deriving sexp]

type require_injection =
[%import: Coqargs.require_injection]
[@@deriving sexp]
2 changes: 1 addition & 1 deletion sertop/comp_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let create_document ~debug ~set_impredicative_set ~disallow_sprop ~ml_path ~load
else stm_options
in

let injections = [Coqargs.RequireInjection {lib="Stdlib.Init.Prelude"; prefix=None; export=Some Lib.Import; allow_failure=false}] in
let injections = [Coqargs.RequireInjection {lib="Stdlib.Init.Prelude"; prefix=None; export=Some Import; allow_failure=false}] in
Stm.init_process stm_options;
let ndoc = { Stm.doc_type = Stm.VoDoc in_file
; injections
Expand Down
4 changes: 2 additions & 2 deletions sertop/sertop_sexp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ let out_answer opts =
let doc_type topfile =
match topfile with
| None ->
let sertop_dp = Names.(DirPath.make [Id.of_string "SerTop"]) in
let sertop_dp = "SerTop" in
Stm.Interactive (TopLogical sertop_dp)
| Some filename -> Stm.Interactive (Coqargs.TopPhysical filename)

Expand Down Expand Up @@ -234,7 +234,7 @@ let ser_loop ser_opts =

let injections =
if ser_opts.no_prelude then []
else [Coqargs.RequireInjection {lib="Stdlib.Init.Prelude"; prefix=None; export=Some Lib.Import; allow_failure=false}] in
else [Coqargs.RequireInjection {lib="Stdlib.Init.Prelude"; prefix=None; export=Some Import; allow_failure=false}] in

let stm_options = Sertop_init.process_stm_flags ser_opts.async in
Stm.init_process stm_options;
Expand Down

0 comments on commit a86129f

Please sign in to comment.