summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Init.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Init.hs b/src/Init.hs
index 25a2096..aee3f0c 100644
--- a/src/Init.hs
+++ b/src/Init.hs
@@ -66,17 +66,16 @@ main = do
createCabal cabalPath name
fs -> do
putStrLn $ "The following files will be overwritten:"
- foldMap putStrLn fs
+ mapM_ putStrLn fs
putStrLn $ "Use -f to overwrite them"
exitFailure
existingFiles :: FilePath -> [FilePath] -> IO [FilePath]
-existingFiles dstDir = foldMap $ \file -> do
+existingFiles dstDir files = fmap concat $ forM files $ \file -> do
let dst = dstDir </> file
exists <- doesFileExist dst
return $ if exists then [dst] else []
-
-- | Figure out a good cabal package name from the given (existing) directory
-- name
makeName :: FilePath -> IO String