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