@@ -11,13 +11,20 @@ import Types.Types
12builtins :: [(String,([X],Type))]
12builtins :: [(String,([X],Type))]
14− let touch = ("t0", [time]) : map (flip (,) [int]) ["x","y","x0","y0","id"]
14+ let touch = ("t0", time) : map (flip (,) int) ["x","y","x0","y0","id"]
15− state = [("text", [string]), ("start", [int]), ("end", [int])]
15+ state = [("text", string), ("start", int), ("end", int)]
16+ line = [("color", tipe "Color"), ("width", float),
17+ ("cap", tipe "LineCap"), ("join", tipe "LineJoin"),
18+ ("miterLimit", float), ("dashing", listOf int),
21+ RecordT (Map.fromList $ map (second (:[])) fields) EmptyRecord
16− in [ ("String", ([], listOf char))
22+ in [ ("String", ([], listOf char)),
17− , ("Time", ([], float))
23+ ("Time", ([], float)),
18− , ("KeyCode", ([], int))
24+ ("KeyCode", ([], int)),
19− , ("Touch", ([], RecordT (Map.fromList touch) EmptyRecord))
25+ ("Touch", ([], makeRecord touch)),
20− , ("TextState", ([], RecordT (Map.fromList state) EmptyRecord))
26+ ("TextState", ([], makeRecord state)),
27+ ("LineStyle", ([], makeRecord line))
23get :: [Statement] -> Map.Map String ([X],Type)
30get :: [Statement] -> Map.Map String ([X],Type)