@@ -45,6 +45,8 @@ everywhereOnValues f g h = (f', g', h')
45 g' (UnaryMinus v) = g (UnaryMinus (g' v))
45 g' (UnaryMinus v) = g (UnaryMinus (g' v))
46 g' (BinaryNoParens op v1 v2) = g (BinaryNoParens op (g' v1) (g' v2))
46 g' (BinaryNoParens op v1 v2) = g (BinaryNoParens op (g' v1) (g' v2))
47 g' (Parens v) = g (Parens (g' v))
47 g' (Parens v) = g (Parens (g' v))
48+ g' (OperatorSection op (Left v)) = g (OperatorSection op (Left $ g' v))
49+ g' (OperatorSection op (Right v)) = g (OperatorSection op (Right $ g' v))
48 g' (ArrayLiteral vs) = g (ArrayLiteral (map g' vs))
50 g' (ArrayLiteral vs) = g (ArrayLiteral (map g' vs))
49 g' (ObjectLiteral vs) = g (ObjectLiteral (map (fmap g') vs))
51 g' (ObjectLiteral vs) = g (ObjectLiteral (map (fmap g') vs))
50 g' (ObjectConstructor vs) = g (ObjectConstructor (map (second (fmap g')) vs))
52 g' (ObjectConstructor vs) = g (ObjectConstructor (map (second (fmap g')) vs))
@@ -102,6 +104,8 @@ everywhereOnValuesTopDownM f g h = (f' <=< f, g' <=< g, h' <=< h)
102 g' (UnaryMinus v) = UnaryMinus <$> (g v >>= g')
104 g' (UnaryMinus v) = UnaryMinus <$> (g v >>= g')
103 g' (BinaryNoParens op v1 v2) = BinaryNoParens op <$> (g v1 >>= g') <*> (g v2 >>= g')
105 g' (BinaryNoParens op v1 v2) = BinaryNoParens op <$> (g v1 >>= g') <*> (g v2 >>= g')
104 g' (Parens v) = Parens <$> (g v >>= g')
106 g' (Parens v) = Parens <$> (g v >>= g')
107+ g' (OperatorSection op (Left v)) = OperatorSection op . Left <$> (g v >>= g')
108+ g' (OperatorSection op (Right v)) = OperatorSection op . Right <$> (g v >>= g')
105 g' (ArrayLiteral vs) = ArrayLiteral <$> mapM (g' <=< g) vs
109 g' (ArrayLiteral vs) = ArrayLiteral <$> mapM (g' <=< g) vs
106 g' (ObjectLiteral vs) = ObjectLiteral <$> mapM (sndM (g' <=< g)) vs
110 g' (ObjectLiteral vs) = ObjectLiteral <$> mapM (sndM (g' <=< g)) vs
107 g' (ObjectConstructor vs) = ObjectConstructor <$> mapM (sndM $ maybeM (g' <=< g)) vs
111 g' (ObjectConstructor vs) = ObjectConstructor <$> mapM (sndM $ maybeM (g' <=< g)) vs
@@ -153,6 +157,8 @@ everywhereOnValuesM f g h = (f', g', h')
153 g' (UnaryMinus v) = (UnaryMinus <$> g' v) >>= g
157 g' (UnaryMinus v) = (UnaryMinus <$> g' v) >>= g
154 g' (BinaryNoParens op v1 v2) = (BinaryNoParens op <$> g' v1 <*> g' v2) >>= g
158 g' (BinaryNoParens op v1 v2) = (BinaryNoParens op <$> g' v1 <*> g' v2) >>= g
155 g' (Parens v) = (Parens <$> g' v) >>= g
159 g' (Parens v) = (Parens <$> g' v) >>= g
160+ g' (OperatorSection op (Left v)) = (OperatorSection op . Left <$> g' v) >>= g
161+ g' (OperatorSection op (Right v)) = (OperatorSection op . Right <$> g' v) >>= g
156 g' (ArrayLiteral vs) = (ArrayLiteral <$> mapM g' vs) >>= g
162 g' (ArrayLiteral vs) = (ArrayLiteral <$> mapM g' vs) >>= g
157 g' (ObjectLiteral vs) = (ObjectLiteral <$> mapM (sndM g') vs) >>= g
163 g' (ObjectLiteral vs) = (ObjectLiteral <$> mapM (sndM g') vs) >>= g
158 g' (ObjectConstructor vs) = (ObjectConstructor <$> mapM (sndM $ maybeM g') vs) >>= g
164 g' (ObjectConstructor vs) = (ObjectConstructor <$> mapM (sndM $ maybeM g') vs) >>= g
@@ -207,6 +213,8 @@ everythingOnValues (<>) f g h i j = (f', g', h', i', j')
207 g' v@(UnaryMinus v1) = g v <> g' v1
213 g' v@(UnaryMinus v1) = g v <> g' v1
208 g' v@(BinaryNoParens _ v1 v2) = g v <> g' v1 <> g' v2
214 g' v@(BinaryNoParens _ v1 v2) = g v <> g' v1 <> g' v2
209 g' v@(Parens v1) = g v <> g' v1
215 g' v@(Parens v1) = g v <> g' v1
216+ g' v@(OperatorSection _ (Left v1)) = g v <> g' v1
217+ g' v@(OperatorSection _ (Right v1)) = g v <> g' v1
210 g' v@(ArrayLiteral vs) = foldl (<>) (g v) (map g' vs)
218 g' v@(ArrayLiteral vs) = foldl (<>) (g v) (map g' vs)
211 g' v@(ObjectLiteral vs) = foldl (<>) (g v) (map (g' . snd) vs)
219 g' v@(ObjectLiteral vs) = foldl (<>) (g v) (map (g' . snd) vs)
212 g' v@(ObjectConstructor vs) = foldl (<>) (g v) (map g' (mapMaybe snd vs))
220 g' v@(ObjectConstructor vs) = foldl (<>) (g v) (map g' (mapMaybe snd vs))
@@ -272,6 +280,8 @@ everythingWithContextOnValues s0 r0 (<>) f g h i j = (f'' s0, g'' s0, h'' s0, i'
272 g' s (UnaryMinus v1) = g'' s v1
280 g' s (UnaryMinus v1) = g'' s v1
273 g' s (BinaryNoParens _ v1 v2) = g'' s v1 <> g'' s v2
281 g' s (BinaryNoParens _ v1 v2) = g'' s v1 <> g'' s v2
274 g' s (Parens v1) = g'' s v1
282 g' s (Parens v1) = g'' s v1
283+ g' s (OperatorSection _ (Left v)) = g'' s v
284+ g' s (OperatorSection _ (Right v)) = g'' s v
275 g' s (ArrayLiteral vs) = foldl (<>) r0 (map (g'' s) vs)
285 g' s (ArrayLiteral vs) = foldl (<>) r0 (map (g'' s) vs)
276 g' s (ObjectLiteral vs) = foldl (<>) r0 (map (g'' s . snd) vs)
286 g' s (ObjectLiteral vs) = foldl (<>) r0 (map (g'' s . snd) vs)
277 g' s (ObjectConstructor vs) = foldl (<>) r0 (map (g'' s) (mapMaybe snd vs))
287 g' s (ObjectConstructor vs) = foldl (<>) r0 (map (g'' s) (mapMaybe snd vs))
@@ -340,6 +350,8 @@ everywhereWithContextOnValuesM s0 f g h i j = (f'' s0, g'' s0, h'' s0, i'' s0, j
340 g' s (UnaryMinus v) = UnaryMinus <$> g'' s v
350 g' s (UnaryMinus v) = UnaryMinus <$> g'' s v
341 g' s (BinaryNoParens op v1 v2) = BinaryNoParens op <$> g'' s v1 <*> g'' s v2
351 g' s (BinaryNoParens op v1 v2) = BinaryNoParens op <$> g'' s v1 <*> g'' s v2
342 g' s (Parens v) = Parens <$> g'' s v
352 g' s (Parens v) = Parens <$> g'' s v
353+ g' s (OperatorSection op (Left v)) = OperatorSection op . Left <$> g'' s v
354+ g' s (OperatorSection op (Right v)) = OperatorSection op . Right <$> g'' s v
343 g' s (ArrayLiteral vs) = ArrayLiteral <$> mapM (g'' s) vs
355 g' s (ArrayLiteral vs) = ArrayLiteral <$> mapM (g'' s) vs
344 g' s (ObjectLiteral vs) = ObjectLiteral <$> mapM (sndM (g'' s)) vs
356 g' s (ObjectLiteral vs) = ObjectLiteral <$> mapM (sndM (g'' s)) vs
345 g' s (ObjectConstructor vs) = ObjectConstructor <$> mapM (sndM $ maybeM (g'' s)) vs
357 g' s (ObjectConstructor vs) = ObjectConstructor <$> mapM (sndM $ maybeM (g'' s)) vs