def joint
import ezx@1.11.0.0/src/ws/doctor.bend as Doctorimport Base
import ezx@1.11.0.0/src/ledger/render.bend as Rend
import ezx@1.11.0.0/src/ws/joint.bend as J
35# what the doctor judges at a workspace root: the joint ledger, the same text
36# `ez lock` plans the root lock from, or, when it cannot be made, the root's
37# own ledger with why
38def joint(jj: J.Joint, +text: String, +fs: List<&2, J.Found>) -> Doctored:
39 match jj:
40 case J.Lone{}:
41 Doctored{Some{text}, Alone{}}
42 case J.Clash{why}:
43 Doctored{Some{text}, Back{text, fs, why}}
44 case J.Joint{mm}:
45 Doctored{Some{Rend.show(mm)}, Back{text, fs, ""}}