def settle.seen

ezx@1.11.0.0 · src/lock/run.bend:704

import ezx@1.11.0.0/src/lock/run.bend as Run
import Base
import ezx@1.11.0.0/src/lock/world.bend as W

704# a member's package as the lock reads it: from BEND_LIB when a tree is laid
705# there under its hash, as a git package's is (`git.seen`), and fresh from
706# the committed tree, as the joint ledger walked it, otherwise
707def settle.seen(got: Maybe<&2, String>, ask: W.Ask, answer: W.Answer, +lib: String, +hash: String) -> IO(W.Reply):
708  match got:
709    case None{}:
710      IO.pure(W.Reply, W.Reply{ask, answer})
711    case Some{text}:
712      do IO<W.Reply>:
713        a : W.Answer <- answer.lib(lib ++ "/" ++ hash, text)
714        return W.Reply{ask, a}

Uses (10)

Used by (1)