def nm.ups
import bend-osdev-acpi@0.1.1.0/aml_name.bend as AmlNameimport Base
import bend-osdev-acpi@0.1.1.0/error.bend as E
317# parent prefixes, then a path; k is the kind of the first byte
318def nm.ups(xs: List<&2, U32>, k: AmlLeadKind) -> Result<&2, &2, E.AcpiError, AmlNameL>:
319 match xs:
320 case Nil{}:
321 Fail{E.AcpiAmlTruncated{}}
322 case Con{c, +t}:
323 match k:
324 case AmlLParent{}:
325 nm.up1(nm.ups(t, nm.head_kind(t)))
326 case _:
327 nm.named(False{}, 0n, nm.path.k(k, c, t))