- let choices_of_id dbd id =
- let uris = Whelp.locate ~dbd id in
- let uris =
- match uris with
- | [] ->
- (match
- (C.input_or_locate_uri
- ~title:("URI matching \"" ^ id ^ "\" unknown.") ~id ())
- with
- | None -> []
- | Some uri -> [uri])
- | [uri] -> [uri]
- | _ ->
- C.interactive_user_uri_choice ~selection_mode:`MULTIPLE
- ~ok:"Try selected." ~enable_button_for_non_vars:true
- ~title:"Ambiguous input." ~id
- ~msg: ("Ambiguous input \"" ^ id ^
- "\". Please, choose one or more interpretations:")
- uris
- in
- List.map
- (fun uri ->
- (UriManager.string_of_uri uri,
- let term =
- try
- CicUtil.term_of_uri uri
- with exn ->
- debug_print (lazy (UriManager.string_of_uri uri));
- debug_print (lazy (Printexc.to_string exn));
- assert false
- in
- fun _ _ _ -> term))
- uris
-