jacopy.ProofFailure¶
- exception jacopy.ProofFailure(message, *, report=None, residual=None)¶
Bases:
ExceptionRaised when a strategy cannot close the gap between two expressions.
The exception message includes the surviving residual, which is usually enough to diagnose whether the mismatch is genuine or whether a missing grading declaration / definition prevented the strategy from closing.
When the raising strategy has a residual on hand, it may attach a
DiagnosticReportas thereportkwarg, callers can readexc.reportto get structural hints about which rewrite stalled. Areportis optional; legacy call sites still raise with a bare message andreportdefaults toNone.- residual¶
The surviving obstruction as an Expr (when the raising strategy has it) — machine-readable, so repair loops can inspect the exact shape instead of parsing the message.