]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_kernel/nReference.ml
better error message
[helm.git] / helm / software / components / ng_kernel / nReference.ml
index d83fee65ab20ca6d67acefe078c0cfa295293a9e..5da330541997905447ae9341d41d16d566598e03 100644 (file)
@@ -113,9 +113,22 @@ let string_of_reference (Ref (_,u,indinfo)) =
   | Con (i,j) -> s2 ^ ".con(" ^ string_of_int i ^ "," ^ string_of_int j ^ ")"
 ;;
 
+let mk_constructor j = function
+  | Ref (d, u, Ind i) -> 
+      reference_of_string (string_of_reference (Ref (d, u, Con (i,j))))
+  | _ -> assert false
+;;
+
+let mk_fix i j = function
+  | Ref (d, u, Fix _) -> 
+      reference_of_string (string_of_reference (Ref (d, u, Fix (i,j))))
+  | _ -> assert false
+;;
+
 let reference_of_ouri u indinfo =
   let u = NUri.nuri_of_ouri u in
-  reference_of_string (string_of_reference (Ref (~-1,u,indinfo)))
+  reference_of_string (string_of_reference (Ref (max_int,u,indinfo)))
 ;;
 
 let ouri_of_reference (Ref (_,u,_)) = NUri.ouri_of_nuri u;;
+