X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite%2FgrafiteAstPp.ml;h=ce9ea017b2c1565d6b82302e75f8d1582188a9b4;hb=3ce05ecd50428a27ce17adb070620aeeaf2aed65;hp=d775a77dcdce83bcab4c8a018474bc7870a5bf17;hpb=d669da59d27e2418e65a275dc5d405237db2b93a;p=helm.git diff --git a/helm/software/components/grafite/grafiteAstPp.ml b/helm/software/components/grafite/grafiteAstPp.ml index d775a77dc..ce9ea017b 100644 --- a/helm/software/components/grafite/grafiteAstPp.ml +++ b/helm/software/components/grafite/grafiteAstPp.ml @@ -44,6 +44,7 @@ let pp_reduction_kind ~term_pp = function | `Whd -> "whd" let pp_tactic_pattern ~term_pp ~lazy_term_pp (what, hyp, goal) = + if what = None && hyp = [] && goal = None then "" else let what_text = match what with | None -> "" @@ -142,17 +143,21 @@ let rec pp_tactic ~term_pp ~lazy_term_pp = (match terms with [] -> "" | _ -> " to " ^ terms_pp ~term_pp terms) (match ident_opt with None -> "" | Some ident -> " as " ^ ident) | Left _ -> "left" - | LetIn (_, term, ident) -> sprintf "letin %s \\def %s" ident (term_pp term) + | LetIn (_, term, ident) -> + sprintf "letin %s \\def %s" ident (term_pp term) | Reduce (_, kind, pat) -> sprintf "%s %s" (pp_reduction_kind kind) (pp_tactic_pattern pat) | Reflexivity _ -> "reflexivity" + | Rename (_, froms, tos) -> + sprintf "rename %s as %s" (pp_idents froms) (pp_idents tos) | Replace (_, pattern, t) -> sprintf "replace %s with %s" (pp_tactic_pattern pattern) (lazy_term_pp t) - | Rewrite (_, pos, t, pattern) -> - sprintf "rewrite %s %s %s" + | Rewrite (_, pos, t, pattern, names) -> + sprintf "rewrite %s %s %s%s" (if pos = `LeftToRight then ">" else "<") (term_pp t) (pp_tactic_pattern pattern) + (if names = [] then "" else " as " ^ pp_idents names) | Right _ -> "right" | Ring _ -> "ring" | Split _ -> "split"