diff options
author | Brad Richardson <everythingfunctional@protonmail.com> | 2020-10-20 11:27:30 -0500 |
---|---|---|
committer | Brad Richardson <everythingfunctional@protonmail.com> | 2020-10-20 11:27:30 -0500 |
commit | 5db397ddca9ffa5558fb80ebfad73332f8c52cd6 (patch) | |
tree | a3a275c6062e4949d6fa29328d0e1569ca1a47c9 /bootstrap/src/BuildModel.hs | |
parent | 20ee2333cd86909e21ca5bd88f3d7166e1941c92 (diff) | |
download | fpm-5db397ddca9ffa5558fb80ebfad73332f8c52cd6.tar.gz fpm-5db397ddca9ffa5558fb80ebfad73332f8c52cd6.zip |
Add test for program's direct dependencies
Diffstat (limited to 'bootstrap/src/BuildModel.hs')
-rw-r--r-- | bootstrap/src/BuildModel.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bootstrap/src/BuildModel.hs b/bootstrap/src/BuildModel.hs index 86df719..f4c809f 100644 --- a/bootstrap/src/BuildModel.hs +++ b/bootstrap/src/BuildModel.hs @@ -62,6 +62,7 @@ data CompileTimeInfo = CompileTimeInfo { compileTimeInfoSourceFileName :: FilePath , compileTimeInfoObjectFileProduced :: FilePath , compileTimeInfoOtherFilesProduced :: [FilePath] + , compileTimeInfoDirectDependencies :: [FilePath] } processRawSource :: RawSource -> Source @@ -92,13 +93,16 @@ processRawSource rawSource = } else undefined -constructCompileTimeInfo :: Source -> [Source] -> FilePath -> CompileTimeInfo -constructCompileTimeInfo program@(Program{}) otherSources buildDirectory = +constructCompileTimeInfo :: Source -> [String] -> FilePath -> CompileTimeInfo +constructCompileTimeInfo program@(Program{}) availableModules buildDirectory = CompileTimeInfo { compileTimeInfoSourceFileName = programSourceFileName program , compileTimeInfoObjectFileProduced = (programObjectFileName program) buildDirectory , compileTimeInfoOtherFilesProduced = [] + , compileTimeInfoDirectDependencies = map + (\mName -> buildDirectory </> mName <.> "mod") + (filter (`elem` availableModules) (programModulesUsed program)) } constructCompileTimeInfo _ otherSources buildDirectory = undefined |