]> matita.cs.unibo.it Git - helm.git/commitdiff
new uri defined
authorEnrico Tassi <enrico.tassi@inria.fr>
Thu, 31 Jan 2008 15:06:31 +0000 (15:06 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Thu, 31 Jan 2008 15:06:31 +0000 (15:06 +0000)
helm/software/components/ng_kernel/nUriManager.ml
helm/software/components/ng_kernel/nUriManager.mli

index 95e3271b1344cc183a4b67b1227ac35f19ff0131..86cae6b6ba4984d59c18f725c9de170a02b78ae9 100644 (file)
  * http://cs.unibo.it/helm/.
  *)
 
-(*                order, uri,      (which, constructor)        *)
-type uri = Uri of int *  string *  (int  * int option ) option
+type spec = 
+ | Decl 
+ | Def
+ | Fix of int * int (* fixno, recparamno *)
+ | CoFix of int
+ | Ind of int
+ | IConstr of int * int (* indtyno, constrno *)
+
+type uri = Uri of int *  string * spec
 
 let eq = (==);;
 
-let string_of_uri = function
-  | Uri (_,s,None) -> s
-  | Uri (_,s,Some (i,None)) -> 
-      s ^ "#xpointer(1/" ^ string_of_int (i+1) ^ ")"
-  | Uri (_,s,Some (i, Some k)) -> 
-      s ^ "#xpointer(1/" ^ string_of_int (i+1) ^ "/" ^ string_of_int (k+1) ^ ")"
-;;
+let string_of_uri (Uri (_,s,_)) = s ;;
 
 module OrderedStrings =
  struct
@@ -47,6 +48,16 @@ module MapStringsToUri = Map.Make(OrderedStrings);;
 
 let set_of_uri = ref MapStringsToUri.empty;;
 
+(* '.' not allowed in path and foo
+ *
+ * Decl                   cic:/path/foo.decl
+ * Def                    cic:/path/foo.def
+ * Fix of int * int       cic:/path/foo.fix(i,j)
+ * CoFix of int           cic:/path/foo.cofix(i)
+ * Ind of int             cic:/path/foo.ind(i)
+ * Constr of int * int    cic:/path/foo.constr(i,j)
+ *)
+
 let uri_of_string_aux =
   let counter = ref 0 in fun s ->
   incr counter;
index 9823719c38e191a05167298451a339188afafe49..911a1849b614a5b99c4f450f7b2cf9d8081675ae 100644 (file)
  * http://cs.unibo.it/helm/.
  *)
 
-(*                        order, uri,      (which, constructor)        *)
-type spec = Normal of (int  * int option) option | 
-type uri = private Uri of int *  string * spec
+type spec = 
+ | Decl 
+ | Def
+ | Fix of int * int (* fixno, recparamno *)
+ | CoFix of int
+ | Ind of int
+ | IConstr of int * int (* indtyno, constrno *)
+
+type uri = Uri of int *  string * spec
 
 val eq: uri -> uri -> bool
 val string_of_uri: uri -> string