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

Fix GhcPrim path in getPackageSources.

parent aecfddac
......@@ -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
......
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