Commit 73ad9935 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Use simpler mapM instead of traverse

parent 026466ad
......@@ -45,7 +45,7 @@ topLevelTargets = do
if isLibrary pkg
then do -- build a library
ways <- interpretInContext context getLibraryWays
libs <- traverse (pkgLibraryFile . Context stage pkg) ways
libs <- mapM (pkgLibraryFile . Context stage pkg) ways
docs <- interpretInContext context buildHaddock
need $ libs ++ [ pkgHaddockFile context | docs && stage == Stage1 ]
else do -- otherwise build a program
......
......@@ -36,7 +36,7 @@ buildPackageDependencies rs context@Context {..} =
cSrcs <- pkgDataList $ CSrcs path
let cDepFiles = map (src2dep context) cSrcs
need $ hDepFile : cDepFiles -- need all for more parallelism
cDeps <- fmap concat $ traverse readFile' cDepFiles
cDeps <- concatMapM readFile' cDepFiles
hDeps <- readFile' hDepFile
let result = unlines
. map (\(src, deps) -> unwords $ src : deps)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment