X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Ftactics%2FproofEngineStructuralRules.ml;h=47921953742be893160a5c5751570af6923b1d87;hb=f9abd21eb0d26cf9b632af4df819225be4d091e3;hp=755fab66051ee59197b081e85c3bdba20fdf04aa;hpb=10d3194c1b42dfa72e51000ff2cc217f937b43ac;p=helm.git diff --git a/helm/software/components/tactics/proofEngineStructuralRules.ml b/helm/software/components/tactics/proofEngineStructuralRules.ml index 755fab660..479219537 100644 --- a/helm/software/components/tactics/proofEngineStructuralRules.ml +++ b/helm/software/components/tactics/proofEngineStructuralRules.ml @@ -46,25 +46,14 @@ let clearbody ~hyp = (fun entry context -> match entry with Some (C.Name hyp',C.Def (term,ty)) when hyp = hyp' -> - let cleared_entry = - let ty = - match ty with - Some ty -> ty - | None -> - fst - (CicTypeChecker.type_of_aux' metasenv context term - CicUniv.empty_ugraph) (* TASSI: FIXME *) - in - Some (C.Name hyp, Cic.Decl ty) - in + let cleared_entry = Some (C.Name hyp, Cic.Decl ty) in cleared_entry::context | None -> None::context - | Some (n,C.Decl t) - | Some (n,C.Def (t,None)) -> + | Some (n,C.Decl t) -> let _,_ = try CicTypeChecker.type_of_aux' metasenv context t - CicUniv.empty_ugraph (* TASSI: FIXME *) + CicUniv.oblivion_ugraph (* TASSI: FIXME *) with _ -> raise @@ -75,14 +64,14 @@ let clearbody ~hyp = )) in entry::context - | Some (n,Cic.Def (te,Some ty)) -> + | Some (n,Cic.Def (te,ty)) -> (try ignore (CicTypeChecker.type_of_aux' metasenv context te - CicUniv.empty_ugraph (* TASSI: FIXME *)); + CicUniv.oblivion_ugraph (* TASSI: FIXME *)); ignore (CicTypeChecker.type_of_aux' metasenv context ty - CicUniv.empty_ugraph (* TASSI: FIXME *)); + CicUniv.oblivion_ugraph (* TASSI: FIXME *)); with _ -> raise @@ -97,7 +86,7 @@ let clearbody ~hyp = let _,_ = try CicTypeChecker.type_of_aux' metasenv canonical_context' ty - CicUniv.empty_ugraph (* TASSI: FIXME *) + CicUniv.oblivion_ugraph (* TASSI: FIXME *) with _ -> raise @@ -136,13 +125,12 @@ let clear_one ~hyp = (true, None::context) | None -> (b, None::context) | Some (n,C.Decl t) - | Some (n,Cic.Def (t,Some _)) - | Some (n,C.Def (t,None)) -> + | Some (n,Cic.Def (t,_)) -> if b then let _,_ = try CicTypeChecker.type_of_aux' metasenv context t - CicUniv.empty_ugraph + CicUniv.oblivion_ugraph with _ -> raise (PET.Fail @@ -159,7 +147,7 @@ let clear_one ~hyp = let _,_ = try CicTypeChecker.type_of_aux' metasenv canonical_context' ty - CicUniv.empty_ugraph + CicUniv.oblivion_ugraph with _ -> raise (PET.Fail (lazy ("Hypothesis " ^ hyp ^ " occurs in the goal"))) in