diff options
| author | letouzey | 2013-04-23 18:16:02 +0000 |
|---|---|---|
| committer | letouzey | 2013-04-23 18:16:02 +0000 |
| commit | 1b892eefc3c77e2f2672a630eb2ed5c7d7de01ca (patch) | |
| tree | 220ec5986795b2c648089723c7b3c5ea466d5082 | |
| parent | 4f9ad55d1bd0a92c25316cffe8978ed0184f832d (diff) | |
minor cleanup in coqtop.ml
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16445 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | interp/dumpglob.ml | 2 | ||||
| -rw-r--r-- | toplevel/coqtop.ml | 20 |
2 files changed, 12 insertions, 10 deletions
diff --git a/interp/dumpglob.ml b/interp/dumpglob.ml index c708d93dab..74c60f75be 100644 --- a/interp/dumpglob.ml +++ b/interp/dumpglob.ml @@ -32,7 +32,7 @@ let noglob () = glob_output := NoGlob let dump_to_stdout () = glob_output := StdOut; glob_file := Pervasives.stdout -let dump_to_dotglob f = glob_output := MultFiles +let dump_to_dotglob () = glob_output := MultFiles let dump_into_file f = glob_output := File f; open_glob_file f diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index dbc1f019b8..7abb0180f8 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -111,9 +111,10 @@ let require () = let compile_list = ref ([] : (bool * string) list) -let add_compile verbose s = +let add_compile verbose glob_opt s = set_batch_mode (); Flags.make_silent true; + if not glob_opt then Dumpglob.dump_to_dotglob (); compile_list := (verbose,s) :: !compile_list let compile_file (v,f) = @@ -265,10 +266,10 @@ let parse_args arglist = | "-print-mod-uid" :: f :: rem -> Flags.print_mod_uid := true; add_require f; parse rem - | "-compile" :: f :: rem -> add_compile false f; if not !glob_opt then Dumpglob.dump_to_dotglob (); parse rem + | "-compile" :: f :: rem -> add_compile false !glob_opt f; parse rem | "-compile" :: [] -> usage () - | "-compile-verbose" :: f :: rem -> add_compile true f; if not !glob_opt then Dumpglob.dump_to_dotglob (); parse rem + | "-compile-verbose" :: f :: rem -> add_compile true !glob_opt f; parse rem | "-compile-verbose" :: [] -> usage () | "-force-load-proofs" :: rem -> Flags.load_proofs := Flags.Force; parse rem @@ -401,12 +402,13 @@ let init arglist = in fatal_error (msg ++ Toplevel.print_toplevel_error any) end; - if !batch_mode then - (flush_all(); - if !output_context then - Pp.ppnl (with_option raw_print Prettyp.print_full_pure_context ()); - Profile.print_profile (); - exit 0); + if !batch_mode then begin + flush_all(); + if !output_context then + Pp.ppnl (with_option raw_print Prettyp.print_full_pure_context ()); + Profile.print_profile (); + exit 0 + end; (* We initialize the command history stack with a first entry *) Backtrack.mark_command Vernacexpr.VernacNop |
