{-# language CPP #-}
module Vulkan.Core10.Enums.PipelineCacheHeaderVersion (PipelineCacheHeaderVersion( PIPELINE_CACHE_HEADER_VERSION_ONE
, ..
)) where
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Zero (Zero)
newtype = Int32
deriving newtype (PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
(PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool)
-> (PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Bool)
-> Eq PipelineCacheHeaderVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c/= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
== :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c== :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
Eq, Eq PipelineCacheHeaderVersion
Eq PipelineCacheHeaderVersion =>
(PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Ordering)
-> (PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Bool)
-> (PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Bool)
-> (PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Bool)
-> (PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Bool)
-> (PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion)
-> (PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion)
-> Ord PipelineCacheHeaderVersion
PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Ordering
PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
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 :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
$cmin :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
max :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
$cmax :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
>= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c>= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
> :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c> :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
<= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c<= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
< :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c< :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
compare :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Ordering
$ccompare :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Ordering
$cp1Ord :: Eq PipelineCacheHeaderVersion
Ord, Ptr b -> Int -> IO PipelineCacheHeaderVersion
Ptr b -> Int -> PipelineCacheHeaderVersion -> IO ()
Ptr PipelineCacheHeaderVersion -> IO PipelineCacheHeaderVersion
Ptr PipelineCacheHeaderVersion
-> Int -> IO PipelineCacheHeaderVersion
Ptr PipelineCacheHeaderVersion
-> Int -> PipelineCacheHeaderVersion -> IO ()
Ptr PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> IO ()
PipelineCacheHeaderVersion -> Int
(PipelineCacheHeaderVersion -> Int)
-> (PipelineCacheHeaderVersion -> Int)
-> (Ptr PipelineCacheHeaderVersion
-> Int -> IO PipelineCacheHeaderVersion)
-> (Ptr PipelineCacheHeaderVersion
-> Int -> PipelineCacheHeaderVersion -> IO ())
-> (forall b. Ptr b -> Int -> IO PipelineCacheHeaderVersion)
-> (forall b. Ptr b -> Int -> PipelineCacheHeaderVersion -> IO ())
-> (Ptr PipelineCacheHeaderVersion
-> IO PipelineCacheHeaderVersion)
-> (Ptr PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> IO ())
-> Storable PipelineCacheHeaderVersion
forall b. Ptr b -> Int -> IO PipelineCacheHeaderVersion
forall b. Ptr b -> Int -> PipelineCacheHeaderVersion -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> IO ()
$cpoke :: Ptr PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> IO ()
peek :: Ptr PipelineCacheHeaderVersion -> IO PipelineCacheHeaderVersion
$cpeek :: Ptr PipelineCacheHeaderVersion -> IO PipelineCacheHeaderVersion
pokeByteOff :: Ptr b -> Int -> PipelineCacheHeaderVersion -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PipelineCacheHeaderVersion -> IO ()
peekByteOff :: Ptr b -> Int -> IO PipelineCacheHeaderVersion
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PipelineCacheHeaderVersion
pokeElemOff :: Ptr PipelineCacheHeaderVersion
-> Int -> PipelineCacheHeaderVersion -> IO ()
$cpokeElemOff :: Ptr PipelineCacheHeaderVersion
-> Int -> PipelineCacheHeaderVersion -> IO ()
peekElemOff :: Ptr PipelineCacheHeaderVersion
-> Int -> IO PipelineCacheHeaderVersion
$cpeekElemOff :: Ptr PipelineCacheHeaderVersion
-> Int -> IO PipelineCacheHeaderVersion
alignment :: PipelineCacheHeaderVersion -> Int
$calignment :: PipelineCacheHeaderVersion -> Int
sizeOf :: PipelineCacheHeaderVersion -> Int
$csizeOf :: PipelineCacheHeaderVersion -> Int
Storable, PipelineCacheHeaderVersion
PipelineCacheHeaderVersion -> Zero PipelineCacheHeaderVersion
forall a. a -> Zero a
zero :: PipelineCacheHeaderVersion
$czero :: PipelineCacheHeaderVersion
Zero)
pattern = PipelineCacheHeaderVersion 1
{-# complete PIPELINE_CACHE_HEADER_VERSION_ONE :: PipelineCacheHeaderVersion #-}
instance Show PipelineCacheHeaderVersion where
showsPrec :: Int -> PipelineCacheHeaderVersion -> ShowS
showsPrec p :: Int
p = \case
PIPELINE_CACHE_HEADER_VERSION_ONE -> String -> ShowS
showString "PIPELINE_CACHE_HEADER_VERSION_ONE"
PipelineCacheHeaderVersion x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PipelineCacheHeaderVersion " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read PipelineCacheHeaderVersion where
readPrec :: ReadPrec PipelineCacheHeaderVersion
readPrec = ReadPrec PipelineCacheHeaderVersion
-> ReadPrec PipelineCacheHeaderVersion
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PipelineCacheHeaderVersion)]
-> ReadPrec PipelineCacheHeaderVersion
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("PIPELINE_CACHE_HEADER_VERSION_ONE", PipelineCacheHeaderVersion -> ReadPrec PipelineCacheHeaderVersion
forall (f :: * -> *) a. Applicative f => a -> f a
pure PipelineCacheHeaderVersion
PIPELINE_CACHE_HEADER_VERSION_ONE)]
ReadPrec PipelineCacheHeaderVersion
-> ReadPrec PipelineCacheHeaderVersion
-> ReadPrec PipelineCacheHeaderVersion
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec PipelineCacheHeaderVersion
-> ReadPrec PipelineCacheHeaderVersion
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PipelineCacheHeaderVersion")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
PipelineCacheHeaderVersion -> ReadPrec PipelineCacheHeaderVersion
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> PipelineCacheHeaderVersion
PipelineCacheHeaderVersion Int32
v)))