typesafe-endian-0.1.0.1: Enforce endianness with types

Safe HaskellSafe-Inferred

Data.Endian.Unsafe

Synopsis

Documentation

data BigEndian α Source

Wrapper, guaranteeing enclosed type is big-endian

data LittleEndian α Source

Wrapper, guaranteeing enclosed type is little-endian

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

put in BigEndian newtype without any swapping

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

put in LittleEndian newtype without any swapping

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

pull out of BigEndian newtype without any swapping

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

pull out of LittleEndian newtype without any swapping

swapEndian :: EndianSensitive α => α -> αSource

Invert the the endianness of the argument