aux (n+1) tl ^
"***** Errors obtained during phase " ^ string_of_int n ^": *****\n"^
String.concat "\n\n"
- (List.map (fun msg -> "*Error: " ^ Lazy.force msg) phase) ^
- "\n\n\n"
+ (List.map (fun (floc,msg) ->
+ let loc_descr =
+ match floc with
+ None -> ""
+ | Some floc ->
+ let (x, y) = HExtlib.loc_of_floc floc in
+ sprintf " at %d-%d" x y
+ in
+ "*Error" ^ loc_descr ^ ": " ^ Lazy.force msg) phase) ^
+ "\n\n\n" in
+ let loc =
+ match errorll with
+ ((Some _ as loc,_)::_)::_ -> loc
+ | _ -> None
in
- None,
+ loc,
"********** DISAMBIGUATION ERRORS: **********\n" ^
aux 1 errorll
| exn -> None, "Uncaught exception: " ^ Printexc.to_string exn