Copyright | (c) axionbuster 2025 |
---|---|
License | BSD-3-Clause |
Safe Haskell | None |
Language | GHC2021 |
Implements Pack and Unpack instances for numeric types and Bool, including integral types, floating point numbers, and LEB128 encoding.
Synopsis
- packleb32 :: Integral a => a -> Builder
- unpackleb32 :: forall a (st :: ZeroBitType) r. Integral a => Parser st r a
- packfi :: (Integral a, Pack a, Integral b) => b -> Builder
- unpackfi :: forall a b (st :: ZeroBitType) r. (Integral a, Unpack a, Integral b) => Parser st r b
- guardnat :: forall a (st :: ZeroBitType) r. (Num a, Ord a, Show a) => String -> a -> Parser st r a
Documentation
unpackleb32 :: forall a (st :: ZeroBitType) r. Integral a => Parser st r a Source #
unpack from an LEB128-encoded Int32
unpackfi :: forall a b (st :: ZeroBitType) r. (Integral a, Unpack a, Integral b) => Parser st r b Source #
unpack b
from a number in the format of a
guardnat :: forall a (st :: ZeroBitType) r. (Num a, Ord a, Show a) => String -> a -> Parser st r a Source #
ensure the number is non-negative
Orphan instances
Pack Int16 Source # | |
Pack Int32 Source # | |
Pack Int64 Source # | |
Pack Int8 Source # | |
Pack Word16 Source # | |
Pack Word32 Source # | |
Pack Word64 Source # | |
Pack Word8 Source # | |
Pack Bool Source # | |
Pack Double Source # | |
Pack Float Source # | |
Unpack Int16 Source # | |
Unpack Int32 Source # | |
Unpack Int64 Source # | |
Unpack Int8 Source # | |
Unpack Word16 Source # | |
Unpack Word32 Source # | |
Unpack Word64 Source # | |
Unpack Word8 Source # | |
Unpack Bool Source # | |
Unpack Double Source # | |
Unpack Float Source # | |
(FiniteBits a, Integral a) => Pack (LEB a) Source # | |
(FiniteBits a, Num a) => Unpack (LEB a) Source # | |