X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matitaB%2Fcomponents%2Fcontent%2FnotationPp.ml;h=a69ca90abe27206bc7dfbac121d3e6b73f1b03e2;hb=84b38ac86f1f92b91ae8913cd0dbcb5c3485dc3a;hp=8f1db4a62e3ef2311fcba6f41b0b3d6751a75f18;hpb=42680d47c033d751738fd0f84af7b45b2a91a5b8;p=helm.git diff --git a/matitaB/components/content/notationPp.ml b/matitaB/components/content/notationPp.ml index 8f1db4a62..a69ca90ab 100644 --- a/matitaB/components/content/notationPp.ml +++ b/matitaB/components/content/notationPp.ml @@ -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 @@ -184,10 +184,6 @@ let rec pp_term (status : #NCic.status) ?(pp_parens = true) t = | true, Ast.Ident _ -> t_pp | _ -> sprintf "(%s)" t_pp -and pp_subst status (name, term) = - sprintf "%s \\Assign %s" name (pp_term status term) -and pp_substs status substs = String.concat "; " (List.map (pp_subst status) substs) - and pp_pattern status = function Ast.Pattern (head, href, vars), term -> @@ -277,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