Source/Packages

Std.Word

packages/foundation/standard/src/Std/Word.alpha

1,783 lines192 declarations64.2 KiBSHA-256 27bf8c3f30ee

def · lines 708–727

stdU32ToU16Checked

Full file
708def stdU32ToU16Checked =
709  (lambda unrestricted value : (family ModelWord32) .
710    (eliminate
711      ModelWord32
712      (lambda unrestricted current : (family ModelWord32) . (family StdOption (family StdU16)))
713      value
714      (branch
715        ModelWord32Value
716        b0
717        b1
718        b2
719        b3
720        .
721        (nat-eliminate
722          (lambda unrestricted current : Nat . (family StdOption (family StdU16)))
723          (constructor StdOption StdNone (family StdU16))
724          (lambda unrestricted predecessor : Nat .
725            (lambda unrestricted induction : (family StdOption (family StdU16)) .
726              (constructor StdOption StdSome (family StdU16) (stdU16FromBytes b0 b1))))
727          (stdFlagAnd (byte-equal b2 (byte 0)) (byte-equal b3 (byte 0)))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.