(* the integer is an offset to be added to each location *)
exception NoWellTypedInterpretation of
- int * (Token.flocation option * string Lazy.t) list
+ int * ((DisambiguateTypes.domain_item * DisambiguateTypes.codomain_item) list * Token.flocation option * string Lazy.t) list
exception PathNotWellFormed
(** raised when an environment is not enough informative to decide *)
(match test_env aliases [] base_univ with
| Ok (thing, metasenv),new_univ ->
[ aliases, diff, metasenv, thing, new_univ ], []
- | Ko (loc,msg),_ | Uncertain (loc,msg),_ -> [],[loc,msg])
+ | Ko (loc,msg),_ | Uncertain (loc,msg),_ -> [],[diff,loc,msg])
| (locs,item) :: remaining_dom ->
debug_print (lazy (sprintf "CHOOSED ITEM: %s"
(string_of_domain_item item)));
| Some choices -> choices in
match choices with
[] ->
- [], [Some (List.hd locs),
+ [], [diff,
+ Some (List.hd locs),
lazy ("No choices for " ^ string_of_domain_item item)]
| [codomain_item] ->
(* just one choice. We perform a one-step look-up and
remaining_dom new_univ)
| Uncertain (loc,msg),new_univ ->
(match remaining_dom with
- | [] -> [], [loc,msg]
+ | [] -> [], [diff,loc,msg]
| _ ->
aux new_env new_diff lookup_in_todo_dom
remaining_dom new_univ)
- | Ko (loc,msg),_ -> [], [loc,msg])
+ | Ko (loc,msg),_ -> [], [diff,loc,msg])
| _::_ ->
let rec filter univ = function
| [] -> [],[]
(match test_env new_env remaining_dom univ with
| Ok (thing, metasenv),new_univ ->
(match remaining_dom with
- | [] -> [ new_env, new_diff, metasenv, thing, new_univ ], []
+ | [] -> [new_env,new_diff,metasenv,thing,new_univ], []
| _ -> aux new_env new_diff None remaining_dom new_univ
) @@
filter univ tl
| Uncertain (loc,msg),new_univ ->
(match remaining_dom with
- | [] -> [],[loc,msg]
+ | [] -> [],[diff,loc,msg]
| _ -> aux new_env new_diff None remaining_dom new_univ
) @@
filter univ tl
- | Ko (loc,msg),_ -> ([],[loc,msg]) @@ filter univ tl)
+ | Ko (loc,msg),_ -> ([],[diff,loc,msg]) @@ filter univ tl)
in
filter base_univ choices
in