mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
pick proof format with env variable
This commit is contained in:
parent
2eee760e29
commit
6a9dbb8440
1 changed files with 13 additions and 5 deletions
|
|
@ -464,13 +464,21 @@ module Quip = struct
|
|||
output_char out ')'
|
||||
end
|
||||
|
||||
type out_format = Sexp | CSexp
|
||||
let default_out_format = Sexp
|
||||
|
||||
let out_format_ = match Sys.getenv_opt "PROOF_FMT" with
|
||||
| Some "csexp" -> CSexp
|
||||
| Some "sexp" -> Sexp
|
||||
| Some s -> failwith (Printf.sprintf "unknown proof format %S" s)
|
||||
| None -> default_out_format
|
||||
|
||||
let output oc (self:t) : unit =
|
||||
match out_format_ with
|
||||
| Sexp -> let module M = Make(Out_sexp) in M.pp self oc
|
||||
| CSexp ->
|
||||
(* canonical sexp *)
|
||||
if true then (
|
||||
let module M = Make(Out_sexp) in M.pp self oc
|
||||
) else (
|
||||
let module M = Make(Out_csexp) in M.pp self oc
|
||||
)
|
||||
end
|
||||
|
||||
let pp_debug ~sharing out p =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue