{-# language CPP #-}
module Vulkan.Core10.Enums.InternalAllocationType  (InternalAllocationType( INTERNAL_ALLOCATION_TYPE_EXECUTABLE
                                                                          , ..
                                                                          )) 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)
-- | VkInternalAllocationType - Allocation type
--
-- = See Also
--
-- 'Vulkan.Core10.FuncPointers.PFN_vkInternalAllocationNotification',
-- 'Vulkan.Core10.FuncPointers.PFN_vkInternalFreeNotification'
newtype InternalAllocationType = InternalAllocationType Int32
  deriving newtype (InternalAllocationType -> InternalAllocationType -> Bool
(InternalAllocationType -> InternalAllocationType -> Bool)
-> (InternalAllocationType -> InternalAllocationType -> Bool)
-> Eq InternalAllocationType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InternalAllocationType -> InternalAllocationType -> Bool
$c/= :: InternalAllocationType -> InternalAllocationType -> Bool
== :: InternalAllocationType -> InternalAllocationType -> Bool
$c== :: InternalAllocationType -> InternalAllocationType -> Bool
Eq, Eq InternalAllocationType
Eq InternalAllocationType =>
(InternalAllocationType -> InternalAllocationType -> Ordering)
-> (InternalAllocationType -> InternalAllocationType -> Bool)
-> (InternalAllocationType -> InternalAllocationType -> Bool)
-> (InternalAllocationType -> InternalAllocationType -> Bool)
-> (InternalAllocationType -> InternalAllocationType -> Bool)
-> (InternalAllocationType
    -> InternalAllocationType -> InternalAllocationType)
-> (InternalAllocationType
    -> InternalAllocationType -> InternalAllocationType)
-> Ord InternalAllocationType
InternalAllocationType -> InternalAllocationType -> Bool
InternalAllocationType -> InternalAllocationType -> Ordering
InternalAllocationType
-> InternalAllocationType -> InternalAllocationType
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 :: InternalAllocationType
-> InternalAllocationType -> InternalAllocationType
$cmin :: InternalAllocationType
-> InternalAllocationType -> InternalAllocationType
max :: InternalAllocationType
-> InternalAllocationType -> InternalAllocationType
$cmax :: InternalAllocationType
-> InternalAllocationType -> InternalAllocationType
>= :: InternalAllocationType -> InternalAllocationType -> Bool
$c>= :: InternalAllocationType -> InternalAllocationType -> Bool
> :: InternalAllocationType -> InternalAllocationType -> Bool
$c> :: InternalAllocationType -> InternalAllocationType -> Bool
<= :: InternalAllocationType -> InternalAllocationType -> Bool
$c<= :: InternalAllocationType -> InternalAllocationType -> Bool
< :: InternalAllocationType -> InternalAllocationType -> Bool
$c< :: InternalAllocationType -> InternalAllocationType -> Bool
compare :: InternalAllocationType -> InternalAllocationType -> Ordering
$ccompare :: InternalAllocationType -> InternalAllocationType -> Ordering
$cp1Ord :: Eq InternalAllocationType
Ord, Ptr b -> Int -> IO InternalAllocationType
Ptr b -> Int -> InternalAllocationType -> IO ()
Ptr InternalAllocationType -> IO InternalAllocationType
Ptr InternalAllocationType -> Int -> IO InternalAllocationType
Ptr InternalAllocationType
-> Int -> InternalAllocationType -> IO ()
Ptr InternalAllocationType -> InternalAllocationType -> IO ()
InternalAllocationType -> Int
(InternalAllocationType -> Int)
-> (InternalAllocationType -> Int)
-> (Ptr InternalAllocationType -> Int -> IO InternalAllocationType)
-> (Ptr InternalAllocationType
    -> Int -> InternalAllocationType -> IO ())
-> (forall b. Ptr b -> Int -> IO InternalAllocationType)
-> (forall b. Ptr b -> Int -> InternalAllocationType -> IO ())
-> (Ptr InternalAllocationType -> IO InternalAllocationType)
-> (Ptr InternalAllocationType -> InternalAllocationType -> IO ())
-> Storable InternalAllocationType
forall b. Ptr b -> Int -> IO InternalAllocationType
forall b. Ptr b -> Int -> InternalAllocationType -> 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 InternalAllocationType -> InternalAllocationType -> IO ()
$cpoke :: Ptr InternalAllocationType -> InternalAllocationType -> IO ()
peek :: Ptr InternalAllocationType -> IO InternalAllocationType
$cpeek :: Ptr InternalAllocationType -> IO InternalAllocationType
pokeByteOff :: Ptr b -> Int -> InternalAllocationType -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> InternalAllocationType -> IO ()
peekByteOff :: Ptr b -> Int -> IO InternalAllocationType
$cpeekByteOff :: forall b. Ptr b -> Int -> IO InternalAllocationType
pokeElemOff :: Ptr InternalAllocationType
-> Int -> InternalAllocationType -> IO ()
$cpokeElemOff :: Ptr InternalAllocationType
-> Int -> InternalAllocationType -> IO ()
peekElemOff :: Ptr InternalAllocationType -> Int -> IO InternalAllocationType
$cpeekElemOff :: Ptr InternalAllocationType -> Int -> IO InternalAllocationType
alignment :: InternalAllocationType -> Int
$calignment :: InternalAllocationType -> Int
sizeOf :: InternalAllocationType -> Int
$csizeOf :: InternalAllocationType -> Int
Storable, InternalAllocationType
InternalAllocationType -> Zero InternalAllocationType
forall a. a -> Zero a
zero :: InternalAllocationType
$czero :: InternalAllocationType
Zero)

-- | 'INTERNAL_ALLOCATION_TYPE_EXECUTABLE' specifies that the allocation is
-- intended for execution by the host.
pattern $bINTERNAL_ALLOCATION_TYPE_EXECUTABLE :: InternalAllocationType
$mINTERNAL_ALLOCATION_TYPE_EXECUTABLE :: forall r.
InternalAllocationType -> (Void# -> r) -> (Void# -> r) -> r
INTERNAL_ALLOCATION_TYPE_EXECUTABLE = InternalAllocationType 0
{-# complete INTERNAL_ALLOCATION_TYPE_EXECUTABLE :: InternalAllocationType #-}

instance Show InternalAllocationType where
  showsPrec :: Int -> InternalAllocationType -> ShowS
showsPrec p :: Int
p = \case
    INTERNAL_ALLOCATION_TYPE_EXECUTABLE -> String -> ShowS
showString "INTERNAL_ALLOCATION_TYPE_EXECUTABLE"
    InternalAllocationType x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "InternalAllocationType " 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 InternalAllocationType where
  readPrec :: ReadPrec InternalAllocationType
readPrec = ReadPrec InternalAllocationType -> ReadPrec InternalAllocationType
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec InternalAllocationType)]
-> ReadPrec InternalAllocationType
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("INTERNAL_ALLOCATION_TYPE_EXECUTABLE", InternalAllocationType -> ReadPrec InternalAllocationType
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalAllocationType
INTERNAL_ALLOCATION_TYPE_EXECUTABLE)]
                     ReadPrec InternalAllocationType
-> ReadPrec InternalAllocationType
-> ReadPrec InternalAllocationType
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec InternalAllocationType
-> ReadPrec InternalAllocationType
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "InternalAllocationType")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       InternalAllocationType -> ReadPrec InternalAllocationType
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> InternalAllocationType
InternalAllocationType Int32
v)))