None, "Type checking error: " ^ Lazy.force msg
| CicTypeChecker.AssertFailure msg ->
None, "Type checking assertion failed: " ^ Lazy.force msg
- | MatitaDisambiguator.DisambiguationError errorll ->
+ | MatitaDisambiguator.DisambiguationError (offset,errorll) ->
let rec aux n =
function
[] -> ""
None -> ""
| Some floc ->
let (x, y) = HExtlib.loc_of_floc floc in
- sprintf " at %d-%d" x y
+ sprintf " at %d-%d" (x+offset) (y+offset)
in
"*Error" ^ loc_descr ^ ": " ^ Lazy.force msg) phase) ^
"\n\n\n" in
let loc =
match errorll with
- ((Some _ as loc,_)::_)::_ -> loc
+ ((Some floc,_)::_)::_ ->
+ let (x, y) = HExtlib.loc_of_floc floc in
+ let x = x + offset in
+ let y = y + offset in
+ let flocb,floce = floc in
+ let floc =
+ {flocb with Lexing.pos_cnum = x}, {floce with Lexing.pos_cnum = y}
+ in
+ Some floc
| _ -> None
in
loc,