def write_opened
import near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend as Ioimport Base
107def write_opened(r: Result<&1, &1, U32 & String, File>, text: String) -> IO(Unit):
108 match r:
109 case Done{f}:
110 do IO<Unit>:
111 w : File & Result<&1, &1, U32 & String, Unit> <- File.write(f, text)
112 after_write(w)
113 case Fail{_}:
114 IO.die(Unit, 1, "cannot write a file")