exception Error of string lazy_t * exn option
let fail ?exn msg = raise (Error (msg,exn))
-let wrap f x =
+let wrap f x =
try f x
with
| MultiPassDisambiguator.DisambiguationError _
(* we could lift wanted step-by-step *)
try true, unify status ctx (None, ctx, t) wanted
with
- | NCicUnification.UnificationFailure _
- | NCicUnification.Uncertain _ -> false, status
+ | Error (_, Some (NCicUnification.UnificationFailure _))
+ | Error (_, Some (NCicUnification.Uncertain _)) -> false, status
in
let match_term status ctx (wanted : cic_term) t =
let rec aux ctx (status,already_found) t =