let string_tail s =
let len = String.length s in
String.sub s 1 (len-1)
-let nonvar s =
+let nonvar uri =
+ let s = UriManager.string_of_uri uri in
let len = String.length s in
let suffix = String.sub s (len-4) 4 in
not (suffix = ".var")
| id::tail when id<>"" ->
(fun id' ->
if id = id' then
- Some (List.map (fun u -> Netencoding.Url.decode u) tail)
+ Some (List.map
+ (fun u -> UriManager.uri_of_string
+ (Netencoding.Url.decode u))
+ tail)
else
f id')
| _ -> failwith "Can't parse choices")
struct
let interactive_user_uri_choice ~selection_mode ?ok
?enable_button_for_non_vars ~(title: string) ~(msg: string)
- ~(id: string) (choices: string list)
+ ~(id: string) (choices: UriManager.uri list)
=
match id_to_choices id with
| Some choices -> choices
let uri =
match term with
| Cic.MutInd (uri, typeno, _) ->
- UriManager.string_of_uriref (uri, [typeno])
+ UriManager.uri_of_string
+ (UriManager.string_of_uriref (uri, [typeno]))
| _ -> raise Not_a_MutInd
in
MetadataQuery.elim ~dbd uri
| _ -> assert false
in
+ let uris = List.map UriManager.string_of_uri uris in
send_results ~id_to_uris (`Results uris) req outchan
with
| Not_a_MutInd ->
send_results (`Results []) req outchan
else begin
let results = MetadataQuery.locate ~dbd expression in
+ let results = List.map UriManager.string_of_uri results in
send_results (`Results results) req outchan
end
| "/hint"