X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Fgrafite_engine%2FnCicCoercDeclaration.ml;h=fa6b163ad97371a71ff238ff118e63227cec944e;hb=63047f8ff8ef477ac32939985b0b41b70e918054;hp=550cb93c4a10394ffcdd7ecc74146d416de77cfb;hpb=b266ed97b63400d62ab4ba6a4ebdfbc1d5b0c2bb;p=helm.git diff --git a/helm/software/components/grafite_engine/nCicCoercDeclaration.ml b/helm/software/components/grafite_engine/nCicCoercDeclaration.ml index 550cb93c4..fa6b163ad 100644 --- a/helm/software/components/grafite_engine/nCicCoercDeclaration.ml +++ b/helm/software/components/grafite_engine/nCicCoercDeclaration.ml @@ -32,12 +32,6 @@ let pos_in_list x l = | None -> assert false ;; -let pos_of x t = - match t with - | NCic.Appl l -> pos_in_list x l - | _ -> assert false -;; - let rec count_prod = function | NCic.Prod (_,_,x) -> 1 + count_prod x | _ -> 0 @@ -223,12 +217,14 @@ let close_graph name t s d to_s from_d p a status = (metasenv,[]) upl in let bo = NCicUntrusted.apply_subst subst [] bo in + let p = NCicUntrusted.apply_subst subst [] p in + let metasenv = NCicUntrusted.apply_subst_metasenv subst metasenv in let metasenv = toposort metasenv in let bo = close_in_context bo metasenv in let pos = match p with | NCic.Meta (p,_) -> pos_in_list p (List.map fst metasenv) - | _ -> assert false + | t -> assert false in let ty = NCicTypeChecker.typeof ~metasenv:[] ~subst:[] [] bo in let src,tgt = src_tgt_of_ty_cpos_arity ty pos arity in @@ -294,7 +290,10 @@ let record_ncoercion = let aux_l l ~refresh_uri_in_universe ~refresh_uri_in_term = List.fold_right (aux ~refresh_uri_in_universe ~refresh_uri_in_term) l in - NRstatus.Serializer.register "ncoercion" aux_l + NCicLibrary.Serializer.register#run "ncoercion" + object(self : 'a NCicLibrary.register_type) + method run = aux_l + end ;; let basic_eval_and_record_ncoercion infos status =