def in.logic.pick

bend-osdev-acpi@0.1.1.0 · aml_interp.bend:1174

import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp
import Base
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

1174def in.logic.pick(cmp: Bool, +op: Nat, +wide: Bool, a: V.AmlValue, +b: V.AmlValue) -> Result<&2, &2, E.AcpiError, Bool>:
1175  match cmp:
1176    case True{}:
1177      Result.map(&2, &2, E.AcpiError, Cmp, Bool, x => in.cmp.op(op, x), V.AmlValue.compare(wide, a, b))
1178    case False{}:
1179      in.logic2(in.truth(wide, a), in.truth(wide, b), op)

Uses (11)

Used by (1)