def status_hit
bendtorch-core@0.1.0.0 · src/storage/api.bend:535
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
import Base
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
import bendtorch-core@0.1.0.0/src/storage/certificates.bend as Certificates
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as Laws
535def status_hit(+d: Nat, +n: Nat, array: Array<F32>, -b: Model.Balanced(F32, d, array),
536 -f: {Storage.bounds(d, n) == True{} : Bool}, +fits: {Storage.bounds(d, n) == True{} : Bool},
537 +j: U32, +v: F32, +inside: {Nat.is_lt(U32.to_nat(j), n) == True{} : Bool}) ->
538 {Laws.status(Storage.Owned{d, n, array, b, f}, j, v) == Done{Unit{}} : Result<&2, &2, Storage.Error, Unit>}:
539 %Equal.sym(Storage.Storage & Result<&2, &2, Storage.Error, Unit>, Storage.set_checked(d, n, array, j, v, Nat.is_lt(U32.to_nat(j), n), {==}, b, f),
540 (Storage.Owned{d, n, Array.set(F32, array, j, v), Certificates.set_result(F32, d, array, j, v, Array.set(F32, array, j, v), {==}, b), f}, Done{Unit{}}),
541 set_checked_hit(d, n, array, j, v, Nat.is_lt(U32.to_nat(j), n), {==}, b, f,
542 Equal.sym(Bool, Nat.is_lt(U32.to_nat(j), n), True{}, inside), fits, inside)) :
543 {Laws.outcome(Result<&2, &2, Storage.Error, Unit>, _) == Done{Unit{}} : Result<&2, &2, Storage.Error, Unit>}
544 {==}