diff options
Diffstat (limited to 'src/LambdaCube/Compiler/CoreToIR.hs')
-rw-r--r-- | src/LambdaCube/Compiler/CoreToIR.hs | 10 |
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 | ||
51 | compilePipeline :: 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. | ||
55 | compilePipeline :: IR.Backend | ||
56 | -> I.ExpType -- ^ Either a 'ScreenOut' or 'TextureOut' expression (typically main). | ||
57 | -> IR.Pipeline | ||
52 | compilePipeline backend exp = IR.Pipeline | 58 | compilePipeline 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 | ||
813 | type Uniforms = Map String (Uniform, IR.InputType) | 819 | type Uniforms = Map String (Uniform, IR.InputType) |
814 | 820 | ||
815 | tellUniform :: (MonadWriter (a, b) m, Monoid b) => a -> m () | 821 | tellUniform :: Uniforms -> WriterT (Uniforms, Map SName (ExpTV, ExpTV, [ExpTV])) (State [String]) () |
816 | tellUniform x = tell (x, mempty) | 822 | tellUniform x = tell (x, mempty) |
817 | 823 | ||
818 | simpleExpr :: ExpTV -> Bool | 824 | simpleExpr :: ExpTV -> Bool |