(* and [bo] = Lambda/LetIn [context].(Meta [newmeta]) *)
(* So, lambda_abstract is the core of the implementation of *)
(* the Intros tactic. *)
-let lambda_abstract context newmeta ty name =
+let lambda_abstract context newmeta ty mknames =
let module C = Cic in
let rec collect_context context =
function
let n' =
match n with
C.Name _ -> n
-(*CSC: generatore di nomi? Chiedere il nome? *)
- | C.Anonymous -> C.Name name
+ | C.Anonymous -> C.Name (mknames ())
in
let (context',ty,bo) =
collect_context ((Some (n',(C.Decl s)))::context) t
with CicUnification.UnificationFailed as e ->
raise (Fail (Printexc.to_string e))
-let intros_tac ~name ~status:(proof, goal) =
+let intros_tac ~mknames ~status:(proof, goal) =
let module C = Cic in
let module R = CicReduction in
let (_,metasenv,_,_) = proof in
let metano,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in
let newmeta = new_meta ~proof in
- let (context',ty',bo') = lambda_abstract context newmeta ty name in
+ let (context',ty',bo') = lambda_abstract context newmeta ty mknames in
let (newproof, _) =
subst_meta_in_proof proof metano bo' [newmeta,context',ty']
in
~continuation:
(Tacticals.then_
~start:(ReductionTactics.simpl_tac ~also_in_hypotheses:false ~term:None)
- ~continuation:(intros_tac ~name:"FOO"))
+ ~continuation:(intros_tac ~mknames:(function () -> "FOO")))
;;