export previous;
authorwenzelm
Wed, 13 Jul 2005 16:07:36 +0200
changeset 16814 b829a6c9a87a
parent 16813 67140ae50e77
child 16815 13d20ed9086c
export previous;
src/Pure/Isar/proof_history.ML
--- a/src/Pure/Isar/proof_history.ML	Wed Jul 13 16:07:35 2005 +0200
+++ b/src/Pure/Isar/proof_history.ML	Wed Jul 13 16:07:36 2005 +0200
@@ -13,6 +13,7 @@
   val init: int option -> Proof.state -> T
   val is_initial: T -> bool
   val current: T -> Proof.state
+  val previous: T -> Proof.state option
   val clear: int -> T -> T
   val undo: T -> T
   val redo: T -> T
@@ -48,6 +49,7 @@
 fun init lim st = ProofHistory (History.init lim ((st, Seq.empty), []));
 fun is_initial (ProofHistory prf) = History.is_initial prf;
 fun current (ProofHistory prf) = fst (fst (History.current prf));
+fun previous (ProofHistory prf) = Option.map (fst o fst) (History.previous prf);
 val clear = app o History.clear;
 val undo = app History.undo;
 val redo = app History.redo;