]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/components/content/notationPp.ml
update in ground_2 and basic_2
[helm.git] / matitaB / components / content / notationPp.ml
index 082a5ddf81d16d40ca9249b93300b72eb8f54df7..a69ca90abe27206bc7dfbac121d3e6b73f1b03e2 100644 (file)
@@ -42,17 +42,17 @@ let pp_binder = function
   | `Exists -> "exists"
   | `Forall -> "forall"
 
-let pp_literal =
+(* XXX: ignoring the optional CSYMBOL
+ * (it's fine if this is only used for pretty printing output notations) *)
+let pp_literal (_,t) =
   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)
+    (match t with (* debugging version *)
+      | `Symbol _ -> 
+          sprintf "symbol(%s)" (NotationUtil.string_of_literal t)
+      | `Keyword _ -> 
+          sprintf "keyword(%s)" (NotationUtil.string_of_literal t)
+      | `Number _ -> sprintf "number(%s)" (NotationUtil.string_of_literal t))
+  else NotationUtil.string_of_literal t
 
 let pp_pos =
   function
@@ -273,7 +273,7 @@ and pp_fold_kind = function
 
 and pp_sep_opt = function
   | None -> ""
-  | Some sep -> sprintf " sep %s" (pp_literal sep)
+  | Some sep -> sprintf " sep %s" (pp_literal (None,sep))
 
 and pp_variable = function
   | Ast.NumVar s -> "number " ^ s