- let (choosed_env, choosed_term, choosed_metasenv) =
- match aux current_env todo_dom with
- | [] -> raise NoWellTypedInterpretation
- | [ x ] ->
- debug_print "UNA SOLA SCELTA";
- x
- | l ->
- debug_print (sprintf "PIU' SCELTE (%d)" (List.length l));
- let choices =
- List.map
- (fun (env, _, _) ->
- List.map
- (fun domain_item ->
- let description =
- fst (Environment.find domain_item env)
- in
- (descr_of_domain_item domain_item, description))
- term_dom)
- l
- in
- let choosed = C.interactive_interpretation_choice choices in
- List.nth l choosed
- in
- (choosed_env, choosed_metasenv, choosed_term)
+ match aux current_env todo_dom with
+ | [] -> raise NoWellTypedInterpretation
+ | [ _ ] as l ->
+ debug_print "UNA SOLA SCELTA";
+ l
+ | l ->
+ debug_print (sprintf "PIU' SCELTE (%d)" (List.length l));
+ let choices =
+ List.map
+ (fun (env, _, _) ->
+ List.map
+ (fun domain_item ->
+ let description =
+ fst (Environment.find domain_item env)
+ in
+ (descr_of_domain_item domain_item, description))
+ term_dom)
+ l
+ in
+ let choosed = C.interactive_interpretation_choice choices in
+ List.map (List.nth l) choosed