{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
module GHC.ByteOrder where
#include <ghcautoconf.h>
import GHC.Generics (Generic)
data ByteOrder
= BigEndian
| LittleEndian
deriving ( ByteOrder -> ByteOrder -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ByteOrder -> ByteOrder -> Bool
$c/= :: ByteOrder -> ByteOrder -> Bool
== :: ByteOrder -> ByteOrder -> Bool
$c== :: ByteOrder -> ByteOrder -> Bool
Eq
, Eq ByteOrder
ByteOrder -> ByteOrder -> Bool
ByteOrder -> ByteOrder -> Ordering
ByteOrder -> ByteOrder -> ByteOrder
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ByteOrder -> ByteOrder -> ByteOrder
$cmin :: ByteOrder -> ByteOrder -> ByteOrder
max :: ByteOrder -> ByteOrder -> ByteOrder
$cmax :: ByteOrder -> ByteOrder -> ByteOrder
>= :: ByteOrder -> ByteOrder -> Bool
$c>= :: ByteOrder -> ByteOrder -> Bool
> :: ByteOrder -> ByteOrder -> Bool
$c> :: ByteOrder -> ByteOrder -> Bool
<= :: ByteOrder -> ByteOrder -> Bool
$c<= :: ByteOrder -> ByteOrder -> Bool
< :: ByteOrder -> ByteOrder -> Bool
$c< :: ByteOrder -> ByteOrder -> Bool
compare :: ByteOrder -> ByteOrder -> Ordering
$ccompare :: ByteOrder -> ByteOrder -> Ordering
Ord
, ByteOrder
forall a. a -> a -> Bounded a
maxBound :: ByteOrder
$cmaxBound :: ByteOrder
minBound :: ByteOrder
$cminBound :: ByteOrder
Bounded
, Int -> ByteOrder
ByteOrder -> Int
ByteOrder -> [ByteOrder]
ByteOrder -> ByteOrder
ByteOrder -> ByteOrder -> [ByteOrder]
ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder]
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder]
$cenumFromThenTo :: ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder]
enumFromTo :: ByteOrder -> ByteOrder -> [ByteOrder]
$cenumFromTo :: ByteOrder -> ByteOrder -> [ByteOrder]
enumFromThen :: ByteOrder -> ByteOrder -> [ByteOrder]
$cenumFromThen :: ByteOrder -> ByteOrder -> [ByteOrder]
enumFrom :: ByteOrder -> [ByteOrder]
$cenumFrom :: ByteOrder -> [ByteOrder]
fromEnum :: ByteOrder -> Int
$cfromEnum :: ByteOrder -> Int
toEnum :: Int -> ByteOrder
$ctoEnum :: Int -> ByteOrder
pred :: ByteOrder -> ByteOrder
$cpred :: ByteOrder -> ByteOrder
succ :: ByteOrder -> ByteOrder
$csucc :: ByteOrder -> ByteOrder
Enum
, ReadPrec [ByteOrder]
ReadPrec ByteOrder
Int -> ReadS ByteOrder
ReadS [ByteOrder]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ByteOrder]
$creadListPrec :: ReadPrec [ByteOrder]
readPrec :: ReadPrec ByteOrder
$creadPrec :: ReadPrec ByteOrder
readList :: ReadS [ByteOrder]
$creadList :: ReadS [ByteOrder]
readsPrec :: Int -> ReadS ByteOrder
$creadsPrec :: Int -> ReadS ByteOrder
Read
, Int -> ByteOrder -> ShowS
[ByteOrder] -> ShowS
ByteOrder -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ByteOrder] -> ShowS
$cshowList :: [ByteOrder] -> ShowS
show :: ByteOrder -> String
$cshow :: ByteOrder -> String
showsPrec :: Int -> ByteOrder -> ShowS
$cshowsPrec :: Int -> ByteOrder -> ShowS
Show
, forall x. Rep ByteOrder x -> ByteOrder
forall x. ByteOrder -> Rep ByteOrder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ByteOrder x -> ByteOrder
$cfrom :: forall x. ByteOrder -> Rep ByteOrder x
Generic
)
targetByteOrder :: ByteOrder
#if defined(WORDS_BIGENDIAN)
targetByteOrder = BigEndian
#else
targetByteOrder :: ByteOrder
targetByteOrder = ByteOrder
LittleEndian
#endif