[commit: ghc] wip/nfs-locking: Fix GhcPrim path in getPackageSources. (c7f9f7c)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:21:44 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/c7f9f7c349b0498f9a42b4a2c2dbc02082d03645/ghc
>---------------------------------------------------------------
commit c7f9f7c349b0498f9a42b4a2c2dbc02082d03645
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Thu Sep 24 05:46:13 2015 +0100
Fix GhcPrim path in getPackageSources.
>---------------------------------------------------------------
c7f9f7c349b0498f9a42b4a2c2dbc02082d03645
src/Settings.hs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/Settings.hs b/src/Settings.hs
index 1a35a94..dab73ed 100644
--- a/src/Settings.hs
+++ b/src/Settings.hs
@@ -37,14 +37,17 @@ getPackageSources = do
srcDirs <- getPkgDataList SrcDirs
let buildPath = path -/- "build"
- dirs = (buildPath -/- "autogen") : map (packagePath -/-) srcDirs
+ autogen = buildPath -/- "autogen"
+ dirs = autogen : map (packagePath -/-) srcDirs
(foundSources, missingSources) <- findModuleFiles dirs "*hs"
- -- Generated source files live in buildPath and have extension "hs"
+ -- Generated source files live in buildPath and have extension "hs"...
let generatedSources = [ buildPath -/- s <.> "hs" | s <- missingSources ]
+ -- ...except that GHC/Prim.hs lives in autogen. TODO: fix?
+ fixGhcPrim = replaceEq (buildPath -/- "GHC/Prim.hs") (autogen -/- "GHC/Prim.hs")
- return $ foundSources ++ generatedSources
+ return $ foundSources ++ fixGhcPrim generatedSources
-- findModuleFiles scans a list of given directories and finds files matching a
-- given extension pattern (e.g., "*hs") that correspond to modules of the
More information about the ghc-commits
mailing list