AmlNs.AmlNs.resolve: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_ns.bend as AmlNs Lines 236-241 of bend-osdev-acpi@0.1.1.0/aml_ns.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_ns.bend&start_line=236&end_line=241 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-acpi@0.1.1.0/aml_name.bend as N # the object a name refers to, from a scope: a single NameSeg is searched # for outward (5.3); None if it is not defined def AmlNs.resolve(+ns: AmlNs, +scope: String, +n: N.AmlName) -> Maybe<&2, String>: match n: case N.AmlName{r, u, +ss}: ns.resolve.pick(Bool.and(Bool.not(r), Bool.and(Nat.is_eq(u, 0n), Nat.is_eq(List.length(&2, B.Octets, ss), 1n))), ns, scope, N.AmlName{r, u, ss}) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_name.bend&name=AmlName https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_ns.bend&name=AmlNs https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_ns.bend&name=ns.resolve.pick https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets