[commit: ghc] wip/nfs-locking: Move GHC/Prim.hs outside of autogen directory (eca7b6a)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:27:57 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/eca7b6a6d9a17e44854cb8f696cec03140052208/ghc
>---------------------------------------------------------------
commit eca7b6a6d9a17e44854cb8f696cec03140052208
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Tue Nov 1 19:27:32 2016 +0000
Move GHC/Prim.hs outside of autogen directory
>---------------------------------------------------------------
eca7b6a6d9a17e44854cb8f696cec03140052208
src/Oracles/ModuleFiles.hs | 6 +-----
src/Rules/Generate.hs | 4 ++--
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/Oracles/ModuleFiles.hs b/src/Oracles/ModuleFiles.hs
index a9bae04..70a7a9f 100644
--- a/src/Oracles/ModuleFiles.hs
+++ b/src/Oracles/ModuleFiles.hs
@@ -75,11 +75,7 @@ findGenerator Context {..} file = do
-- | Find all Haskell source files for a given 'Context'.
hsSources :: Context -> Action [FilePath]
hsSources context = do
- let autogen = buildPath context -/- "autogen"
- -- Generated source files live in buildPath and have extension "hs", except
- -- for GHC/Prim.hs that lives in autogen. TODO: fix the inconsistency?
- modFile ("GHC.Prim", _) = autogen -/- "GHC/Prim.hs"
- modFile (m, Nothing ) = generatedFile context m
+ let modFile (m, Nothing ) = generatedFile context m
modFile (m, Just file )
| takeExtension file `elem` haskellExtensions = file
| otherwise = generatedFile context m
diff --git a/src/Rules/Generate.hs b/src/Rules/Generate.hs
index d13d2bb..e84313a 100644
--- a/src/Rules/Generate.hs
+++ b/src/Rules/Generate.hs
@@ -55,7 +55,7 @@ ghcPrimDependencies :: Expr [FilePath]
ghcPrimDependencies = do
stage <- getStage
let path = buildPath $ vanillaContext stage ghcPrim
- return [path -/- "autogen/GHC/Prim.hs", path -/- "GHC/PrimopWrappers.hs"]
+ return [path -/- "GHC/Prim.hs", path -/- "GHC/PrimopWrappers.hs"]
derivedConstantsDependencies :: [FilePath]
derivedConstantsDependencies = installTargets ++ fmap (generatedPath -/-)
@@ -132,7 +132,7 @@ generatePackageCode context@(Context stage pkg _) =
-- TODO: why different folders for generated files?
fmap (path -/-)
- [ "autogen/GHC/Prim.hs"
+ [ "GHC/Prim.hs"
, "GHC/PrimopWrappers.hs"
, "*.hs-incl" ] |%> \file -> do
need [primopsTxt stage]
More information about the ghc-commits
mailing list