module Ast = NotationPt
-(* the integer is an offset to be added to each location *)
-exception Ambiguous_input
-(* the integer is an offset to be added to each location *)
exception NoWellTypedInterpretation of
int *
((Stdpp.location list * string * string) list *
type domain = domain_tree list
and domain_tree = Node of Stdpp.location list * domain_item * domain
+(*
let mono_uris_callback ~selection_mode ?ok
?(enable_button_for_non_vars = true) ~title ~msg ~id =
if Helm_registry.get_opt_default Helm_registry.get_bool ~default:true
else
raise Ambiguous_input
-let mono_interp_callback _ _ _ = raise Ambiguous_input
-let mono_disamb_callback _ = raise Ambiguous_input
+let mono_interp_callback _ _ _ = assert false
+let mono_disamb_callback _ = assert false
let _choose_uris_callback = ref mono_uris_callback
let _choose_interp_callback = ref mono_interp_callback
let interactive_user_uri_choice = !_choose_uris_callback
let interactive_interpretation_choice interp = !_choose_interp_callback interp
let interactive_ast_choice interp = !_choose_disamb_callback interp
+*)
+
let input_or_locate_uri ~(title:string) ?id () = None
(* Zack: I try to avoid using this callback. I therefore assume that
* the presence of an identifier that can't be resolved via "locate"
in
match res with
| [] -> raise (NoWellTypedInterpretation (0,[]))
+ (* XXX : the boolean seems not to play a role any longer *)
| [t] -> res,false
- | _ ->
- let choices = List.map (fun (t,_,_,_,_) -> pp_thing t) res in
+ | _ -> res, true
+ (* let choices = List.map (fun (t,_,_,_,_) -> pp_thing t) res in
let user_choice = interactive_ast_choice choices in
[ List.nth res user_choice ], true
(* let pp_thing (t,_,_,_,_,_) = prerr_endline ("interpretation: " ^ (pp_thing t)) in
- List.iter pp_thing res; res,true *)
+ List.iter pp_thing res; res,true *) *)
;;