def wf.go
emerging-eztoml@0.9.0.0 · main.bend:6331
import emerging-eztoml@0.9.0.0/main.bend as EmergingEztoml
import Base
6331
6332def wf.go(vs: List<&2, Val>, +at: WfAt) -> Bool:
6333 match vs:
6334 case []:
6335 True{}
6336 case VPair{+name, VHead{+path, rows}} <> +t:
6337 wf.head(at, name, path, t,
6338 _u => wf.then(wf.go(rows, WfRows{path}), _v => wf.go(t, at)))
6339 case VPair{+name, VAots{+path, +elems}} <> +t:
6340 wf.aots(at, name, path, Bool.not(List.is_empty(&2, Val, elems)), t,
6341 _u => wf.then(wf.go(elems, WfElems{path}), _v => wf.go(t, at)))
6342 case VPair{+name, VArr{items}} <> +t:
6343 wf.pair(at, name, t, True{},
6344 _u => wf.then(wf.go(items, WfItems{}), _v => wf.go(t, at)))
6345 case VPair{+name, VInl{rows}} <> +t:
6346 wf.pair(at, name, t, True{},
6347 _u => wf.then(wf.go(rows, WfInl{}), _v => wf.go(t, at)))
6348 case VPair{+name, val} <> +t:
6349 wf.pair(at, name, t, wf.atom(val), _u => wf.go(t, at))
6350 case VAot{+path, rows} <> t:
6351 wf.aot(at, path,
6352 _u => wf.then(wf.go(rows, WfRows{path}), _v => wf.go(t, at)))
6353 case VArr{items} <> t:
6354 wf.item(at, True{},
6355 _u => wf.then(wf.go(items, WfItems{}), _v => wf.go(t, at)))
6356 case VInl{rows} <> t:
6357 wf.item(at, True{},
6358 _u => wf.then(wf.go(rows, WfInl{}), _v => wf.go(t, at)))
6359 case val <> t:
6360 wf.item(at, wf.atom(val), _u => wf.go(t, at))