aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/src/Build.hs
diff options
context:
space:
mode:
authorBrad Richardson <everythingfunctional@protonmail.com>2020-10-22 13:42:10 -0500
committerBrad Richardson <everythingfunctional@protonmail.com>2020-10-22 13:42:10 -0500
commit5f16555d030ff120d5175477886473de40654659 (patch)
tree2212fda13dfbae4539bcf7803c94ebb109383219 /bootstrap/src/Build.hs
parente26feb52cc82bc58ea124e61473363829cf81c81 (diff)
downloadfpm-5f16555d030ff120d5175477886473de40654659.tar.gz
fpm-5f16555d030ff120d5175477886473de40654659.zip
Add some debugging code
Diffstat (limited to 'bootstrap/src/Build.hs')
-rw-r--r--bootstrap/src/Build.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/bootstrap/src/Build.hs b/bootstrap/src/Build.hs
index ce8ea1d..fc339e7 100644
--- a/bootstrap/src/Build.hs
+++ b/bootstrap/src/Build.hs
@@ -12,6 +12,7 @@ import BuildModel ( CompileTimeInfo(..)
, constructCompileTimeInfo
, getAllObjectFiles
, getAvailableModules
+ , getSourceFileName
, processRawSource
)
import Data.List ( intercalate
@@ -65,12 +66,15 @@ buildProgram programDirectory' libraryDirectories sourceExtensions buildDirector
let programDirectory = foldl1 (</>) (splitDirectories programDirectory')
let includeFlags = map ("-I" ++) libraryDirectories
sourceFiles <- getDirectoriesFiles [programDirectory] sourceExtensions
+ print sourceFiles
+ print (programDirectory </> programSource)
rawSources <- mapM sourceFileToRawSource sourceFiles
let sources' = map processRawSource rawSources
let isThisProgramOrNotProgram p@(Program{}) =
programSourceFileName p == programDirectory </> programSource
isThisProgramOrNotProgram _ = True
let sources = filter isThisProgramOrNotProgram sources'
+ print (map getSourceFileName sources)
let availableModules = getAvailableModules sources
let compileTimeInfo = map
(\s -> constructCompileTimeInfo s availableModules buildDirectory)