Commit 83380b25 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Remove the prefernece and cabal lib version flags from the InstallFlags

They are now in the ConfigExFlags instead.
parent c5a8b0b3
...@@ -459,11 +459,9 @@ data InstallFlags = InstallFlags { ...@@ -459,11 +459,9 @@ data InstallFlags = InstallFlags {
installReinstall :: Flag Bool, installReinstall :: Flag Bool,
installOnly :: Flag Bool, installOnly :: Flag Bool,
installRootCmd :: Flag String, installRootCmd :: Flag String,
installCabalVersion :: Flag Version,
installLogFile :: Flag FilePath, installLogFile :: Flag FilePath,
installBuildReports :: Flag Bool, installBuildReports :: Flag Bool,
installSymlinkBinDir:: Flag FilePath, installSymlinkBinDir:: Flag FilePath
installPreferences :: [Dependency]
} }
defaultInstallFlags :: InstallFlags defaultInstallFlags :: InstallFlags
...@@ -473,11 +471,9 @@ defaultInstallFlags = InstallFlags { ...@@ -473,11 +471,9 @@ defaultInstallFlags = InstallFlags {
installReinstall = Flag False, installReinstall = Flag False,
installOnly = Flag False, installOnly = Flag False,
installRootCmd = mempty, installRootCmd = mempty,
installCabalVersion = mempty,
installLogFile = mempty, installLogFile = mempty,
installBuildReports = Flag False, installBuildReports = Flag False,
installSymlinkBinDir= mempty, installSymlinkBinDir= mempty
installPreferences = mempty
} }
installCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags) installCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags)
...@@ -537,14 +533,6 @@ installOptions showOrParseArgs = ...@@ -537,14 +533,6 @@ installOptions showOrParseArgs =
installSymlinkBinDir (\v flags -> flags { installSymlinkBinDir = v }) installSymlinkBinDir (\v flags -> flags { installSymlinkBinDir = v })
(reqArgFlag "DIR") (reqArgFlag "DIR")
, option [] ["cabal-lib-version"]
("Select which version of the Cabal lib to use to build packages "
++ "(useful for testing).")
installCabalVersion (\v flags -> flags { installCabalVersion = v })
(reqArg "VERSION" (readP_to_E ("Cannot parse cabal lib version: "++)
(fmap toFlag parse))
(map display . flagToList))
, option [] ["log-builds"] , option [] ["log-builds"]
"Log all builds to file (name template can use $pkgid, $compiler, $os, $arch)" "Log all builds to file (name template can use $pkgid, $compiler, $os, $arch)"
installLogFile (\v flags -> flags { installLogFile = v }) installLogFile (\v flags -> flags { installLogFile = v })
...@@ -555,13 +543,6 @@ installOptions showOrParseArgs = ...@@ -555,13 +543,6 @@ installOptions showOrParseArgs =
installBuildReports (\v flags -> flags { installBuildReports = v }) installBuildReports (\v flags -> flags { installBuildReports = v })
trueArg trueArg
, option [] ["preference"]
"Specify preferences (soft constraints) on the version of a package"
installPreferences (\v flags -> flags { installPreferences = v })
(reqArg "DEPENDENCY"
(readP_to_E (const "dependency expected") ((\x -> [x]) `fmap` parse))
(map (\x -> display x)))
] ++ case showOrParseArgs of -- TODO: remove when "cabal install" avoids ] ++ case showOrParseArgs of -- TODO: remove when "cabal install" avoids
ParseArgs -> ParseArgs ->
option [] ["only"] option [] ["only"]
...@@ -578,11 +559,9 @@ instance Monoid InstallFlags where ...@@ -578,11 +559,9 @@ instance Monoid InstallFlags where
installReinstall = mempty, installReinstall = mempty,
installOnly = mempty, installOnly = mempty,
installRootCmd = mempty, installRootCmd = mempty,
installCabalVersion = mempty,
installLogFile = mempty, installLogFile = mempty,
installBuildReports = mempty, installBuildReports = mempty,
installSymlinkBinDir= mempty, installSymlinkBinDir= mempty
installPreferences = mempty
} }
mappend a b = InstallFlags { mappend a b = InstallFlags {
installDocumentation= combine installDocumentation, installDocumentation= combine installDocumentation,
...@@ -590,11 +569,9 @@ instance Monoid InstallFlags where ...@@ -590,11 +569,9 @@ instance Monoid InstallFlags where
installReinstall = combine installReinstall, installReinstall = combine installReinstall,
installOnly = combine installOnly, installOnly = combine installOnly,
installRootCmd = combine installRootCmd, installRootCmd = combine installRootCmd,
installCabalVersion = combine installCabalVersion,
installLogFile = combine installLogFile, installLogFile = combine installLogFile,
installBuildReports = combine installBuildReports, installBuildReports = combine installBuildReports,
installSymlinkBinDir= combine installSymlinkBinDir, installSymlinkBinDir= combine installSymlinkBinDir
installPreferences = combine installPreferences
} }
where combine field = field a `mappend` field b where combine field = field a `mappend` field b
......
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