def seg_l
bend-osdev-acpi@0.1.1.0 · PROOF.bend:2060
import bend-osdev-acpi@0.1.1.0/PROOF.bend as PROOF
import Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B
import bend-osdev-bytes@0.1.1.0/LAWS.bend as BL
import bend-osdev-acpi@0.1.1.0/error.bend as E
import bend-osdev-acpi@0.1.1.0/aml_name.bend as N
2060def seg_l(+s: B.Octets, +L: List<&2, U32>, +R: List<&2, U32>, +e: {B.Octets.to_list(s) == L : List<&2, U32>}, +ok: {N.nm.seg_ok.list(L) == True{} : Bool}) -> {Done{N.AmlSegL{s, R}} == N.nm.seg(B.append(L, R)) : Result<&2, &2, E.AcpiError, N.AmlSegL>}:
2061 match L:
2062 case Nil{}:
2063 Empty.absurd({Done{N.AmlSegL{s, R}} == N.nm.seg(B.append(Nil{}, R)) : Result<&2, &2, E.AcpiError, N.AmlSegL>}, ft_absurd(ok))
2064 case Con{c0, L1}:
2065 match L1:
2066 case Nil{}:
2067 Empty.absurd({Done{N.AmlSegL{s, R}} == N.nm.seg(B.append(Con{c0, Nil{}}, R)) : Result<&2, &2, E.AcpiError, N.AmlSegL>}, ft_absurd(ok))
2068 case Con{c1, L2}:
2069 match L2:
2070 case Nil{}:
2071 Empty.absurd({Done{N.AmlSegL{s, R}} == N.nm.seg(B.append(Con{c0, Con{c1, Nil{}}}, R)) : Result<&2, &2, E.AcpiError, N.AmlSegL>}, ft_absurd(ok))
2072 case Con{c2, L3}:
2073 match L3:
2074 case Nil{}:
2075 Empty.absurd({Done{N.AmlSegL{s, R}} == N.nm.seg(B.append(Con{c0, Con{c1, Con{c2, Nil{}}}}, R)) : Result<&2, &2, E.AcpiError, N.AmlSegL>}, ft_absurd(ok))
2076 case Con{c3, L4}:
2077 match L4:
2078 case Con{c4, L5}:
2079 Empty.absurd({Done{N.AmlSegL{s, R}} == N.nm.seg(B.append(Con{c0, Con{c1, Con{c2, Con{c3, Con{c4, L5}}}}}, R)) : Result<&2, &2, E.AcpiError, N.AmlSegL>}, ft_absurd(ok))
2080 case Nil{}:
2081 %Equal.sym(Bool, N.nm.seg_ok4(c0, c1, c2, c3), True{}, ok) : {Done{N.AmlSegL{s, R}} == N.nm.seg.pick(_, c0, c1, c2, c3, R) : Result<&2, &2, E.AcpiError, N.AmlSegL>}
2082 %BL.octets_of_to(s) : {Done{N.AmlSegL{_, R}} == Done{N.AmlSegL{B.Octets.of_list(Con{c0, Con{c1, Con{c2, Con{c3, Nil{}}}}}), R}} : Result<&2, &2, E.AcpiError, N.AmlSegL>}
2083 %e : {Done{N.AmlSegL{B.Octets.of_list(B.Octets.to_list(s)), R}} == Done{N.AmlSegL{B.Octets.of_list(_), R}} : Result<&2, &2, E.AcpiError, N.AmlSegL>}
2084 {==}