@@ -16,14 +16,14 @@ textToText = [ "header", "italic", "bold", "underline"
17textAttrs = [ "toText" -: string ==> text
17textAttrs = [ "toText" -: string ==> text
18 , "link" -: string ==> text ==> text
18 , "link" -: string ==> text ==> text
19− , "Text.height" -: int ==> text ==> text
19+ , numScheme (\t -> t ==> text ==> text) "Text.height"
20 ] ++ hasType (text ==> text) textToText
20 ] ++ hasType (text ==> text) textToText
22elements = let iee = int ==> element ==> element in
22elements = let iee = int ==> element ==> element in
23 [ "flow" -: direction ==> listOf element ==> element
23 [ "flow" -: direction ==> listOf element ==> element
24 , "layers" -: listOf element ==> element
24 , "layers" -: listOf element ==> element
25 , "text" -: text ==> element
25 , "text" -: text ==> element
26− , "opacity" -: iee
26+ , "opacity" -: float ==> element ==> element
27 , "width" -: iee
27 , "width" -: iee
28 , "height" -: iee
28 , "height" -: iee
29 , "size" -: int ==> iee
29 , "size" -: int ==> iee
@@ -34,19 +34,22 @@ elements = let iee = int ==> element ==> element in
36directions = hasType direction ["up","down","left","right","inward","outward"]
36directions = hasType direction ["up","down","left","right","inward","outward"]
37−colors = [ "rgb" -: int ==> int ==> int ==> color
37+colors = [ numScheme (\n -> n ==> n ==> n ==> color) "rgb"
38− , "rgba" -: int ==> int ==> int ==> int ==> color
38+ , numScheme (\n -> n ==> n ==> n ==> n ==> color) "rgba"
39− ] ++ hasType color ["red","green","blue","black","white"]
39+ ] ++ hasType color ["red","green","blue","black","white"
40+ ,"yellow","cyan","magenta","grey","gray"]
41−lineTypes = [ "line" -: listOf point ==> line
42+lineTypes = [ numScheme (\n -> listOf (pairOf n) ==> line) "line"
42 , "customLine" -: listOf int ==> color ==> line ==> form
43 , "customLine" -: listOf int ==> color ==> line ==> form
43 ] ++ hasType (color ==> line ==> form) ["solid","dashed","dotted"]
44 ] ++ hasType (color ==> line ==> form) ["solid","dashed","dotted"]
45−shapes = [ "polygon" -: listOf point ==> point ==> shape
46+shapes = [ numScheme (\n -> listOf (pairOf n) ==> pairOf n ==> shape) "polygon"
46 , "filled" -: color ==> shape ==> form
47 , "filled" -: color ==> shape ==> form
47 , "outlined" -: color ==> shape ==> form
48 , "outlined" -: color ==> shape ==> form
48 , "customOutline" -: listOf int ==> color ==> shape ==> form
49 , "customOutline" -: listOf int ==> color ==> shape ==> form
49− ] ++ hasType (int ==> int ==> point ==> shape) ["ngon","rect","oval"]
50+ ] ++ map (numScheme (\n -> n ==> n ==> pairOf n ==> shape) [ "ngon"
52-------- Foreign --------
55-------- Foreign --------
@@ -132,14 +135,14 @@ math =
132 map (numScheme (\t -> t ==> binop t)) ["clamp"] ++
135 map (numScheme (\t -> t ==> binop t)) ["clamp"] ++
133 map (numScheme (\t -> binop t)) ["+","-","*","max","min"] ++
136 map (numScheme (\t -> binop t)) ["+","-","*","max","min"] ++
134 [ numScheme (\t -> t ==> t) "abs" ] ++
137 [ numScheme (\t -> t ==> t) "abs" ] ++
135− [ "/" -: binop float ] ++
138+ hasType (binop float) [ "/", "logBase" ] ++
136− hasType (binop int) ["rem","div","mod","logBase"] ++
139+ hasType (binop int) ["rem","div","mod"] ++
137− hasType (float ==> float) ["sin","cos","tan","asin","acos","atan","sqrt"]
140+ hasType (float ==> float) ["sin","cos","tan","asin","acos","atan","sqrt"] ++
140 [ "not" -: bool ==> bool ] ++
143 [ "not" -: bool ==> bool ] ++
141 hasType (binop bool) ["&&","||"] ++
144 hasType (binop bool) ["&&","||"] ++
142− hasType (int ==> int ==> bool) ["<",">","<=",">="]
145+ map (numScheme (\n -> n ==> n ==> bool)) ["<",">","<=",">="]
145-------- Polymorphic Functions --------
148-------- Polymorphic Functions --------
@@ -171,7 +174,7 @@ funcs =
172 [ "and" -:: listOf bool ==> bool
175 [ "and" -:: listOf bool ==> bool
173 , "or" -:: listOf bool ==> bool
176 , "or" -:: listOf bool ==> bool
174− , "sort" -:: listOf int ==> listOf int
177+ , numScheme (\n -> listOf n ==> listOf n) "sort"
175 , "head" -:: listOf a ==> a
178 , "head" -:: listOf a ==> a
176 , "tail" -:: listOf a ==> listOf a
179 , "tail" -:: listOf a ==> listOf a
177 , "length" -:: listOf a ==> int
180 , "length" -:: listOf a ==> int
@@ -195,7 +198,8 @@ lists =
195 , "scanl" -:: (a ==> b ==> b) ==> b ==> listOf a ==> listOf b
198 , "scanl" -:: (a ==> b ==> b) ==> b ==> listOf a ==> listOf b
196 , "concatMap" -:: (a ==> listOf b) ==> listOf a ==> listOf b
199 , "concatMap" -:: (a ==> listOf b) ==> listOf a ==> listOf b
197 , "zipWith" -:: (a ==> b ==> c) ==> listOf a ==> listOf b ==> listOf c
200 , "zipWith" -:: (a ==> b ==> c) ==> listOf a ==> listOf b ==> listOf c
198− ] ++ map (-: (listOf int ==> int)) [ "sum","product","maximum","minimum" ]
201+ ] ++ map (numScheme (\n -> listOf n ==> n)) [ "sum", "product"
202+ , "maximum", "minimum" ]
201-------- Everything --------
205-------- Everything --------