System.ByteOrder

byteorder-1.0.4: Exposes the native endianness or byte ordering of the system.

Safe Haskell | None
Language | Haskell98

System.ByteOrder

Synopsis

- byteOrder :: ByteOrder
- data ByteOrder
  - = BigEndian
  - | LittleEndian
  - | Mixed (Word8, Word8, Word8, Word8)

# Documentation

byteOrder :: ByteOrder #

Returns the native byte ordering of the system.

data ByteOrder #

Indicates the byte-ordering for a 4-byte value, where '1' indicates the most-significant byte and '4' indicates the least significant byte.

In this format, big endian byte order would be represented as: (1,2,3,4).

For convinience, the most common cases (BigEndian and LittleEndian) are provided their own constructors.

Constructors

BigEndian |
LittleEndian |
Mixed (Word8, Word8, Word8, Word8) |

Instances

Eq ByteOrder # |
Methods (==) :: ByteOrder -> ByteOrder -> Bool # (/=) :: ByteOrder -> ByteOrder -> Bool #
Ord ByteOrder # |
Methods compare :: ByteOrder -> ByteOrder -> Ordering # (<) :: ByteOrder -> ByteOrder -> Bool # (<=) :: ByteOrder -> ByteOrder -> Bool # (>) :: ByteOrder -> ByteOrder -> Bool # (>=) :: ByteOrder -> ByteOrder -> Bool # max :: ByteOrder -> ByteOrder -> ByteOrder # min :: ByteOrder -> ByteOrder -> ByteOrder #
Read ByteOrder # |
Methods readsPrec :: Int -> ReadS ByteOrder # readList :: ReadS [ByteOrder] # readPrec :: ReadPrec ByteOrder # readListPrec :: ReadPrec [ByteOrder] #
Show ByteOrder # |
Methods showsPrec :: Int -> ByteOrder -> ShowS # show :: ByteOrder -> String # showList :: [ByteOrder] -> ShowS #