def ws.found

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

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/root.bend as R
import ezx@1.11.0.0/src/pkg/path.bend as P
import ezx@1.11.0.0/src/ws/relock.bend as Rel

386# where `ez add` or `ez remove` runs, in what the search found
387def ws.found(+top: String, found: R.Found) -> IO(Rel.Ws):
388  match found:
389    case R.Within{root, rel}:
390      do IO<Rel.Ws>:
391        rt : Rel.Rooted <- rooted(P.join(top, W.segs.text(root)), rel)
392        return Rel.Inside{rt}
393    case _:
394      IO.pure(Rel.Ws, Rel.Own{})

Uses (10)

Used by (1)