Commit eca7b6a6 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Move GHC/Prim.hs outside of autogen directory

parent 010dd78b
......@@ -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
......
......@@ -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]
......
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