]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_kernel/nCicTypeChecker.ml
Bug fixed: the relevance list can be shorted then leftno args.
[helm.git] / helm / software / components / ng_kernel / nCicTypeChecker.ml
index f459c602432ae5888539bca809925da3ae49f775..8beca4cf0504285f32355529739aabfa73700e1a 100644 (file)
@@ -350,7 +350,9 @@ let type_of_branch ~subst context leftno outty cons tycons =
         | t -> C.Appl [t ; C.Rel 1]
        in
         C.Prod (name,so, aux (liftno+1) ((name,(C.Decl so))::context) cons de)
-   | _ -> raise (AssertFailure (lazy "type_of_branch"))
+   | t -> raise (AssertFailure 
+      (lazy ("type_of_branch, the contructor has type: " ^ NCicPp.ppterm
+       ~metasenv:[] ~context:[] ~subst:[] t)))
  in
   aux 0 context cons tycons
 ;;
@@ -728,7 +730,9 @@ and check_mutual_inductive_defs uri ~metasenv ~subst leftno tyl =
        let sx_context_ty_rev,_ = HExtlib.split_nth leftno (List.rev context) in
        List.iter
          (fun (k_relev,_,te) ->
-          let _,k_relev = HExtlib.split_nth leftno k_relev in
+          let k_relev =
+            try snd (HExtlib.split_nth leftno k_relev)
+            with Failure _ -> k_relev in
            let te = debruijn uri len [] te in
            let context,te = NCicReduction.split_prods ~subst tys leftno te in
            let _,chopped_context_rev =