@@ -1158,9 +1158,14 @@ let apply_conversion_problem_heuristic ts env evd pbty t1 t2 =
1158
1158
(* Some head evar have been instantiated, or unknown kind of problem *)
1159
1159
evar_conv_x ts env evd pbty t1 t2
1160
1160
1161
+ let error_cannot_unify env evd pb ?reason t1 t2 =
1162
+ Pretype_errors. error_cannot_unify_loc
1163
+ (loc_of_conv_pb evd pb) env
1164
+ evd ?reason (t1, t2)
1165
+
1161
1166
let check_problems_are_solved env evd =
1162
1167
match snd (extract_all_conv_pbs evd) with
1163
- | (pbty ,env ,t1 ,t2 )::_ -> Pretype_errors. error_cannot_unify env evd (t1, t2)
1168
+ | (pbty ,env ,t1 ,t2 ) as pb ::_ -> error_cannot_unify env evd pb t1 t2
1164
1169
| _ -> ()
1165
1170
1166
1171
let max_undefined_with_candidates evd =
@@ -1229,17 +1234,15 @@ let consider_remaining_unif_problems env
1229
1234
aux evd pbs progress (pb :: stuck)
1230
1235
end
1231
1236
| UnifFailure (evd ,reason ) ->
1232
- Pretype_errors. error_cannot_unify_loc (loc_of_conv_pb evd pb)
1233
- env evd ~reason (t1, t2))
1237
+ error_cannot_unify env evd pb ~reason t1 t2)
1234
1238
| _ ->
1235
1239
if progress then aux evd stuck false []
1236
1240
else
1237
1241
match stuck with
1238
1242
| [] -> (* We're finished *) evd
1239
1243
| (pbty ,env ,t1 ,t2 as pb ) :: _ ->
1240
- (* There remains stuck problems *)
1241
- Pretype_errors. error_cannot_unify_loc (loc_of_conv_pb evd pb)
1242
- env evd (t1, t2)
1244
+ (* There remains stuck problems *)
1245
+ error_cannot_unify env evd pb t1 t2
1243
1246
in
1244
1247
let (evd,pbs) = extract_all_conv_pbs evd in
1245
1248
let heuristic_solved_evd = aux evd pbs false [] in
0 commit comments