aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-11-02 15:58:58 +0000
committerGravatar glondu <glondu@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-11-02 15:58:58 +0000
commit493f2bd27e23a8f56ec4cd8a65dde19f95380662 (patch)
tree3a1b050688137c74e585b2ccd9e383cb00c73080 /toplevel
parentcce4c64a95e5f835cfd28bb3589c535903cbd011 (diff)
More generic Univ.dump_universes
Instead of formatting directly to an output channel, provide an output function that handles formatting and I/O. This allows changing the output format. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13610 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/vernacentries.ml9
1 files changed, 8 insertions, 1 deletions
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index 5962cf14d..1cfc50811 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -204,8 +204,15 @@ let print_modtype r =
let dump_universes s =
let output = open_out s in
+ let output_constraint kind left right =
+ let kind = match kind with
+ | `Lt -> "<"
+ | `Le -> "<="
+ | `Eq -> "="
+ in Printf.fprintf output "%s %s %s ;\n" left kind right
+ in
try
- Univ.dump_universes output (Global.universes ());
+ Univ.dump_universes output_constraint (Global.universes ());
close_out output;
msgnl (str ("Universes written to file \""^s^"\"."))
with