(****************************************************************************)
-type name = string
-type what = Cic.annterm
-type how = bool
-type using = Cic.annterm
-type count = int
-type note = string
-type where = (name * name) option
+type name = string
+type what = Cic.annterm
+type how = bool
+type using = Cic.annterm
+type count = int
+type note = string
+type where = (name * name) option
+type inferred = Cic.annterm
type step = Note of note
| Theorem of name * what * note
| Elim of what * using option * note
| Apply of what * note
| Whd of count * note
+ | Change of inferred * what * note
| Branch of step list list * note
(* annterm constructors *****************************************************)
let tactic = G.Reduce (floc, `Whd, pattern) in
mk_tactic tactic
+let mk_change t =
+ let pattern = None, [], Some hole in
+ let tactic = G.Change (floc, pattern, t) in
+ mk_tactic tactic
+
let mk_dot = G.Executable (floc, G.Tactical (floc, G.Dot floc, None))
let mk_sc = G.Executable (floc, G.Tactical (floc, G.Semicolon floc, None))
let rec render_step sep a = function
| Note s -> mk_note s :: a
| Theorem (n, t, s) -> mk_note s :: mk_theorem n t :: a
- | Qed s -> mk_note s :: mk_qed :: a
+ | Qed s -> (* mk_note s :: *) mk_qed :: a
| Id s -> mk_note s :: cont sep (mk_id :: a)
| Intros (c, ns, s) -> mk_note s :: cont sep (mk_intros c ns :: a)
| Cut (n, t, s) -> mk_note s :: cont sep (mk_cut n t :: a)
| Elim (t, xu, s) -> mk_note s :: cont sep (mk_elim t xu :: a)
| Apply (t, s) -> mk_note s :: cont sep (mk_apply t :: a)
| Whd (c, s) -> mk_note s :: cont sep (mk_whd c :: a)
+ | Change (t, _, s) -> mk_note s :: cont sep (mk_change t :: a)
| Branch ([], s) -> a
| Branch ([ps], s) -> render_steps sep a ps
| Branch (pss, s) ->