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