def AmlMachine.halted
import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterpimport Base
146# the machine has stopped: Done or Fail
147def AmlMachine.halted(-H: Data, m: AmlMachine<H>) -> Bool:
148 match m:
149 case AmlMachine{AmlMDone{v}, c, fs, w}:
150 True{}
151 case AmlMachine{AmlMFail{e}, c, fs, w}:
152 True{}
153 case AmlMachine{md, c, fs, w}:
154 False{}