def lock.joint

ezx@1.11.0.0 · src/ws/relock.bend:235

import ezx@1.11.0.0/src/ws/relock.bend as Relock
import Base
import ezx@1.11.0.0/src/lock/world.bend as LW
import ezx@1.11.0.0/src/ledger/render.bend as Rend
import ezx@1.11.0.0/src/ws/workspace.bend as W
import ezx@1.11.0.0/src/ws/joint.bend as J
import ezx@1.11.0.0/src/ws/up.bend as U

235# the lock, once the ledgers were joined: as `ez lock` at the root reads it
236# (ws/run.bend's `joint.at`), with the members' answers first
237def lock.joint(
238  jj: J.Joint,
239  +at: String,
240  +text: String,
241  +spec: W.Spec,
242  +fs: List<&2, J.Found>,
243  +listing: LW.Listing,
244  +lock: String,
245  rs: List<&2, LW.Reply>
246) -> Lock:
247  match jj:
248    case J.Lone{}:
249      Lock{U.Alone{}, world(at, Some{text}, listing, rs)}
250    case J.Clash{why}:
251      Stop{why}
252    case J.Joint{+mm}:
253      Lock{U.Back{text, spec, fs, lock},
254        world(at, Some{Rend.show(mm)}, listing,
255          List.append(&2, LW.Reply, J.seeds(J.Joint{mm}, J.files(listing)), rs))}

Uses (15)

Used by (1)