TensorFile.opened: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_file.bend as TensorFile Lines 145-151 of stelliferous@0.0.2.0/tensor_file.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_file.bend&start_line=145&end_line=151 import Base def opened(result: Result<&1,&1,U32 & String,File>,path: String,+shape: List<&2,U32>,+count: U32) -> IO(Tensor()): match result: case Fail{error}: IO.pure(Tensor(),fault("load",path,"cannot be opened",shape)) case Done{file}: do IO: outcome : Outcome <- read_all(fuel(count),More{file,fresh(count)},count) IO.pure(Tensor(),loaded("load",path,shape,outcome,count)) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_file.bend&name=Outcome https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_file.bend&name=Reading https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_file.bend&name=Tensor https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_file.bend&name=fault https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_file.bend&name=fresh https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_file.bend&name=fuel https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_file.bend&name=loaded https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_file.bend&name=read_all