def file_write_got
import gralha-byte-words@0.1.0.0/words.bend as Wordsimport Base
232def file_write_got(what: String, r: File & Array<U32> & Result<&1, &1, U32 & String, Unit>) -> IO(File):
233 (file, a, v) = r
234 match v:
235 case Done{u}:
236 do IO<File>:
237 Unit <- drop(a)
238 return file
239 case Fail{e}:
240 do IO<File>:
241 Unit <- drop(a)
242 Unit <- File.close(file)
243 Unit <- fail(what, e)
244 IO.die(File, 1, "unreachable")