{-# LANGUAGE DeriveGeneric #-}

module X86.Prefix (Prefix(..)) where

import GHC.Generics (Generic)
import qualified Data.Serialize as Cereal
import Control.DeepSeq

data Prefix = InvalidPrefix | REP | REPZ | REPNE | LOCK | BND
  deriving (Int -> Prefix -> ShowS
[Prefix] -> ShowS
Prefix -> String
(Int -> Prefix -> ShowS)
-> (Prefix -> String) -> ([Prefix] -> ShowS) -> Show Prefix
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Prefix] -> ShowS
$cshowList :: [Prefix] -> ShowS
show :: Prefix -> String
$cshow :: Prefix -> String
showsPrec :: Int -> Prefix -> ShowS
$cshowsPrec :: Int -> Prefix -> ShowS
Show,Prefix -> Prefix -> Bool
(Prefix -> Prefix -> Bool)
-> (Prefix -> Prefix -> Bool) -> Eq Prefix
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Prefix -> Prefix -> Bool
$c/= :: Prefix -> Prefix -> Bool
== :: Prefix -> Prefix -> Bool
$c== :: Prefix -> Prefix -> Bool
Eq,Eq Prefix
Eq Prefix
-> (Prefix -> Prefix -> Ordering)
-> (Prefix -> Prefix -> Bool)
-> (Prefix -> Prefix -> Bool)
-> (Prefix -> Prefix -> Bool)
-> (Prefix -> Prefix -> Bool)
-> (Prefix -> Prefix -> Prefix)
-> (Prefix -> Prefix -> Prefix)
-> Ord Prefix
Prefix -> Prefix -> Bool
Prefix -> Prefix -> Ordering
Prefix -> Prefix -> Prefix
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 :: Prefix -> Prefix -> Prefix
$cmin :: Prefix -> Prefix -> Prefix
max :: Prefix -> Prefix -> Prefix
$cmax :: Prefix -> Prefix -> Prefix
>= :: Prefix -> Prefix -> Bool
$c>= :: Prefix -> Prefix -> Bool
> :: Prefix -> Prefix -> Bool
$c> :: Prefix -> Prefix -> Bool
<= :: Prefix -> Prefix -> Bool
$c<= :: Prefix -> Prefix -> Bool
< :: Prefix -> Prefix -> Bool
$c< :: Prefix -> Prefix -> Bool
compare :: Prefix -> Prefix -> Ordering
$ccompare :: Prefix -> Prefix -> Ordering
$cp1Ord :: Eq Prefix
Ord,ReadPrec [Prefix]
ReadPrec Prefix
Int -> ReadS Prefix
ReadS [Prefix]
(Int -> ReadS Prefix)
-> ReadS [Prefix]
-> ReadPrec Prefix
-> ReadPrec [Prefix]
-> Read Prefix
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Prefix]
$creadListPrec :: ReadPrec [Prefix]
readPrec :: ReadPrec Prefix
$creadPrec :: ReadPrec Prefix
readList :: ReadS [Prefix]
$creadList :: ReadS [Prefix]
readsPrec :: Int -> ReadS Prefix
$creadsPrec :: Int -> ReadS Prefix
Read,(forall x. Prefix -> Rep Prefix x)
-> (forall x. Rep Prefix x -> Prefix) -> Generic Prefix
forall x. Rep Prefix x -> Prefix
forall x. Prefix -> Rep Prefix x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Prefix x -> Prefix
$cfrom :: forall x. Prefix -> Rep Prefix x
Generic)

instance Cereal.Serialize Prefix
instance NFData Prefix