def check_size
import bend-ml-llama@0.2.0.0/main.bend as BendMlLlamaimport Base
1187# stops the program unless the file holds exactly n F32 numbers (n * 4 bytes)
1188def check_size(+path: String, +n: Nat) -> IO(Unit):
1189 do IO<Unit>:
1190 f : File <- IO.try(File, File.open(path, "r"))
1191 m : File & Result<&1, &1, U32 & String, U32> <- File.size(f)
1192 size_ok(m, Nat.mul(n, 4n), path)