]> matita.cs.unibo.it Git - helm.git/commitdiff
pretty printing of literals is now subject to the debug setting
authorStefano Zacchiroli <zack@upsilon.cc>
Tue, 20 Sep 2005 15:29:58 +0000 (15:29 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Tue, 20 Sep 2005 15:29:58 +0000 (15:29 +0000)
helm/ocaml/cic_notation/cicNotationPp.ml

index e784a8302173f188ac0d515b5cca26a29e194528..3e48d36792d3a33ce508e07dfa48179ae7f42a6c 100644 (file)
@@ -40,15 +40,17 @@ let pp_binder = function
   | `Exists -> "exists"
   | `Forall -> "forall"
 
-let pp_literal = function  (* debugging version *)
-  | `Symbol s -> sprintf "symbol(%s)" s
-  | `Keyword s -> sprintf "keyword(%s)" s
-  | `Number s -> sprintf "number(%s)" s
-
-(* let pp_literal = function
-  | `Symbol s
-  | `Keyword s
-  | `Number s -> s *)
+let pp_literal =
+  if debug_printing then
+    (function (* debugging version *)
+      | `Symbol s -> sprintf "symbol(%s)" s
+      | `Keyword s -> sprintf "keyword(%s)" s
+      | `Number s -> sprintf "number(%s)" s)
+  else
+    (function
+      | `Symbol s
+      | `Keyword s
+      | `Number s -> s)
 
 let rec pp_term ?(pp_parens = true) t =
   let t_pp =