{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.AttachmentStoreOp (AttachmentStoreOp( ATTACHMENT_STORE_OP_STORE
, ATTACHMENT_STORE_OP_DONT_CARE
, ..
)) 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 Graphics.Vulkan.Zero (Zero)
newtype AttachmentStoreOp = AttachmentStoreOp Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern ATTACHMENT_STORE_OP_STORE = AttachmentStoreOp 0
pattern ATTACHMENT_STORE_OP_DONT_CARE = AttachmentStoreOp 1
{-# complete ATTACHMENT_STORE_OP_STORE,
ATTACHMENT_STORE_OP_DONT_CARE :: AttachmentStoreOp #-}
instance Show AttachmentStoreOp where
showsPrec p = \case
ATTACHMENT_STORE_OP_STORE -> showString "ATTACHMENT_STORE_OP_STORE"
ATTACHMENT_STORE_OP_DONT_CARE -> showString "ATTACHMENT_STORE_OP_DONT_CARE"
AttachmentStoreOp x -> showParen (p >= 11) (showString "AttachmentStoreOp " . showsPrec 11 x)
instance Read AttachmentStoreOp where
readPrec = parens (choose [("ATTACHMENT_STORE_OP_STORE", pure ATTACHMENT_STORE_OP_STORE)
, ("ATTACHMENT_STORE_OP_DONT_CARE", pure ATTACHMENT_STORE_OP_DONT_CARE)]
+++
prec 10 (do
expectP (Ident "AttachmentStoreOp")
v <- step readPrec
pure (AttachmentStoreOp v)))