@@ -77,6 +77,7 @@ data JS = JSRaw String
77 | JSFFI String [JS]
77 | JSFFI String [JS]
78 | JSAnnotation JSAnnotation JS
78 | JSAnnotation JSAnnotation JS
79 | JSDelete JS
79 | JSDelete JS
81 deriving Eq
82 deriving Eq
@@ -133,6 +134,9 @@ compileJS' indent (JSAnnotation annotation js) =
133compileJS' indent (JSDelete js) =
134compileJS' indent (JSDelete js) =
134 "delete " `T.append` compileJS' 0 js
135 "delete " `T.append` compileJS' 0 js
137+compileJS' indent (JSClear js) =
138+ compileJS' 0 js `T.append` " = undefined"
136compileJS' indent (JSFFI raw args) =
140compileJS' indent (JSFFI raw args) =
137 ffi raw (map (T.unpack . compileJS' indent) args)
141 ffi raw (map (T.unpack . compileJS' indent) args)
@@ -398,4 +402,3 @@ jsPackSBits16 js = JSNew "Int16Array" [JSArray [js]]
399jsPackSBits32 :: JS -> JS
403jsPackSBits32 :: JS -> JS
400jsPackSBits32 js = JSNew "Int32Array" [JSArray [js]]
404jsPackSBits32 js = JSNew "Int32Array" [JSArray [js]]