AmlInterp.in.bf.wr: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp Lines 725-732 of bend-osdev-acpi@0.1.1.0/aml_interp.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&start_line=725&end_line=732 import Base import bend-osdev-word64@0.1.1.0/word64.bend as W import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-acpi@0.1.1.0/error.bend as E import bend-osdev-acpi@0.1.1.0/aml_value.bend as V import bend-osdev-acpi@0.1.1.0/aml_field.bend as F def in.bf.wr(-H: Data, +w: AmlWorld, +l: V.AmlLoc, src: Result<&2, &2, E.AcpiError, V.AmlValue>, +off: Nat, +bits: Nat, +v: V.AmlValue) -> Result<&2, &2, E.AcpiError, AmlWorld>: match src: case Fail{e}: Fail{e} case Done{V.AmlBuf{+b}}: in.bf.wr.go(H, w, l, Result.bind(&2, &2, E.AcpiError, W.W64, B.Octets, V.AmlValue.to_int(in.wide(H, w), v), x => F.AmlBits.set(b, off, Nat.min(bits, 64n), x))) case Done{o}: Fail{E.AcpiAmlBadType{"the source of a buffer field is not a buffer"}} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.min https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.bind https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_field.bend&name=AmlBits.set https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=AmlWorld https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.bf.wr.go https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.wide https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&name=AmlLoc https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&name=AmlValue https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&name=AmlValue.to_int https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/error.bend&name=AcpiError https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64