module Engine.Vulkan.Pipeline.Stages ( StageInfo(..) , withLabels ) where import RIO import Vulkan.Core10 qualified as Vk class (Applicative t, Traversable t) => StageInfo t where stageNames :: IsString label => t label stageFlagBits :: t Vk.ShaderStageFlagBits withLabels :: (StageInfo t, IsString label) => t a -> t (label, a) withLabels :: forall (t :: * -> *) label a. (StageInfo t, IsString label) => t a -> t (label, a) withLabels t a staged = (,) (label -> a -> (label, a)) -> t label -> t (a -> (label, a)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> t label forall label. IsString label => t label forall (t :: * -> *) label. (StageInfo t, IsString label) => t label stageNames t (a -> (label, a)) -> t a -> t (label, a) forall a b. t (a -> b) -> t a -> t b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> t a staged