]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_kernel/nCicEnvironment.ml
height of constants properly handled
[helm.git] / helm / software / components / ng_kernel / nCicEnvironment.ml
index 38982d799768183d7353f1d205cfe2236000a699..2b98e8d4f0ea6c81a05dcc3fea02a4c34f87c672 100644 (file)
@@ -9,6 +9,8 @@
      \ /   This software is distributed as is, NO WARRANTY.     
       V_______________________________________________________________ *)
 
+(* $Id$ *)
+
 exception CircularDependency of string Lazy.t;;
 exception ObjectNotFound of string Lazy.t;;
 exception BadDependency of string Lazy.t;;
@@ -57,8 +59,8 @@ let get_checked_obj u =
          raise e
       | Propagate (u',_) as e' ->
          frozen_list := saved_frozen_list;
-         let exn = `Exn (BadDependency (lazy (NUri.string_of_uri u' ^
-           " depends (recursively) on " ^ NUri.string_of_uri u ^
+         let exn = `Exn (BadDependency (lazy (NUri.string_of_uri u ^
+           " depends (recursively) on " ^ NUri.string_of_uri u' ^
            " which is not well-typed"))) in
          NUri.UriHash.add cache u exn;
          if saved_frozen_list = [] then
@@ -80,7 +82,7 @@ let get_checked_obj u =
 ;;
 
 let get_checked_def = function
-  | NReference.Ref (_, uri, NReference.Def) ->
+  | NReference.Ref (uri, NReference.Def _) ->
       (match get_checked_obj uri with
       | _,height,_,_, NCic.Constant (rlv,name,Some bo,ty,att) ->
           rlv,name,bo,ty,att,height
@@ -91,7 +93,7 @@ let get_checked_def = function
 ;;
 
 let get_checked_indtys = function
-  | NReference.Ref (_, uri, (NReference.Ind (_,n)|NReference.Con (n,_))) ->
+  | NReference.Ref (uri, (NReference.Ind (_,n)|NReference.Con (n,_))) ->
       (match get_checked_obj uri with
       | _,_,_,_, NCic.Inductive (inductive,leftno,tys,att) ->
         inductive,leftno,tys,att,n
@@ -100,7 +102,7 @@ let get_checked_indtys = function
 ;;
 
 let get_checked_fixes_or_cofixes = function
-  | NReference.Ref (_, uri, (NReference.Fix (fixno,_)|NReference.CoFix fixno))->
+  | NReference.Ref (uri, (NReference.Fix (fixno,_,_)|NReference.CoFix fixno))->
       (match get_checked_obj uri with
       | _,height,_,_, NCic.Fixpoint (_,funcs,att) ->
          funcs, att, height
@@ -109,8 +111,8 @@ let get_checked_fixes_or_cofixes = function
 ;;
 
 let get_indty_leftno = function 
-  | NReference.Ref (_, uri, NReference.Ind _) 
-  | NReference.Ref (_, uri, NReference.Con _) ->
+  | NReference.Ref (uri, NReference.Ind _) 
+  | NReference.Ref (uri, NReference.Con _) ->
       (match get_checked_obj uri with
       | _,_,_,_, NCic.Inductive (_,left,_,_) -> left
       | _ ->prerr_endline "get_indty_leftno called on a non ind 2";assert false)