Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- data Endian
- isLittleEndian :: Endian -> Bool
- isBigEndian :: Endian -> Bool
- class EndianSensitive α where
- toLittleEndian :: EndianSensitive α => α -> α
- fromLittleEndian :: EndianSensitive α => α -> α
- toBigEndian :: EndianSensitive α => α -> α
- fromBigEndian :: EndianSensitive α => α -> α
- toEndian :: EndianSensitive α => Endian -> α -> α
- fromEndian :: EndianSensitive α => Endian -> α -> α
Documentation
Endianness.
LittleEndian | Little-endian |
BigEndian | Big-endian |
isLittleEndian :: Endian -> Bool Source #
Return True
if the supplied value is LittleEndian
.
class EndianSensitive α where Source #
Raw, endian-sensitive data.
swapEndian :: α -> α Source #
Change the endianness of the argument.
toLittleEndian :: EndianSensitive α => α -> α Source #
Convert from the native format to little-endian.
fromLittleEndian :: EndianSensitive α => α -> α Source #
Convert from little-endian to the native format.
toBigEndian :: EndianSensitive α => α -> α Source #
Convert from the native format to big-endian.
fromBigEndian :: EndianSensitive α => α -> α Source #
Convert from big-endian to the native format.
toEndian :: EndianSensitive α => Endian -> α -> α Source #
Convert from the native format to the specified endianness.
fromEndian :: EndianSensitive α => Endian -> α -> α Source #
Convert from the specified endianness to the native format.