1{-# OPTIONS_GHC -Wall #-}
2module SourceSyntax.Literal where
5import SourceSyntax.PrettyPrint
6import qualified Text.PrettyPrint as PP
8data Literal = IntNum Int
13 deriving (Eq, Ord, Show)
15instance Pretty Literal where
19 FloatNum n -> PP.double n
20 Chr c -> PP.text . show $ c
21 Str s -> PP.text . show $ s
22 Boolean bool -> PP.text (show bool)
24data GLTipe = Int | Float | V2 | V3 | V4 | M4 | Texture
27glTipeName :: GLTipe -> String
32 V2 -> "Math.Vector2.Vec2"
33 V3 -> "Math.Vector3.Vec3"
34 V4 -> "Math.Vector4.Vec4"
35 M4 -> "Math.Matrix4.Mat4"
36 Texture -> "Graphics.WebGL.Texture"
38data GLShaderTipe = GLShaderTipe
39 { attribute :: Map String GLTipe
40 , uniform :: Map String GLTipe
41 , varying :: Map String GLTipe
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list