webgpu-dawn-0.1.1.0: Haskell bindings to WebGPU Dawn for GPU computing and graphics
Safe HaskellSafe-Inferred
LanguageHaskell2010

WGSL.CodeGen

Synopsis

Documentation

prettyExp :: Exp a -> String Source #

Pretty-print an expression

prettyStmt :: Int -> Stmt -> String Source #

Pretty-print a statement with indentation

prettyTypeRep :: TypeRep -> String Source #

Pretty-print a type

prettyFunction :: FunctionDecl -> String Source #

Pretty-print a function declaration

prettyModule :: ShaderModule -> String Source #

Pretty-print a shader module

generateWGSL :: ShaderModule -> String Source #

Generate WGSL code from a shader module

generateWGSLOptimized :: ShaderModule -> String Source #

Generate WGSL code with optimization (constant folding, etc.)