HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulevulkan-utils-0.5.11.0Haskell2010

Vulkan.Utils.Requirements.TH

  • 2 values
valuereq :: QuasiQuoter
#

Parse a requirement and produce an appropriate DeviceRequirement

DeviceVersionRequirements are specified by in the form major.minor[.patch]

DeviceFeatureRequirements are specified in the form name.<member name> and produce a RequireDeviceFeature which checks and sets this feature.

DevicePropertyRequirements are specified like feature requirements except with an additional description of the constraint. This may be any of

  • myFunctionName: To check with an in-scope function taking the property type and returning Bool

  • > 123: To indicate a minimum bound on a integral property

  • >= 123: To indicate an inclusive minimum bound on a integral property

  • & SOMETHING_BIT: To indicate that the specified bit must be present in the bitmask value

DeviceExtensionRequirements are specified in the form name version. name must start with VK_. The version will be compared against the specVersion field of the ExtensionProperties record.

  • Names may be qualified.

  • The separator between the type and member can be any of . :: : -> or any amount of space

Example2 expressions
let r = [req|PhysicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipeline|]featureName r"PhysicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipeline"
Example2 expressions
let r = [req|PhysicalDeviceVulkan11Features.multiview|]featureName r"PhysicalDeviceVulkan11Features.multiview"
Example2 expressions
let r = [reqs|  PhysicalDeviceTimelineSemaphoreFeatures.timelineSemaphore |]featureName <$> r["PhysicalDeviceTimelineSemaphoreFeatures.timelineSemaphore"]
Example1 expression
let r = [req|PhysicalDeviceMultiviewFeatures.doesn'tExist|]...    • Couldn't find member "doesn'tExist" in Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewFeatures...
Example1 expression
let r = [req|Doesn'tExist.multiview|]...    • Couldn't find type name "Doesn'tExist"...
Example1 expression
let r = [req|Either.multiview|]...    • Data.Either.Either doesn't seem to be the type of a record constructor...
valuereqs :: QuasiQuoter
#

Like reqs except that this parses a list of newline separated requirements

It ignores

  • Blank lines

  • Lines beginning with -- or #