From fcc4d2173b7c2965758131e3574d875d108d824a Mon Sep 17 00:00:00 2001 From: MartinSStewart Date: Mon, 25 Mar 2024 11:22:38 +0100 Subject: [PATCH] Add https://github.com/elm/compiler/pull/2120 --- compiler/src/AST/Utils/Shader.hs | 1 + compiler/src/Parse/Shader.hs | 1 + compiler/src/Type/Constrain/Expression.hs | 1 + 3 files changed, 3 insertions(+) diff --git a/compiler/src/AST/Utils/Shader.hs b/compiler/src/AST/Utils/Shader.hs index e219c12af..28e493bee 100644 --- a/compiler/src/AST/Utils/Shader.hs +++ b/compiler/src/AST/Utils/Shader.hs @@ -42,6 +42,7 @@ data Types = data Type = Int | Float + | Bool | V2 | V3 | V4 diff --git a/compiler/src/Parse/Shader.hs b/compiler/src/Parse/Shader.hs index 0311a721d..a40c4be46 100644 --- a/compiler/src/Parse/Shader.hs +++ b/compiler/src/Parse/Shader.hs @@ -174,6 +174,7 @@ extractInputs decl = GLS.Mat4 -> [(qual, Shader.M4, name)] GLS.Int -> [(qual, Shader.Int, name)] GLS.Float -> [(qual, Shader.Float, name)] + GLS.Bool -> [(qual, Shader.Bool, name)] GLS.Sampler2D -> [(qual, Shader.Texture, name)] _ -> [] _ -> [] diff --git a/compiler/src/Type/Constrain/Expression.hs b/compiler/src/Type/Constrain/Expression.hs index 8a588a79e..ad7c76e22 100644 --- a/compiler/src/Type/Constrain/Expression.hs +++ b/compiler/src/Type/Constrain/Expression.hs @@ -502,6 +502,7 @@ glToType glType = Shader.M4 -> Type.mat4 Shader.Int -> Type.int Shader.Float -> Type.float + Shader.Bool -> Type.bool Shader.Texture -> Type.texture