+ let new_uri =
+ try
+ let dot = String.rindex s '.' in
+ let suffix = String.sub s (dot+1) 3 in
+ match suffix with
+ | "dec" -> Uri (c (), s, Decl)
+ | "def" -> Uri (c (), s, Def)
+ | "fix" -> let i,j = get2 s dot in Uri (c (), s, Fix (i,j))
+ | "cfx" -> let i = get1 s dot in Uri (c (), s, CoFix (i))
+ | "ind" -> let i = get1 s dot in Uri (c (), s, Ind (i))
+ | "con" -> let i,j = get2 s dot in Uri (c (), s, Con (i,j))
+ | _ -> raise Not_found
+ with Not_found -> raise (IllFormedUri (lazy s))
+ in