X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_refiner%2FnCicRefiner.ml;h=ed14180aa670c7f41c6f8f28706ef53db6b4b419;hb=16fc013c83981bb5c2bb24ac4e06bc0ca1fda80d;hp=7cc2f33d277d1198fee450e70d74277994b776e3;hpb=9e30dacbcdb10a58d6cf8f3995d1a195f2b31f4b;p=helm.git diff --git a/helm/software/components/ng_refiner/nCicRefiner.ml b/helm/software/components/ng_refiner/nCicRefiner.ml index 7cc2f33d2..ed14180aa 100644 --- a/helm/software/components/ng_refiner/nCicRefiner.ml +++ b/helm/software/components/ng_refiner/nCicRefiner.ml @@ -384,8 +384,8 @@ and force_to_sort hdb match NCicReduction.whd ~subst context ty with | C.Meta (_,(0,(C.Irl 0 | C.Ctx []))) as ty -> metasenv, subst, t, ty - | C.Meta (i,(_,(C.Irl 0 | C.Ctx []))) -> - metasenv, subst, t, C.Meta(i,(0,C.Irl 0)) + | C.Meta (i,(_,(C.Irl 0 | C.Ctx []))) -> assert false (*CSC: ??? + metasenv, subst, t, C.Meta(i,(0,C.Irl 0)) *) | C.Meta (i,(_,lc)) -> let len = match lc with C.Irl len->len | C.Ctx l->List.length l in let metasenv, subst, newmeta = @@ -538,6 +538,7 @@ let typeof_obj hdb ?(localise=fun _ -> Stdpp.dummy_loc) ~look_for_coercion (uri,height,metasenv,subst,obj) = +prerr_endline ("===============\n" ^ NCicPp.ppobj (uri,height,metasenv,subst,obj)); let check_type metasenv subst context (ty as orig_ty) = (* XXX fattorizza *) let metasenv, subst, ty, sort = typeof hdb ~localise ~look_for_coercion metasenv subst context ty None @@ -621,6 +622,7 @@ let typeof_obj hdb try snd (HExtlib.split_nth leftno k_relev) with Failure _ -> k_relev in let te = NCicTypeChecker.debruijn uri len [] te in + let metasenv, subst, te, _ = check_type metasenv subst tys te in let context,te = NCicReduction.split_prods ~subst tys leftno te in let _,chopped_context_rev = HExtlib.split_nth (List.length tys) (List.rev context) in @@ -666,11 +668,8 @@ let typeof_obj hdb else metasenv,subst,item1::context ) (metasenv,subst,[]) sx_context_ty_rev sx_context_te_rev - with Invalid_argument "List.fold_left2" -> assert false - in - let metasenv, subst, te, con_sort = - check_type metasenv subst context te - in + with Invalid_argument "List.fold_left2" -> assert false in + let con_sort= NCicTypeChecker.typeof ~subst ~metasenv context te in (match NCicReduction.whd ~subst context con_sort, NCicReduction.whd ~subst [] ty_sort