X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Fcic_unification%2FcicRefine.ml;h=954c4835bcd05b3d7a126ed7483656f0bcdc08bc;hb=cc0e6decc9fdb0e70b5ae04089ac57cba3ed17bb;hp=9099c262f69ce8d7ae09175f34dd67daa783b122;hpb=51f6f4155c188d03333a2c8b8d537aeaff13ccdd;p=helm.git diff --git a/helm/software/components/cic_unification/cicRefine.ml b/helm/software/components/cic_unification/cicRefine.ml index 9099c262f..954c4835b 100644 --- a/helm/software/components/cic_unification/cicRefine.ml +++ b/helm/software/components/cic_unification/cicRefine.ml @@ -1832,10 +1832,12 @@ let typecheck metasenv uri obj ~localization_tbl = (* CSC: ugly code. Here I need to retrieve in advance the loc of bo since type_of_aux' destroys localization information (which are preserved by type_of_aux *) - let loc = + let loc exn' = try Cic.CicHash.find localization_tbl bo - with Not_found -> assert false in + with Not_found -> + HLog.debug ("!!! NOT LOCALIZED: " ^ CicPp.ppterm bo); + raise exn' in let bo',boty,metasenv,ugraph = type_of_aux' ~localization_tbl metasenv [] bo ugraph in let ty',_,metasenv,ugraph = @@ -1854,10 +1856,13 @@ let typecheck metasenv uri obj ~localization_tbl = " but is here used with type " ^ CicMetaSubst.ppterm_in_context ~metasenv [] ty' []) in - match exn with - RefineFailure _ -> raise (HExtlib.Localized (loc,RefineFailure msg)) - | Uncertain _ -> raise (HExtlib.Localized (loc,Uncertain msg)) - | _ -> assert false + let exn' = + match exn with + RefineFailure _ -> RefineFailure msg + | Uncertain _ -> Uncertain msg + | _ -> assert false + in + raise (HExtlib.Localized (loc exn',exn')) in let bo' = CicMetaSubst.apply_subst subst bo' in let ty' = CicMetaSubst.apply_subst subst ty' in