def out.at

bolt@1.26.0.0 · src/check.bend:61

import bolt@1.26.0.0/src/check.bend as Check
import Base

61# the error lines, then `clean` or the count, and the exit code: 1 when
62# there is any error
63def out.at(ls: List<&2, String>, count: Nat) -> Out:
64  match count:
65    case 0n:
66      Out{List.append(&2, String, ls, ["clean"]), 0}
67    case 1n:
68      Out{List.append(&2, String, ls, ["1 error, 0 warnings"]), 1}
69    case 2n+more:
70      Out{List.append(&2, String, ls, [U32.show(U32.from_nat(2n+more)) ++ " errors, 0 warnings"]), 1}

Uses (8)

Used by (1)