X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=helm%2Fsoftware%2Fcomponents%2Fng_kernel%2FnUriManager.ml;h=86cae6b6ba4984d59c18f725c9de170a02b78ae9;hb=d9373d1ab9c84de43f212e11912178cabd5562ac;hp=95e3271b1344cc183a4b67b1227ac35f19ff0131;hpb=71303c30466f24b8953def22a80175c00dd975af;p=helm.git diff --git a/helm/software/components/ng_kernel/nUriManager.ml b/helm/software/components/ng_kernel/nUriManager.ml index 95e3271b1..86cae6b6b 100644 --- a/helm/software/components/ng_kernel/nUriManager.ml +++ b/helm/software/components/ng_kernel/nUriManager.ml @@ -23,18 +23,19 @@ * 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;