X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FgTopLevel%2FlogicalOperations.ml;h=3fab938a058360d73f93c9d9dcf4ec6b2892af72;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=9144f4740e1aa52e31b71c9c978e1ab0e269947c;hpb=76cb30ecd0159512548aee0ba7085ab17c6fd5bd;p=helm.git diff --git a/helm/gTopLevel/logicalOperations.ml b/helm/gTopLevel/logicalOperations.ml index 9144f4740..3fab938a0 100644 --- a/helm/gTopLevel/logicalOperations.ml +++ b/helm/gTopLevel/logicalOperations.ml @@ -42,13 +42,13 @@ let get_context ids_to_terms ids_to_father_ids = | C.Var _ | C.Meta _ | C.Sort _ - | C.Implicit + | C.Implicit _ | C.Cast _ -> [] | C.Prod (n,s,t) when t == term -> [Some (n,C.Decl s)] | C.Prod _ -> [] | C.Lambda (n,s,t) when t == term -> [Some (n,C.Decl s)] | C.Lambda _ -> [] - | C.LetIn (n,s,t) when t == term -> [Some (n,C.Def s)] + | C.LetIn (n,s,t) when t == term -> [Some (n,C.Def (s,None))] | C.LetIn _ -> [] | C.Appl _ | C.Const _ -> [] @@ -60,7 +60,9 @@ let get_context ids_to_terms ids_to_father_ids = let counter = ref 0 in List.rev_map (function (name,_,ty,bo) -> - let res = Some (C.Name name, (C.Def (C.Fix (!counter,ifl)))) in + let res = + Some (C.Name name, (C.Def ((C.Fix (!counter,ifl)), Some ty))) + in incr counter ; res ) ifl @@ -68,7 +70,9 @@ let get_context ids_to_terms ids_to_father_ids = let counter = ref 0 in List.rev_map (function (name,ty,bo) -> - let res = Some (C.Name name,(C.Def (C.CoFix (!counter,ifl)))) in + let res = + Some (C.Name name,(C.Def ((C.CoFix (!counter,ifl)), Some ty))) + in incr counter ; res ) ifl @@ -86,12 +90,14 @@ let to_sequent id ids_to_terms ids_to_father_ids = let term = Hashtbl.find ids_to_terms id in let context = get_context ids_to_terms ids_to_father_ids id in let metasenv = - match !P.proof with + match P.get_proof () with None -> assert false | Some (_,metasenv,_,_) -> metasenv in - let ty = CicTypeChecker.type_of_aux' metasenv context term in - P.perforate context term ty (* P.perforate also sets the goal *) + let ty,_ = (* TASSI: FIXME ehhmmmm *) + CicTypeChecker.type_of_aux' metasenv context term CicUniv.empty_ugraph + in + P.perforate context term ty (* P.perforate also sets the goal *) ;; exception FocusOnlyOnMeta;; @@ -102,12 +108,14 @@ let focus id ids_to_terms ids_to_father_ids = let term = Hashtbl.find ids_to_terms id in let context = get_context ids_to_terms ids_to_father_ids id in let metasenv = - match !P.proof with + match P.get_proof () with None -> assert false | Some (_,metasenv,_,_) -> metasenv in - let ty = CicTypeChecker.type_of_aux' metasenv context term in - match term with - Cic.Meta (n,_) -> P.goal := Some n - | _ -> raise FocusOnlyOnMeta + let ty,_ = + CicTypeChecker.type_of_aux' metasenv context term CicUniv.empty_ugraph + in + match term with + Cic.Meta (n,_) -> P.goal := Some n + | _ -> raise FocusOnlyOnMeta ;;