]> matita.cs.unibo.it Git - helm.git/blobdiff - components/tactics/continuationals.ml
added patch to allow i,j,k: skip and *: skip
[helm.git] / components / tactics / continuationals.ml
index c6e4f0c1841fb68814a7632218e13cfc068b5dbf..044fa45c841cb61e39ecfbe335a14e20937160ec 100644 (file)
@@ -72,7 +72,8 @@ struct
   let is_open = function _, Open _ -> true | _ -> false
   let close = function n, Open g -> n, Closed g | l -> l
   let filter_open = List.filter is_open
-  let is_fresh = function n, Open _ when n > 0 -> true | _ -> false
+  let is_fresh = 
+    function n, Open _ when n > 0 -> true | _,Closed _ -> true | _ -> false
   let goal_of_loc = function _, Open g | _, Closed g -> g
   let goal_of_switch = function Open g | Closed g -> g
   let switch_of_loc = snd
@@ -175,13 +176,10 @@ sig
   type output_status
 
   type tactic
-
-  val id_tactic : tactic
   val mk_tactic : (input_status -> output_status) -> tactic
   val apply_tactic : tactic -> input_status -> output_status
 
   val goals : output_status -> goal list * goal list (** opened, closed goals *)
-  val set_goals: goal list * goal list -> output_status -> output_status
   val get_stack : input_status -> Stack.t
   val set_stack : Stack.t -> output_status -> output_status
 
@@ -332,7 +330,7 @@ struct
       | Shift, _ -> fail (lazy "can't shift goals here")
       | Pos i_s, ([ loc ], t, [],`BranchTag) :: (g', t', k', tag) :: s
         when is_fresh loc ->
-          let l_js = List.filter (fun (i, _) -> List.mem i i_s) (g' @+ [loc]) in
+          let l_js = List.filter (fun (i, _) -> List.mem i i_s) ([loc] @+ g') in
           new_stack
             ((l_js, t , [],`BranchTag)
              :: (([ loc ] @+ g') @- l_js, t', k', tag) :: s)