License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | stable |
Portability | good |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
data Endianness Source #
represent the CPU endianness
Big endian system stores bytes with the MSB as the first byte. Little endian system stores bytes with the LSB as the first byte.
middle endian is purposely avoided.
Instances
Eq Endianness Source # | |
Defined in Data.Memory.Endian (==) :: Endianness -> Endianness -> Bool Source # (/=) :: Endianness -> Endianness -> Bool Source # |
|
Show Endianness Source # | |
Defined in Data.Memory.Endian |
getSystemEndianness :: Endianness Source #
Return the system endianness
Big Endian value
Instances
Eq a => Eq ( BE a) Source # | |
Show a => Show ( BE a) Source # | |
Storable a => Storable ( BE a) Source # | |
Defined in Data.Memory.Endian sizeOf :: BE a -> Int Source # alignment :: BE a -> Int Source # peekElemOff :: Ptr ( BE a) -> Int -> IO ( BE a) Source # pokeElemOff :: Ptr ( BE a) -> Int -> BE a -> IO () Source # peekByteOff :: Ptr b -> Int -> IO ( BE a) Source # pokeByteOff :: Ptr b -> Int -> BE a -> IO () Source # |
Little Endian value
Instances
Eq a => Eq ( LE a) Source # | |
Show a => Show ( LE a) Source # | |
Storable a => Storable ( LE a) Source # | |
Defined in Data.Memory.Endian sizeOf :: LE a -> Int Source # alignment :: LE a -> Int Source # peekElemOff :: Ptr ( LE a) -> Int -> IO ( LE a) Source # pokeElemOff :: Ptr ( LE a) -> Int -> LE a -> IO () Source # peekByteOff :: Ptr b -> Int -> IO ( LE a) Source # pokeByteOff :: Ptr b -> Int -> LE a -> IO () Source # |