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