on master help sign in
Get rid of AST.Literal.glTypeToVar
commit6a46ae32b98d9526c52af70391206b5af21d9a26 authorEvan Czaplicki <evancz@users.noreply.github.com> dateWed 1 Nov 2017, 00:39 (9 years ago) parente92c826
1 file changed+2−22
src/AST/Literal.hs+2−22
src/AST/Literal.hs+2−22
@@ -3,7 +3,8 @@
33module AST.Literal
44 ( Literal(..)
55 , toBuilder
6− , GLType(..), glTypeToVar, Shader(..)
6+ , Shader(..)
7+ , GLType(..)
78 )
89 where
910
@@ -16,10 +17,6 @@ import Data.Text.Lazy.Builder (Builder, fromText)
1617import Data.Text.Lazy.Builder.Int (decimal)
1718import Data.Text.Lazy.Builder.RealFloat (realFloat)
1819
19−import qualified AST.Module.Name as ModuleName
20−import qualified AST.Variable as Var
21−import qualified Elm.Package as Pkg
22−
2320
2421
2522-- LITERALS
@@ -66,23 +63,6 @@ data GLType
6663 deriving (Eq)
6764
6865
69−glTypeToVar :: GLType -> Var.Canonical
70−glTypeToVar glTipe =
71− case glTipe of
72− V2 -> inLinearAlgebra "Math.Vector2" "Vec2"
73− V3 -> inLinearAlgebra "Math.Vector3" "Vec3"
74− V4 -> inLinearAlgebra "Math.Vector4" "Vec4"
75− M4 -> inLinearAlgebra "Math.Matrix4" "Mat4"
76− Int -> Var.int
77− Float -> Var.float
78− Texture -> Var.fromModule (ModuleName.Canonical Pkg.webgl "WebGL") "Texture"
79−
80−
81−inLinearAlgebra :: ModuleName.Raw -> Text -> Var.Canonical
82−inLinearAlgebra moduleName tipe =
83− Var.fromModule (ModuleName.Canonical Pkg.linearAlgebra moduleName) tipe
84−
85−
8666
8767-- BINARY
8868