Commit 5a4a443a authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Implement argPath that unifies the path argument.

parent d9b03d37
......@@ -21,8 +21,8 @@ cabalArgs = builder GhcCabal ? do
stage <- asks getStage
pkg <- asks getPackage
mconcat [ arg "configure"
, arg $ pkgPath pkg
, arg $ targetDirectory stage pkg
, argPath $ pkgPath pkg
, argPath $ targetDirectory stage pkg
, dllArgs
, with $ Ghc stage
, with $ GhcPkg stage
......
......@@ -18,4 +18,4 @@ ghcPkgArgs = do
[ arg "update"
, arg "--force"
, stage0 ? bootPackageDbArgs
, arg $ targetPath stage pkg </> "inplace-pkg-config" ]
, argPath $ targetPath stage pkg </> "inplace-pkg-config" ]
module Settings.Util (
-- Primitive settings elements
arg, argM,
arg, argPath, argM,
argConfig, argStagedConfig, argConfigList, argStagedConfigList,
appendCcArgs,
-- argBuilderPath, argStagedBuilderPath,
......@@ -12,14 +12,19 @@ module Settings.Util (
) where
import Base
import Util
import Builder
import Oracles.Base
import Expression
-- A single argument
-- A single argument.
arg :: String -> Args
arg = append . return
-- A single path argument. The path gets unified.
argPath :: String -> Args
argPath = append . return . unifyPath
argM :: Action String -> Args
argM = appendM . fmap return
......@@ -50,9 +55,6 @@ appendCcArgs xs = do
, builder GhcCabal ? appendSub "--configure-option=CFLAGS" xs
, builder GhcCabal ? appendSub "--gcc-options" xs ]
-- packageData :: Arity -> String -> Args
-- packageData arity key =
-- return $ EnvironmentParameter $ PackageData arity key Nothing Nothing
......
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