@@ -2175,15 +2175,15 @@ instance MonoZip (Const m a) where
2175
2175
instance Functor m => MonoZip (ContT r m a ) where
2176
2176
{-# INLINE ozipWith #-}
2177
2177
2178
- ozipWith f x y = f <$> x <*> y
2178
+ ozipWith = liftA2
2179
2179
2180
2180
2181
2181
-- |
2182
2182
-- /Since @v0.1.0@/
2183
2183
instance MonoZip (Either a b ) where
2184
2184
{-# INLINE ozipWith #-}
2185
2185
2186
- ozipWith f x y = f <$> x <*> y
2186
+ ozipWith = liftA2
2187
2187
2188
2188
2189
2189
-- |
@@ -2211,7 +2211,7 @@ instance MonoZip (Identity a) where
2211
2211
instance Applicative m => MonoZip (IdentityT m a ) where
2212
2212
{-# INLINE ozipWith #-}
2213
2213
2214
- ozipWith f x y = f <$> x <*> y
2214
+ ozipWith = liftA2
2215
2215
2216
2216
2217
2217
-- |
@@ -2231,7 +2231,7 @@ instance MonoZip (IntMap a) where
2231
2231
instance MonoZip (IO a ) where
2232
2232
{-# INLINE ozipWith #-}
2233
2233
2234
- ozipWith f x y = f <$> x <*> y
2234
+ ozipWith = liftA2
2235
2235
2236
2236
2237
2237
-- |
@@ -2255,7 +2255,7 @@ instance Ord k => MonoZip (Map k v) where
2255
2255
instance MonoZip (Maybe a ) where
2256
2256
{-# INLINE ozipWith #-}
2257
2257
2258
- ozipWith f x y = f <$> x <*> y
2258
+ ozipWith = liftA2
2259
2259
2260
2260
2261
2261
-- |
@@ -2279,7 +2279,7 @@ instance MonoZip (NonEmpty a) where
2279
2279
instance MonoZip (Option a ) where
2280
2280
{-# INLINE ozipWith #-}
2281
2281
2282
- ozipWith f x y = f <$> x <*> y
2282
+ ozipWith = liftA2
2283
2283
2284
2284
2285
2285
-- |
@@ -2299,7 +2299,7 @@ instance ( Zip f
2299
2299
instance Applicative m => MonoZip (ReaderT r m a ) where
2300
2300
{-# INLINE ozipWith #-}
2301
2301
2302
- ozipWith f x y = f <$> x <*> y
2302
+ ozipWith = liftA2
2303
2303
2304
2304
2305
2305
-- |
@@ -2427,31 +2427,31 @@ instance MonoZip (ViewR a) where
2427
2427
instance Arrow a => MonoZip (WrappedArrow a b c ) where
2428
2428
{-# INLINE ozipWith #-}
2429
2429
2430
- ozipWith f x y = f <$> x <*> y
2430
+ ozipWith = liftA2
2431
2431
2432
2432
2433
2433
-- |
2434
2434
-- /Since @v0.1.0@/
2435
2435
instance Monad m => MonoZip (WrappedMonad m a ) where
2436
2436
{-# INLINE ozipWith #-}
2437
2437
2438
- ozipWith f x y = f <$> x <*> y
2438
+ ozipWith = liftA2
2439
2439
2440
2440
2441
2441
-- |
2442
2442
-- /Since @v0.1.0@/
2443
2443
instance (Applicative m , Monoid w ) => MonoZip (WriterT w m a ) where
2444
2444
{-# INLINE ozipWith #-}
2445
2445
2446
- ozipWith f x y = f <$> x <*> y
2446
+ ozipWith = liftA2
2447
2447
2448
2448
2449
2449
-- |
2450
2450
-- /Since @v0.1.0@/
2451
2451
instance (Applicative m , Monoid w ) => MonoZip (S. WriterT w m a ) where
2452
2452
{-# INLINE ozipWith #-}
2453
2453
2454
- ozipWith f x y = f <$> x <*> y
2454
+ ozipWith = liftA2
2455
2455
2456
2456
2457
2457
-- |
@@ -2537,15 +2537,15 @@ instance MonoZipWithKey (Const m a) where
2537
2537
instance Functor m => MonoZipWithKey (ContT r m a ) where
2538
2538
{-# INLINE ozipWithKey #-}
2539
2539
2540
- ozipWithKey f x y = (f () ) <$> x <*> y
2540
+ ozipWithKey f = liftA2 (f () )
2541
2541
2542
2542
2543
2543
-- |
2544
2544
-- /Since @v0.1.0@/
2545
2545
instance MonoZipWithKey (Either a b ) where
2546
2546
{-# INLINE ozipWithKey #-}
2547
2547
2548
- ozipWithKey f x y = (f () ) <$> x <*> y
2548
+ ozipWithKey f = liftA2 (f () )
2549
2549
2550
2550
2551
2551
-- |
@@ -2573,7 +2573,7 @@ instance MonoZipWithKey (Identity a) where
2573
2573
instance Applicative m => MonoZipWithKey (IdentityT m a ) where
2574
2574
{-# INLINE ozipWithKey #-}
2575
2575
2576
- ozipWithKey f x y = (f () ) <$> x <*> y
2576
+ ozipWithKey f = liftA2 (f () )
2577
2577
2578
2578
2579
2579
-- |
@@ -2593,7 +2593,7 @@ instance MonoZipWithKey (IntMap a) where
2593
2593
instance MonoZipWithKey (IO a ) where
2594
2594
{-# INLINE ozipWithKey #-}
2595
2595
2596
- ozipWithKey f x y = (f () ) <$> x <*> y
2596
+ ozipWithKey f = liftA2 (f () )
2597
2597
2598
2598
2599
2599
-- |
@@ -2617,15 +2617,15 @@ instance Ord k => MonoZipWithKey (Map k v) where
2617
2617
instance MonoZipWithKey (Maybe a ) where
2618
2618
{-# INLINE ozipWithKey #-}
2619
2619
2620
- ozipWithKey f x y = (f () ) <$> x <*> y
2620
+ ozipWithKey f = liftA2 (f () )
2621
2621
2622
2622
2623
2623
-- |
2624
2624
-- /Since @v0.1.0@/
2625
2625
instance Monad m => MonoZipWithKey (MaybeT m a ) where
2626
2626
{-# INLINE ozipWithKey #-}
2627
2627
2628
- ozipWithKey f x y = (f () ) <$> x <*> y
2628
+ ozipWithKey f = liftA2 (f () )
2629
2629
2630
2630
2631
2631
-- |
@@ -2641,7 +2641,7 @@ instance MonoZipWithKey (NonEmpty a) where
2641
2641
instance MonoZipWithKey (Option a ) where
2642
2642
{-# INLINE ozipWithKey #-}
2643
2643
2644
- ozipWithKey f x y = (f () ) <$> x <*> y
2644
+ ozipWithKey f = liftA2 (f () )
2645
2645
2646
2646
2647
2647
-- |
@@ -2789,31 +2789,31 @@ instance MonoZipWithKey (ViewR a) where
2789
2789
instance Arrow a => MonoZipWithKey (WrappedArrow a b c ) where
2790
2790
{-# INLINE ozipWithKey #-}
2791
2791
2792
- ozipWithKey f x y = f () <$> x <*> y
2792
+ ozipWithKey f = liftA2 $ f ()
2793
2793
2794
2794
2795
2795
-- |
2796
2796
-- /Since @v0.1.0@/
2797
2797
instance Monad m => MonoZipWithKey (WrappedMonad m a ) where
2798
2798
{-# INLINE ozipWithKey #-}
2799
2799
2800
- ozipWithKey f x y = f () <$> x <*> y
2800
+ ozipWithKey f = liftA2 $ f ()
2801
2801
2802
2802
2803
2803
-- |
2804
2804
-- /Since @v0.1.0@/
2805
2805
instance (Applicative m , Monoid w ) => MonoZipWithKey (WriterT w m a ) where
2806
2806
{-# INLINE ozipWithKey #-}
2807
2807
2808
- ozipWithKey f x y = f () <$> x <*> y
2808
+ ozipWithKey f = liftA2 $ f ()
2809
2809
2810
2810
2811
2811
-- |
2812
2812
-- /Since @v0.1.0@/
2813
2813
instance (Applicative m , Monoid w ) => MonoZipWithKey (S. WriterT w m a ) where
2814
2814
{-# INLINE ozipWithKey #-}
2815
2815
2816
- ozipWithKey f x y = f () <$> x <*> y
2816
+ ozipWithKey f = liftA2 $ f ()
2817
2817
2818
2818
2819
2819
-- |
0 commit comments