Source/Packages

Std.Codec

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

221 lines16 declarations8.7 KiBSHA-256 660b0bd459e5

def · lines 43–53

stdCodecDecodeByte

Full file
One byte, decoded, with the rest of the input.
43def stdCodecDecodeByte =
44  (lambda unrestricted input : Bytes .
45    (eliminate
46      StdBool
47      (lambda unrestricted current : (family StdBool) . (family StdDecoded Byte))
48      (stdBoolFromNatural (bytes-length input))
49      (branch
50        StdTrue
51        .
52        (constructor StdDecoded StdDecodedValue Byte (bytes-head input) (bytes-tail input)))
53      (branch StdFalse . (constructor StdDecoded StdDecodedTruncated Byte))))

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.