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