---
title: "U7003: Escape budget exceeded"
url: https://una-lang.org/en/docs/errors/U7003/
release: v0.4.0
source: https://github.com/una-lang/una/blob/v0.4.0/crates/una-explain/explain/U7003.md
---

# U7003: Escape budget exceeded

A module uses `checked` more times than its budget allows. U7003 reports the first use beyond the budget, with the later uses as related locations.

## Why Una rejects it

`checked` replaces a static proof with a runtime test, so each module may use it only as many times as `[escape_budget] checked_per_module` in `una.toml`, or from edition `0.4` `checked per module` in the `escapes` section of `ita.una`, allows. The default is 0, and a file checked on its own has the default (`spec/06 §6`).

## How to fix it

Its repairs keep the proof first:

- State the fact in a refined type or a `requires` clause, so that the solver proves it, or handle the values where it does not hold with a guard, and remove the `checked`.
- Raising the budget is the last repair, marked as an escape (ADR 0095): it allows more runtime tests in place of proofs, and each one is listed in the build report and needs review.

## The repair at a glance

```diff
  module demo

  kind ParseError = | Empty

  pub nonempty(raw: Text) -> Text
    fails ParseError
  =
-   checked(raw, raw.len > 0) else fail Empty
+   if raw.len > 0 then raw else fail Empty
```

## Failing example

```una
module demo

kind ParseError = | Empty

pub nonempty(raw: Text) -> Text
  fails ParseError
=
  checked(raw, raw.len > 0) else fail Empty
```

## Fixed example

```una
module demo

kind ParseError = | Empty

pub nonempty(raw: Text) -> Text
  fails ParseError
=
  if raw.len > 0 then raw else fail Empty
```
