Skip to content

Commit f6b4f65

Browse files
emilypiptkato
authored andcommitted
remove shadowing and unused imports
1 parent f08a447 commit f6b4f65

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cabal-install/main/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import Distribution.Client.Setup
3838
, UploadFlags(..), uploadCommand
3939
, ReportFlags(..), reportCommand
4040
, runCommand
41-
, InitFlags(initVerbosity, initHcPath, interactive), initCommand
41+
, InitFlags(initVerbosity, initHcPath), initCommand
4242
, ActAsSetupFlags(..), actAsSetupCommand
4343
, UserConfigFlags(..), userConfigCommand
4444
, reportCommand

cabal-install/src/Distribution/Client/Init/Types.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,9 @@ instance Interactive PurePrompt where
361361
input <- pop
362362
return (ExitSuccess, input, "")
363363
getEnvironment = fmap (map read) popList
364-
listFilesInside pred !_ = do
364+
listFilesInside pred' !_ = do
365365
input <- map splitDirectories <$> popList
366-
map joinPath <$> filterM (fmap and . traverse pred) input
366+
map joinPath <$> filterM (fmap and . traverse pred') input
367367
listFilesRecursive !_ = popList
368368

369369
putStr !_ = return ()

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)