leb128-0.1.0.0: LEB128 encoding logic for and in Haskell

Copyright(c) Andreas Klebinger 2020
LicenseBSD3
MaintainerAndreas Klebinger
PortabilityGHC >= 7.10
Safe HaskellNone
LanguageHaskell2010

Codec.LEB128.Constraints

Description

SLEB128 is a synonym for the required constraints to encode values in the signed version of LEB128.

LEB128 is a typeclass which by default limits encoding in unsigned LEB128 format to GHC-Provided untyped valued.

UnsafeAnyLEB128 is a newtype providing an explicit way to avoid this restriction for cases where the type is signed, but values are not.

Synopsis

Documentation

class (Bits a, Integral a) => LEB128 a Source #

Indicates that a type can safely be encoded as (unsigned) LEB128.

Instances
LEB128 Natural Source # 
Instance details

Defined in Codec.LEB128.Constraints

LEB128 Word Source # 
Instance details

Defined in Codec.LEB128.Constraints

LEB128 Word8 Source # 
Instance details

Defined in Codec.LEB128.Constraints

LEB128 Word16 Source # 
Instance details

Defined in Codec.LEB128.Constraints

LEB128 Word32 Source # 
Instance details

Defined in Codec.LEB128.Constraints

LEB128 Word64 Source # 
Instance details

Defined in Codec.LEB128.Constraints

(Bits a, Integral a) => LEB128 (UnsafeAnyLEB128 a) Source #

Unsafe escape hatch to force a particular encoding.

Instance details

Defined in Codec.LEB128.Constraints

class (Bits a, Integral a) => SLEB128 a Source #

Indicates that a type can safely be encoded as (signed) SLEB128.

Instances
SLEB128 Int Source # 
Instance details

Defined in Codec.LEB128.Constraints

SLEB128 Int8 Source # 
Instance details

Defined in Codec.LEB128.Constraints

SLEB128 Int16 Source # 
Instance details

Defined in Codec.LEB128.Constraints

SLEB128 Int32 Source # 
Instance details

Defined in Codec.LEB128.Constraints

SLEB128 Int64 Source # 
Instance details

Defined in Codec.LEB128.Constraints

SLEB128 Integer Source # 
Instance details

Defined in Codec.LEB128.Constraints

(Bits a, Integral a) => SLEB128 (UnsafeAnyLEB128 a) Source #

Unsafe escape hatch to force a particular encoding.

Instance details

Defined in Codec.LEB128.Constraints

newtype UnsafeAnyLEB128 a Source #

Constructors

UnsafeAnyLEB128 a 
Instances
Enum a => Enum (UnsafeAnyLEB128 a) Source # 
Instance details

Defined in Codec.LEB128.Constraints

Eq a => Eq (UnsafeAnyLEB128 a) Source # 
Instance details

Defined in Codec.LEB128.Constraints

Integral a => Integral (UnsafeAnyLEB128 a) Source # 
Instance details

Defined in Codec.LEB128.Constraints

Num a => Num (UnsafeAnyLEB128 a) Source # 
Instance details

Defined in Codec.LEB128.Constraints

Ord a => Ord (UnsafeAnyLEB128 a) Source # 
Instance details

Defined in Codec.LEB128.Constraints

Real a => Real (UnsafeAnyLEB128 a) Source # 
Instance details

Defined in Codec.LEB128.Constraints

Bits a => Bits (UnsafeAnyLEB128 a) Source # 
Instance details

Defined in Codec.LEB128.Constraints

(Bits a, Integral a) => SLEB128 (UnsafeAnyLEB128 a) Source #

Unsafe escape hatch to force a particular encoding.

Instance details

Defined in Codec.LEB128.Constraints

(Bits a, Integral a) => LEB128 (UnsafeAnyLEB128 a) Source #

Unsafe escape hatch to force a particular encoding.

Instance details

Defined in Codec.LEB128.Constraints