From 9e67c082f0021849b411ec8acbd041137f1fb73a Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 4 Oct 2004 09:40:49 +0000 Subject: [PATCH] added Undo/Redo commands --- helm/ocaml/cic_transformations/tacticAst.ml | 6 ++++-- helm/ocaml/cic_transformations/tacticAstPp.ml | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/helm/ocaml/cic_transformations/tacticAst.ml b/helm/ocaml/cic_transformations/tacticAst.ml index 3a74b3863..d063234d2 100644 --- a/helm/ocaml/cic_transformations/tacticAst.ml +++ b/helm/ocaml/cic_transformations/tacticAst.ml @@ -79,17 +79,19 @@ type 'term command = | Check of 'term | Proof | Qed of string option - (* name. + (** name. * Name is needed when theorem was started without providing a name *) | Quit | Theorem of thm_flavour * string option * 'term * 'term option - (* flavour, name, type, body + (** flavour, name, type, body * - name is absent when an unnamed theorem is being proved, tipically in * interactive usage * - body is present when its given along with the command, otherwise it * will be given in proof editing mode using the tactical language *) + | Redo of int option + | Undo of int option type ('term, 'ident) tactical = | LocatedTactical of CicAst.location * ('term, 'ident) tactical diff --git a/helm/ocaml/cic_transformations/tacticAstPp.ml b/helm/ocaml/cic_transformations/tacticAstPp.ml index 5c96b64d3..089f8b896 100644 --- a/helm/ocaml/cic_transformations/tacticAstPp.ml +++ b/helm/ocaml/cic_transformations/tacticAstPp.ml @@ -92,6 +92,8 @@ let pp_command = function | Qed name -> (match name with None -> "Qed" | Some name -> sprintf "Save %s" name) | Quit -> "Quit" + | Redo None -> "Redo" + | Redo (Some n) -> sprintf "Redo %d" n | Theorem (flavour, name, typ, body) -> sprintf "%s %s: %s %s" (pp_flavour flavour) @@ -100,6 +102,8 @@ let pp_command = function (match body with | None -> "" | Some body -> "\\def " ^ CicAstPp.pp_term body) + | Undo None -> "Undo" + | Undo (Some n) -> sprintf "Undo %d" n let rec pp_tactical = function | LocatedTactical (loc, tac) -> pp_tactical tac -- 2.39.2