Skip to content

Commit 6c217c7

Browse files
committed
Merge branch 'cabal-init-rewrite' of https://github.com/ptkato/cabal into cabal-init-rewrite
2 parents 430c437 + fed439c commit 6c217c7

File tree

1 file changed

+3
-3
lines changed
  • cabal-install/src/Distribution/Client

1 file changed

+3
-3
lines changed

cabal-install/src/Distribution/Client/Utils.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,19 +428,19 @@ listContents dir = do
428428
-- | From Control.Monad.Extra
429429
-- https://hackage.haskell.org/package/extra-1.7.9
430430
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
432432

433433
-- | From Control.Monad.Extra
434434
-- https://hackage.haskell.org/package/extra-1.7.9
435435
concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
436436
{-# INLINE concatMapM #-}
437437
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'
439439

440440
-- | From Control.Monad.Extra
441441
-- https://hackage.haskell.org/package/extra-1.7.9
442442
partitionM :: Monad m => (a -> m Bool) -> [a] -> m ([a], [a])
443-
partitionM f [] = pure ([], [])
443+
partitionM _ [] = pure ([], [])
444444
partitionM f (x:xs) = do
445445
res <- f x
446446
(as,bs) <- partitionM f xs

0 commit comments

Comments
 (0)