    {-|
    Description: A common location for defining multi-byte value ordering.
    Copyright        : (c) Galois, Inc 2019
    -}

    module Data.Parameterized.Utils.Endian where

    -- | Determines the composition of smaller numeric values into larger values.
    --
    --  BigEndian = most significant values in the lowest index location / first
    --  LittleEndian = least significant values in the lowest index location / first
    --
    --  Value: 0x01020304
    --  BigEndian    = [ 0x01, 0x02, 0x03, 0x04 ]
    --  LittleEndian = [ 0x04, 0x03, 0x02, 0x01 ]
    data Endian = LittleEndian | BigEndian deriving (Endian -> Endian -> Bool
    (Endian -> Endian -> Bool)
    -> (Endian -> Endian -> Bool) -> Eq Endian
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Endian -> Endian -> Bool
    == :: Endian -> Endian -> Bool
    $c/= :: Endian -> Endian -> Bool
    /= :: Endian -> Endian -> Bool
    Eq,Int -> Endian -> ShowS
    [Endian] -> ShowS
    Endian -> String
    (Int -> Endian -> ShowS)
    -> (Endian -> String) -> ([Endian] -> ShowS) -> Show Endian
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Endian -> ShowS
    showsPrec :: Int -> Endian -> ShowS
    $cshow :: Endian -> String
    show :: Endian -> String
    $cshowList :: [Endian] -> ShowS
    showList :: [Endian] -> ShowS
    Show,Eq Endian
    Eq Endian =>
    (Endian -> Endian -> Ordering)
    -> (Endian -> Endian -> Bool)
    -> (Endian -> Endian -> Bool)
    -> (Endian -> Endian -> Bool)
    -> (Endian -> Endian -> Bool)
    -> (Endian -> Endian -> Endian)
    -> (Endian -> Endian -> Endian)
    -> Ord Endian
    Endian -> Endian -> Bool
    Endian -> Endian -> Ordering
    Endian -> Endian -> Endian
    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
    $ccompare :: Endian -> Endian -> Ordering
    compare :: Endian -> Endian -> Ordering
    $c< :: Endian -> Endian -> Bool
    < :: Endian -> Endian -> Bool
    $c<= :: Endian -> Endian -> Bool
    <= :: Endian -> Endian -> Bool
    $c> :: Endian -> Endian -> Bool
    > :: Endian -> Endian -> Bool
    $c>= :: Endian -> Endian -> Bool
    >= :: Endian -> Endian -> Bool
    $cmax :: Endian -> Endian -> Endian
    max :: Endian -> Endian -> Endian
    $cmin :: Endian -> Endian -> Endian
    min :: Endian -> Endian -> Endian
    Ord)