+let interactive_ast_choice () ts =
+ let choice =
+ interactive_string_choice
+ "" 0 ~title:"Ambiguous input"
+ ~msg:("Choose an interpretation") () ~id:"" [] ts
+ in
+ let choice = match choice with
+ | [c] -> c
+ | _ -> assert false
+ in
+ let rec posn x = function
+ | [] -> assert false
+ | he::tl -> if he = x then 0 else 1 + posn x tl
+ in
+ posn choice ts
+