aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/src/BuildModel.hs
diff options
context:
space:
mode:
authorBrad Richardson <everythingfunctional@protonmail.com>2020-10-15 10:22:43 -0500
committerBrad Richardson <everythingfunctional@protonmail.com>2020-10-15 10:22:43 -0500
commitc2638957dd9aca90831e0b434fec9ccc05c77acc (patch)
treec32a8315831b148687acd9cc15f8cce2339994db /bootstrap/src/BuildModel.hs
parent4b062f1f275d568099d6ebf4c1c687c50d039b84 (diff)
downloadfpm-c2638957dd9aca90831e0b434fec9ccc05c77acc.tar.gz
fpm-c2638957dd9aca90831e0b434fec9ccc05c77acc.zip
Add test for module source file name
Diffstat (limited to 'bootstrap/src/BuildModel.hs')
-rw-r--r--bootstrap/src/BuildModel.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/bootstrap/src/BuildModel.hs b/bootstrap/src/BuildModel.hs
index db44b54..043173f 100644
--- a/bootstrap/src/BuildModel.hs
+++ b/bootstrap/src/BuildModel.hs
@@ -42,7 +42,9 @@ data Source =
, programObjectFileName :: FilePath -> FilePath
, programModulesUsed :: [String]
}
- | Module {}
+ | Module
+ { moduleSourceFileName :: FilePath
+ }
processRawSource :: RawSource -> Source
processRawSource rawSource =
@@ -59,7 +61,9 @@ processRawSource rawSource =
<.> "o"
, programModulesUsed = getModulesUsed parsedContents
}
- else if hasModuleDeclaration parsedContents then Module{} else undefined
+ else if hasModuleDeclaration parsedContents
+ then Module { moduleSourceFileName = sourceFileName }
+ else undefined
pathSeparatorsToUnderscores :: FilePath -> FilePath
pathSeparatorsToUnderscores fileName =