def joint.read

ezx@1.11.0.0 · src/ws/run.bend:196

import ezx@1.11.0.0/src/ws/run.bend as Run
import Base
import ezx@1.11.0.0/src/ws/workspace.bend as W
import ezx@1.11.0.0/src/ws/up.bend as U
import ezx@1.11.0.0/src/pkg/pkg.bend as K

196# what one ledger's text says: no workspace, read as it is; a workspace root,
197# whose members are read and joined; or a table that cannot be read, which
198# the joint ledger refuses
199def joint.read(rd: W.Read, +text: String, +files: List<&2, K.Source>) -> IO(Planned):
200  match rd:
201    case W.Lone{}:
202      IO.pure(Planned, Planned{Some{text}, U.Alone{}, []})
203    case W.Bad{why}:
204      IO.die(Planned, 1, why)
205    case W.Root{+spec}:
206      joint.go(text, spec, files)

Uses (11)

Used by (1)