typesafe-endian-0.1.0.1: Enforce endianness with types

Safe HaskellSafe-Inferred

Data.Endian

Synopsis

Documentation

data BigEndian α Source

Wrapper, guaranteeing enclosed type is big-endian

data LittleEndian α Source

Wrapper, guaranteeing enclosed type is little-endian

toBigEndian :: EndianSensitive α => α -> BigEndian αSource

Convert from the native format to big-endian

fromBigEndian :: EndianSensitive α => BigEndian α -> αSource

Convert from big-endian to the native format

toLittleEndian :: EndianSensitive α => α -> LittleEndian αSource

Convert from the native format to little-endian

fromLittleEndian :: EndianSensitive α => LittleEndian α -> αSource

Convert from little-endian to the native format