Source/Packages

Std.Word

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

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

def · lines 1108–1120

stdU16DecodeBEExact

Full file
1108def stdU16DecodeBEExact =
1109  (lambda unrestricted input : Bytes .
1110    (nat-eliminate
1111      (lambda unrestricted current : Nat . (family StdOption (family StdU16)))
1112      (constructor StdOption StdNone (family StdU16))
1113      (lambda unrestricted predecessor : Nat .
1114        (lambda unrestricted induction : (family StdOption (family StdU16)) .
1115          (constructor
1116            StdOption
1117            StdSome
1118            (family StdU16)
1119            (stdU16FromBytes (bytes-head (bytes-tail input)) (bytes-head input)))))
1120      (naturalEqual (bytes-length input) (succ (succ zero)))))

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.