Module Byte

Byte operations and byte classes.

type Byte.Class = either {
  .any !,
  .byte Byte,
  .range (Byte, Byte)!,
}

A class of bytes for parsers and Byte.Is.

  • .any! — any byte.
  • .byte b — a specific byte.
  • .range(lo, hi)! — bytes in the inclusive range [lo, hi].
dec Byte.Code : [Byte] Nat

Returns the numeric value of a byte (0-255) as a natural number.