Api.alloc_status: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/api.bend as Api Lines 746-756 of bendtorch-core@0.1.0.0/src/storage/api.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&start_line=746&end_line=756 import Base import bendtorch-core@0.1.0.0/src/storage/array.bend as ArrayCore 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 import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith def alloc_status(+d: Nat, +n: Nat, +value: F32, valid: Bool, -decision: {valid == Storage.bounds(d, n) : Bool}, +ops: List<&2, Laws.Op>, +j: U32, +v: F32, yes: {True{} == valid : Bool}, +fits: {Storage.bounds(d, n) == True{} : Bool}, +inside: {Nat.is_lt(U32.to_nat(j), n) == True{} : Bool}) -> {Laws.status(Laws.replay(ops, Laws.created.of(Storage.allocate(d, n, value, valid, decision))), j, v) == Done{Unit{}} : Result<&2, &2, Storage.Error, Unit>}: match valid: case True{}: replay_status(ops, d, n, value, Nil{}, j, v, hit_of(n, ops), {==}, ArrayCore.new_balanced(F32, d, value), Equal.sym(Bool, True{}, Storage.bounds(d, n), decision), fits, inside) case False{}: Empty.absurd({Laws.status(Laws.replay(ops, Laws.created.of(Storage.allocate(d, n, value, False{}, decision))), j, v) == Done{Unit{}} : Result<&2, &2, Storage.Error, Unit>}, Arith.clash_true(yes)) Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=Op https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=created.of https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=replay https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=status https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&name=hit_of https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&name=replay_status https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/arith.bend&name=clash_true https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/array.bend&name=new_balanced https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=allocate https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=bounds