@@ -83,19 +83,31 @@ check x jsType continue =
85 case jsType of
85 case jsType of
86− JSNumber -> [typeof "number"]
87+ [typeof "number"]
88− [jsFold OpLAnd (typeof "number" : intChecks)]
90+ [jsFold OpLAnd intChecks]
89− JSBoolean -> [typeof "boolean"]
93+ [typeof "boolean"]
90− JSString -> [typeof "string", instanceof "String"]
96+ [typeof "string", instanceof "String"]
91− JSArray -> [instanceof "Array"]
99+ [instanceof "Array"]
92 JSObject fields ->
101 JSObject fields ->
93− [jsFold OpLAnd (typeof "object" : map member fields)]
102+ [jsFold OpLAnd (typeof "object" : map member fields)]
95− intChecks =
105+intChecks :: [Expression () -> Expression ()]
96− [ \x -> ref "isFinite" <| x
108+ , \x -> ref "isFinite" <| x
97− , \x -> equal (obj ["Math","floor"] <| x) x
109+ , \x -> equal (obj ["Math","floor"] <| x) x
101-- INBOUND
113-- INBOUND