File tree 1 file changed +3
-3
lines changed
cabal-install/src/Distribution/Client
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -428,19 +428,19 @@ listContents dir = do
428
428
-- | From Control.Monad.Extra
429
429
-- https://hackage.haskell.org/package/extra-1.7.9
430
430
ifM :: Monad m => m Bool -> m a -> m a -> m a
431
- ifM b t f = do b <- b; if b then t else f
431
+ ifM b t f = do b' <- b; if b' then t else f
432
432
433
433
-- | From Control.Monad.Extra
434
434
-- https://hackage.haskell.org/package/extra-1.7.9
435
435
concatMapM :: Monad m => (a -> m [b ]) -> [a ] -> m [b ]
436
436
{-# INLINE concatMapM #-}
437
437
concatMapM op = foldr f (pure [] )
438
- where f x xs = do x <- op x; if null x then xs else do xs <- xs; pure $ x++ xs
438
+ where f x xs = do x' <- op x; if null x' then xs else do xs' <- xs; pure $ x' ++ xs'
439
439
440
440
-- | From Control.Monad.Extra
441
441
-- https://hackage.haskell.org/package/extra-1.7.9
442
442
partitionM :: Monad m => (a -> m Bool ) -> [a ] -> m ([a ], [a ])
443
- partitionM f [] = pure ([] , [] )
443
+ partitionM _ [] = pure ([] , [] )
444
444
partitionM f (x: xs) = do
445
445
res <- f x
446
446
(as,bs) <- partitionM f xs
You can’t perform that action at this time.
0 commit comments