def read_head_opened
import near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend as Ioimport Base
81def read_head_opened(r: Result<&1, &1, U32 & String, File>, max: U32) -> IO(String):
82 match r:
83 case Done{f}:
84 do IO<String>:
85 got : File & Result<&1, &1, U32 & String, String> <- File.read(f, max)
86 read_done(got)
87 case Fail{_}:
88 IO.pure(String, "")