X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_tactics%2FnTactics.ml;h=10fa168d492517123eff7b4b18861cb9827cfa47;hb=3bd3d3ab850c919b64e1eafc65a8cbd5499fd3b8;hp=6011d912d8f7201fa5e20018ca50b619e3625ff3;hpb=9d33fd0863f207cee7f882ae28c83e1944d2a0f1;p=helm.git diff --git a/helm/software/components/ng_tactics/nTactics.ml b/helm/software/components/ng_tactics/nTactics.ml index 6011d912d..10fa168d4 100644 --- a/helm/software/components/ng_tactics/nTactics.ml +++ b/helm/software/components/ng_tactics/nTactics.ml @@ -52,7 +52,7 @@ let branch_tac status = | [] -> assert false | (g, t, k, tag) :: s -> match init_pos g with (* TODO *) - | [] | [ _ ] -> fail (lazy "too few goals to branch"); + | [] | [ _ ] -> fail (lazy "too few goals to branch") | loc :: loc_tl -> ([ loc ], [], [], `BranchTag) :: (loc_tl, t, k, tag) :: s in @@ -478,6 +478,8 @@ type indtyinfo = { } ;; +let ref_of_indtyinfo iti = iti.reference;; + let analyze_indty_tac ~what indtyref = distribute_tac (fun status goal -> let goalty = get_goalty status goal in @@ -586,7 +588,7 @@ let case1_tac name = if name = "_clearme" then clear_tac ["_clearme"] else id_tac ] ;; -let constructor ?(num=1) ~args status goal = +let constructor_tac ?(num=1) ~args = distribute_tac (fun status goal -> if num < 1 then fail (lazy "constructor numbers begin with 1"); let gty = get_goalty status goal in let status, (r,_,_,_) = analyse_indty status gty in @@ -596,11 +598,9 @@ let constructor ?(num=1) ~args status goal = Ast.Appl (HExtlib.list_concat ~sep:[Ast.Implicit `Vector] ([Ast.NRef ref] :: List.map (fun _,_,x -> [x]) args)) in - exec (apply_tac ("",0,t)) status goal + exec (apply_tac ("",0,t)) status goal) ;; -let constructor_tac ?num ~args = distribute_tac (constructor ?num ~args);; - let assert0_tac (hyps,concl) = distribute_tac (fun status goal -> let gty = get_goalty status goal in let eq status ctx t1 t2 =