@@ -66,17 +66,16 @@ main = do
6666 createCabal cabalPath name
6767 fs -> do
6868 putStrLn $ "The following files will be overwritten:"
69− foldMap putStrLn fs
69+ mapM_ putStrLn fs
7070 putStrLn $ "Use -f to overwrite them"
7171 exitFailure
7272
7373existingFiles :: FilePath -> [FilePath] -> IO [FilePath]
74−existingFiles dstDir = foldMap $ \file -> do
74+existingFiles dstDir files = fmap concat $ forM files $ \file -> do
7575 let dst = dstDir </> file
7676 exists <- doesFileExist dst
7777 return $ if exists then [dst] else []
7878
79−
8079-- | Figure out a good cabal package name from the given (existing) directory
8180-- name
8281makeName :: FilePath -> IO String