summaryrefslogtreecommitdiff
path: root/src/LambdaCube/Compiler/CoreToIR.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LambdaCube/Compiler/CoreToIR.hs')
-rw-r--r--src/LambdaCube/Compiler/CoreToIR.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/LambdaCube/Compiler/CoreToIR.hs b/src/LambdaCube/Compiler/CoreToIR.hs
index 4a96c141..2ad8d26d 100644
--- a/src/LambdaCube/Compiler/CoreToIR.hs
+++ b/src/LambdaCube/Compiler/CoreToIR.hs
@@ -48,7 +48,13 @@ import Paths_lambdacube_compiler (version)
48 48
49-------------------------------------------------------------------------- 49--------------------------------------------------------------------------
50 50
51compilePipeline :: IR.Backend -> I.ExpType -> IR.Pipeline 51-- | Compile a parsed (and typed) expression into the intermediate
52-- representation interpreted by the rendering engine.
53--
54-- Note: 'error' will be called if the given expression is not of type Output.
55compilePipeline :: IR.Backend
56 -> I.ExpType -- ^ Either a 'ScreenOut' or 'TextureOut' expression (typically main).
57 -> IR.Pipeline
52compilePipeline backend exp = IR.Pipeline 58compilePipeline backend exp = IR.Pipeline
53 { IR.info = "generated by lambdacube-compiler " ++ showVersion version 59 { IR.info = "generated by lambdacube-compiler " ++ showVersion version
54 , IR.backend = backend 60 , IR.backend = backend
@@ -812,7 +818,7 @@ data Uniform
812 818
813type Uniforms = Map String (Uniform, IR.InputType) 819type Uniforms = Map String (Uniform, IR.InputType)
814 820
815tellUniform :: (MonadWriter (a, b) m, Monoid b) => a -> m () 821tellUniform :: Uniforms -> WriterT (Uniforms, Map SName (ExpTV, ExpTV, [ExpTV])) (State [String]) ()
816tellUniform x = tell (x, mempty) 822tellUniform x = tell (x, mempty)
817 823
818simpleExpr :: ExpTV -> Bool 824simpleExpr :: ExpTV -> Bool