{-# OPTIONS_HADDOCK ignore-exports#-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE Strict #-}
module Graphics.Vulkan.Types.Enum.FrontFace
(VkFrontFace(VkFrontFace, VK_FRONT_FACE_COUNTER_CLOCKWISE,
VK_FRONT_FACE_CLOCKWISE))
where
import Foreign.Storable (Storable)
import GHC.Read (choose, expectP)
import Graphics.Vulkan.Marshal (Int32)
import Text.ParserCombinators.ReadPrec (prec, step, (+++))
import Text.Read (Read (..), parens)
import Text.Read.Lex (Lexeme (..))
newtype VkFrontFace = VkFrontFace Int32
deriving (Eq, Ord, Enum, Storable)
instance Show VkFrontFace where
showsPrec _ VK_FRONT_FACE_COUNTER_CLOCKWISE
= showString "VK_FRONT_FACE_COUNTER_CLOCKWISE"
showsPrec _ VK_FRONT_FACE_CLOCKWISE
= showString "VK_FRONT_FACE_CLOCKWISE"
showsPrec p (VkFrontFace x)
= showParen (p >= 11) (showString "VkFrontFace " . showsPrec 11 x)
instance Read VkFrontFace where
readPrec
= parens
(choose
[("VK_FRONT_FACE_COUNTER_CLOCKWISE",
pure VK_FRONT_FACE_COUNTER_CLOCKWISE),
("VK_FRONT_FACE_CLOCKWISE", pure VK_FRONT_FACE_CLOCKWISE)]
+++
prec 10
(expectP (Ident "VkFrontFace") >> (VkFrontFace <$> step readPrec)))
pattern VK_FRONT_FACE_COUNTER_CLOCKWISE :: VkFrontFace
pattern VK_FRONT_FACE_COUNTER_CLOCKWISE = VkFrontFace 0
pattern VK_FRONT_FACE_CLOCKWISE :: VkFrontFace
pattern VK_FRONT_FACE_CLOCKWISE = VkFrontFace 1