Commit 18a779b2 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Fix performance drop due to improper use of removeFiles.

parent 486a3e58
...@@ -11,6 +11,7 @@ import Settings.Util ...@@ -11,6 +11,7 @@ import Settings.Util
import Settings.TargetDirectory import Settings.TargetDirectory
import Rules.Actions import Rules.Actions
import Rules.Resources import Rules.Resources
import qualified System.Directory as IO
buildPackageDependencies :: Resources -> StagePackageTarget -> Rules () buildPackageDependencies :: Resources -> StagePackageTarget -> Rules ()
buildPackageDependencies _ target = buildPackageDependencies _ target =
...@@ -30,7 +31,7 @@ buildPackageDependencies _ target = ...@@ -30,7 +31,7 @@ buildPackageDependencies _ target =
srcs <- interpret target getPackageSources srcs <- interpret target getPackageSources
need srcs need srcs
build $ fullTarget target (GhcM stage) srcs [file] build $ fullTarget target (GhcM stage) srcs [file]
liftIO $ removeFiles "." [hDepFile <.> "bak"] liftIO . IO.removeFile $ file <.> "bak"
(buildPath -/- ".dependencies") %> \file -> do (buildPath -/- ".dependencies") %> \file -> do
cSrcs <- pkgDataList $ CSrcs path cSrcs <- pkgDataList $ CSrcs path
......
...@@ -25,7 +25,7 @@ buildPackageLibrary _ target = do ...@@ -25,7 +25,7 @@ buildPackageLibrary _ target = do
-- TODO: handle dynamic libraries -- TODO: handle dynamic libraries
matchBuildResult buildPath "a" ?> \a -> do matchBuildResult buildPath "a" ?> \a -> do
liftIO $ removeFiles "." [a] liftIO $ IO.removeFile a
cSrcs <- interpret target $ getPkgDataList CSrcs cSrcs <- interpret target $ getPkgDataList CSrcs
modules <- interpret target $ getPkgDataList Modules modules <- interpret target $ getPkgDataList Modules
......
Markdown is supported
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