Skip to content
Snippets Groups Projects
Commit 73a9e739 authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[wp] Always display script name

parent e56cfa2d
No related branches found
No related tags found
No related merge requests found
...@@ -547,14 +547,16 @@ class pane (gprovers : GuiConfig.provers) = ...@@ -547,14 +547,16 @@ class pane (gprovers : GuiConfig.provers) =
begin fun () -> begin fun () ->
text#clear ; text#clear ;
let main = ProofEngine.main proof in let main = ProofEngine.main proof in
if ProofSession.exists main then begin if ProofSession.exists main then
text#printf text#printf
(if ProofEngine.saved proof (if ProofEngine.saved proof
then "%a (@{<green>saved@})@." then "%a (@{<green>saved@})@."
else "%a (@{<orange>modified@})@.") else "%a (@{<orange>modified@})@.")
ProofSession.pp_script_for main
else
text#printf "%a (@{<blue>not created@})@."
ProofSession.pp_script_for main ; ProofSession.pp_script_for main ;
text#hrule ; text#hrule ;
end ;
scripter#tree proof ; scripter#tree proof ;
text#hrule ; text#hrule ;
text#printf "%t@." (printer#goal (ProofEngine.head proof)) ; text#printf "%t@." (printer#goal (ProofEngine.head proof)) ;
......
...@@ -61,12 +61,11 @@ let get wpo = ...@@ -61,12 +61,11 @@ let get wpo =
let pp_file fmt s = Filepath.Normalized.(pretty fmt (of_string s)) let pp_file fmt s = Filepath.Normalized.(pretty fmt (of_string s))
let pp_script fmt = function let pp_script_for fmt wpo =
| NoScript -> Format.pp_print_string fmt "no script file" match get wpo with
| Script f -> Format.fprintf fmt "script '%a'" pp_file f | Script f -> Format.fprintf fmt "script '%a'" pp_file f
| Deprecated f -> Format.fprintf fmt "script '%a' (deprecated)" pp_file f | Deprecated f -> Format.fprintf fmt "(deprecated) script '%a'" pp_file f
| _ -> Format.fprintf fmt "script '%a'" pp_file @@ filename ~force:false wpo
let pp_script_for fmt wpo = pp_script fmt (get wpo)
let exists wpo = let exists wpo =
match get wpo with NoScript -> false | Script _ | Deprecated _ -> true match get wpo with NoScript -> false | Script _ | Deprecated _ -> true
......
...@@ -25,7 +25,6 @@ type script = ...@@ -25,7 +25,6 @@ type script =
| Script of string | Script of string
| Deprecated of string | Deprecated of string
val pp_script : Format.formatter -> script -> unit
val pp_script_for : Format.formatter -> Wpo.t -> unit val pp_script_for : Format.formatter -> Wpo.t -> unit
val get : Wpo.t -> script val get : Wpo.t -> script
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment