# src/status: a run's exit status. A run that found errors exits 1, so a # shell, the gate or an editor can tell without reading the output. `IO.exit` # sets the code and writes nothing: the findings are already printed, and # stderr stays empty (an `IO.die` with an empty message put a blank line # there). import Base # exit 1 when the run found errors, else fall through (exit 0) def stop(bad: Bool) -> IO(Unit): # noqa: L001 IO: exit status match bad: case True{}: IO.exit(1) case False{}: IO.pure(Unit, Unit{})