summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2018-03-26 12:49:31 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2018-03-26 07:59:14 -0400
commit611ec635c90f8b73dd6a0ebd871eece3c3e76b2c (patch)
treeecd5a5593a2d9bf853f4043221dc904593485ddb /src
parentd9004cabd5bda5ae566f503f4cddc187ecc2f514 (diff)
downloadhakyll-611ec635c90f8b73dd6a0ebd871eece3c3e76b2c.tar.gz
Get rid of foldMap for older GHC
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