def write_text.opened

mylsm-lsm-store@0.6.0.1 · src/Fs.bend:482

import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs
import Base

482def write_text.opened(
483  opened: Result<&1, &1, U32 & String, File>,
484  data: String
485) -> IO(Result<&1, &1, U32 & String, Unit>):
486  match opened:
487    case Fail{error}: IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{error})
488    case Done{file}:
489      do IO<Result<&1, &1, U32 & String, Unit>>:
490        pair : File & Result<&1, &1, U32 & String, Unit> <- File.write(file, data)
491        write_text.closed(pair)

Uses (11)

Used by (1)