aboutsummaryrefslogtreecommitdiff
path: root/toplevel
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2016-09-29 16:06:43 +0200
committerEmilio Jesus Gallego Arias2017-03-21 15:47:13 +0100
commit8f8af9e4ebf1ea1ed15f765196ef5af8a77d3c27 (patch)
tree0ed33666fbd900f5b0aeff5bfd3096a837ee26e1 /toplevel
parent2617a83e572531e26734cff8b9eb8aa09d49b850 (diff)
[pp] Prepare for serialization, remove opaque glue.
We also remove flushing operations `msg_with`, now the flushing responsibility belong to the owner of the formatter.
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/coqloop.ml4
-rw-r--r--toplevel/coqtop.ml2
-rw-r--r--toplevel/vernac.ml3
3 files changed, 6 insertions, 3 deletions
diff --git a/toplevel/coqloop.ml b/toplevel/coqloop.ml
index 5521e8a40d..2cb6083261 100644
--- a/toplevel/coqloop.ml
+++ b/toplevel/coqloop.ml
@@ -13,7 +13,9 @@ open Flags
open Vernac
open Pcoq
-let top_stderr x = msg_with ~pp_tag:Ppstyle.to_format !Pp_control.err_ft x
+let top_stderr x =
+ pp_with ~pp_tag:Ppstyle.to_format !Pp_control.err_ft x;
+ Format.pp_print_flush !Pp_control.err_ft ()
(* A buffer for the character read from a channel. We store the command
* entered to be able to report errors without pretty-printing. *)
diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml
index cc1c44fe31..0ece0b0148 100644
--- a/toplevel/coqtop.ml
+++ b/toplevel/coqtop.ml
@@ -595,7 +595,7 @@ let parse_args arglist =
parse ()
with
| UserError(_, s) as e ->
- if is_empty s then exit 1
+ if ismt s then exit 1
else fatal_error (CErrors.print e) false
| any -> fatal_error (CErrors.print any) (CErrors.is_anomaly any)
diff --git a/toplevel/vernac.ml b/toplevel/vernac.ml
index de7bc6929a..5d17054fce 100644
--- a/toplevel/vernac.ml
+++ b/toplevel/vernac.ml
@@ -143,7 +143,8 @@ let pr_new_syntax_in_context loc chan_beautify ocom =
| None -> mt() in
let after = comment (CLexer.extract_comments (snd loc)) in
if !beautify_file then
- Pp.msg_with !Pp_control.std_ft (hov 0 (before ++ com ++ after))
+ (Pp.pp_with !Pp_control.std_ft (hov 0 (before ++ com ++ after));
+ Format.pp_print_flush !Pp_control.std_ft ())
else
Feedback.msg_info (hov 4 (str"New Syntax:" ++ fnl() ++ (hov 0 com)));
States.unfreeze fs;