ea6501a6475c16cf353fc779d19fff574db8f5e3
[hadrian.git] / src / Rules / Generators / VersionHs.hs
1 module Rules.Generators.VersionHs (generateVersionHs) where
2
3 import Expression
4 import Oracles
5
6 generateVersionHs :: Expr String
7 generateVersionHs = do
8 lift $ need [sourcePath -/- "Rules/Generators/VersionHs.hs"]
9 projectVersion <- getSetting ProjectVersion
10 targetOs <- getSetting TargetOs
11 targetArch <- getSetting TargetArch
12 return $ unlines
13 [ "module Version where"
14 , "version, targetOS, targetARCH :: String"
15 , "version = " ++ quote projectVersion
16 , "targetOS = " ++ quote targetOs
17 , "targetARCH = " ++ quote targetArch ]