@@ -69,6 +69,8 @@ everywhereOnValues f g h = (f', g', h')
6969
7070 h' :: Binder -> Binder
7171 h' (ConstructorBinder ctor bs) = h (ConstructorBinder ctor (map h' bs))
72+ h' (BinaryNoParensBinder b1 b2 b3) = h (BinaryNoParensBinder (h' b1) (h' b2) (h' b3))
73+ h' (ParensInBinder b) = h (ParensInBinder (h' b))
7274 h' (ObjectBinder bs) = h (ObjectBinder (map (fmap h') bs))
7375 h' (ArrayBinder bs) = h (ArrayBinder (map h' bs))
7476 h' (NamedBinder name b) = h (NamedBinder name (h' b))
@@ -124,6 +126,8 @@ everywhereOnValuesTopDownM f g h = (f' <=< f, g' <=< g, h' <=< h)
124126 g' other = g other
125127
126128 h' (ConstructorBinder ctor bs) = ConstructorBinder ctor <$> traverse (h' <=< h) bs
129+ h' (BinaryNoParensBinder b1 b2 b3) = BinaryNoParensBinder <$> (h b1 >>= h') <*> (h b2 >>= h') <*> (h b3 >>= h')
130+ h' (ParensInBinder b) = ParensInBinder <$> (h b >>= h')
127131 h' (ObjectBinder bs) = ObjectBinder <$> traverse (sndM (h' <=< h)) bs
128132 h' (ArrayBinder bs) = ArrayBinder <$> traverse (h' <=< h) bs
129133 h' (NamedBinder name b) = NamedBinder name <$> (h b >>= h')
@@ -175,6 +179,8 @@ everywhereOnValuesM f g h = (f', g', h')
175179 g' other = g other
176180
177181 h' (ConstructorBinder ctor bs) = (ConstructorBinder ctor <$> traverse h' bs) >>= h
182+ h' (BinaryNoParensBinder b1 b2 b3) = (BinaryNoParensBinder <$> h' b1 <*> h' b2 <*> h' b3) >>= h
183+ h' (ParensInBinder b) = (ParensInBinder <$> h' b) >>= h
178184 h' (ObjectBinder bs) = (ObjectBinder <$> traverse (sndM h') bs) >>= h
179185 h' (ArrayBinder bs) = (ArrayBinder <$> traverse h' bs) >>= h
180186 h' (NamedBinder name b) = (NamedBinder name <$> h' b) >>= h
@@ -229,6 +235,8 @@ everythingOnValues (<>) f g h i j = (f', g', h', i', j')
229235 g' v = g v
230236
231237 h' b@ (ConstructorBinder _ bs) = foldl (<>) (h b) (map h' bs)
238+ h' b@ (BinaryNoParensBinder b1 b2 b3) = h b <> h' b1 <> h' b2 <> h' b3
239+ h' b@ (ParensInBinder b1) = h b <> h' b1
232240 h' b@ (ObjectBinder bs) = foldl (<>) (h b) (map (h' . snd ) bs)
233241 h' b@ (ArrayBinder bs) = foldl (<>) (h b) (map h' bs)
234242 h' b@ (NamedBinder _ b1) = h b <> h' b1
@@ -296,6 +304,8 @@ everythingWithContextOnValues s0 r0 (<>) f g h i j = (f'' s0, g'' s0, h'' s0, i'
296304 h'' s b = let (s', r) = h s b in r <> h' s' b
297305
298306 h' s (ConstructorBinder _ bs) = foldl (<>) r0 (map (h'' s) bs)
307+ h' s (BinaryNoParensBinder b1 b2 b3) = h'' s b1 <> h'' s b2 <> h'' s b3
308+ h' s (ParensInBinder b) = h'' s b
299309 h' s (ObjectBinder bs) = foldl (<>) r0 (map (h'' s . snd ) bs)
300310 h' s (ArrayBinder bs) = foldl (<>) r0 (map (h'' s) bs)
301311 h' s (NamedBinder _ b1) = h'' s b1
@@ -364,6 +374,8 @@ everywhereWithContextOnValuesM s0 f g h i j = (f'' s0, g'' s0, h'' s0, i'' s0, j
364374 h'' s = uncurry h' <=< h s
365375
366376 h' s (ConstructorBinder ctor bs) = ConstructorBinder ctor <$> traverse (h'' s) bs
377+ h' s (BinaryNoParensBinder b1 b2 b3) = BinaryNoParensBinder <$> h'' s b1 <*> h'' s b2 <*> h'' s b3
378+ h' s (ParensInBinder b) = ParensInBinder <$> h'' s b
367379 h' s (ObjectBinder bs) = ObjectBinder <$> traverse (sndM (h'' s)) bs
368380 h' s (ArrayBinder bs) = ArrayBinder <$> traverse (h'' s) bs
369381 h' s (NamedBinder name b) = NamedBinder name <$> h'' s b
@@ -451,11 +463,11 @@ everythingWithScope f g h i j = (f'', g'', h'', i'', \s -> snd . j'' s)
451463 h'' s a = h s a <> h' s a
452464
453465 h' s (ConstructorBinder _ bs) = foldMap (h'' s) bs
466+ h' s (BinaryNoParensBinder b1 b2 b3) = foldMap (h'' s) [b1, b2, b3]
467+ h' s (ParensInBinder b) = h'' s b
454468 h' s (ObjectBinder bs) = foldMap (h'' s . snd ) bs
455469 h' s (ArrayBinder bs) = foldMap (h'' s) bs
456- h' s (NamedBinder name b1) =
457- let s' = S. insert name s
458- in h'' s' b1
470+ h' s (NamedBinder name b1) = h'' (S. insert name s) b1
459471 h' s (PositionedBinder _ _ b1) = h'' s b1
460472 h' s (TypedBinder _ b1) = h'' s b1
461473 h' _ _ = mempty
0 commit comments