@@ -38,7 +38,11 @@ data UnaryOperator
3838 -- |
3939 -- Numeric unary \'plus\'
4040 --
41− | Positive deriving (Show, Eq, Data, Typeable)
41+ | Positive
42+ -- |
43+ -- Constructor
44+ --
45+ | JSNew deriving (Show, Eq, Data, Typeable)
4246
4347-- |
4448-- Built-in binary operators
@@ -170,10 +174,6 @@ data JS
170174 --
171175 | JSApp JS [JS]
172176 -- |
173− -- Constructor
174− --
175− | JSNew JS
176− -- |
177177 -- Variable
178178 --
179179 | JSVar String
@@ -270,7 +270,6 @@ everywhereOnJS f = go
270270 go (JSThrow js) = f (JSThrow (go js))
271271 go (JSTypeOf js) = f (JSTypeOf (go js))
272272 go (JSLabel name js) = f (JSLabel name (go js))
273− go (JSNew j) = f (JSNew (go j))
274273 go (JSInstanceOf j1 j2) = f (JSInstanceOf (go j1) (go j2))
275274 go other = f other
276275
@@ -298,7 +297,6 @@ everywhereOnJSTopDown f = go . f
298297 go (JSThrow j) = JSThrow (go (f j))
299298 go (JSTypeOf j) = JSTypeOf (go (f j))
300299 go (JSLabel name j) = JSLabel name (go (f j))
301− go (JSNew j) = JSNew (go (f j))
302300 go (JSInstanceOf j1 j2) = JSInstanceOf (go (f j1)) (go (f j2))
303301 go other = f other
304302
@@ -326,6 +324,5 @@ everythingOnJS (<>) f = go
326324 go j@(JSThrow j1) = f j <> go j1
327325 go j@(JSTypeOf j1) = f j <> go j1
328326 go j@(JSLabel _ j1) = f j <> go j1
329− go j@(JSNew j1) = f j <> go j1
330327 go j@(JSInstanceOf j1 j2) = f j <> go j1 <> go j2
331328 go other = f other