X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fng_kernel%2FnCicTypeChecker.ml;h=b60734508b46b5a6fe5687086ce7a8e45bfd640c;hb=2f00c2224c66757d00883602cfd0bbd2448eb3ca;hp=343be2607277b7bbab8e4bd0523fc35d9d7d0069;hpb=8c8ee30d3de315e954a59b3e802748099a32b54c;p=helm.git diff --git a/matita/components/ng_kernel/nCicTypeChecker.ml b/matita/components/ng_kernel/nCicTypeChecker.ml index 343be2607..b60734508 100644 --- a/matita/components/ng_kernel/nCicTypeChecker.ml +++ b/matita/components/ng_kernel/nCicTypeChecker.ml @@ -391,7 +391,7 @@ let rec typeof (status:#NCic.status) ~subst ~metasenv context term = match List.nth context (n - 1) with | (_,C.Decl ty) -> S.lift status n ty | (_,C.Def (_,ty)) -> S.lift status n ty - with Failure _ -> + with Failure _ | Invalid_argument _ -> raise (TypeCheckerFailure (lazy ("unbound variable " ^ string_of_int n ^" under: " ^ status#ppcontext ~metasenv ~subst context)))) | C.Sort s -> @@ -1131,7 +1131,7 @@ and get_relevance status ~metasenv ~subst context t args = | C.Sort C.Prop -> false::(aux context new_ty tl) | C.Sort _ - | C.Meta _ -> true::(aux context new_ty tl) + | C.Meta _ -> true::(aux context new_ty tl) | _ -> raise (TypeCheckerFailure (lazy (Printf.sprintf "Prod: the type %s of the source of %s is not a sort" (status#ppterm ~subst ~metasenv ~context sort) @@ -1329,7 +1329,7 @@ let typecheck_obj status (uri,height,metasenv,subst,kind) = (guarded_by_constructors status ~subst ~metasenv types bo r_uri r_len len) then raise (TypeCheckerFailure - (lazy "CoFix: not guarded by constructors")) + (lazy ("CoFix: not guarded by constructors: " ^ status#ppobj (uri,height,metasenv,subst,kind)))) ) fl dfl ;;