def read_seq

cswap-bend-cli@0.1.0.0 · store/io.bend:75

import cswap-bend-cli@0.1.0.0/store/io.bend as Io
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase

75# sequence.json, or None when there is none yet. A torn file is an error and
76# is never replaced.
77def read_seq(+root: String) -> Act.of(Maybe<&2, Json.Json>):
78  do ActM<Maybe<&2, Json.Json>>:
79    ex : Bool <- Act.lift(Bool, Fs.exists(SBase.seq_path(root)))
80    read_seq2(ex, SBase.seq_path(root))

Uses (11)

Used by (16)