Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
563fd590
Commit
563fd590
authored
Dec 06, 2013
by
Mikhail Glushenkov
Browse files
Rename 'relaxUpperBound' to 'removeUpperBound'.
parent
d87b584b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Cabal/Distribution/Version.hs
View file @
563fd590
...
...
@@ -69,7 +69,7 @@ module Distribution.Version (
foldVersionRange'
,
-- ** Modification
re
lax
UpperBound
,
re
move
UpperBound
,
-- * Version intervals view
asVersionIntervals
,
...
...
@@ -242,8 +242,8 @@ betweenVersionsInclusive v1 v2 =
-- | Given a version range, remove the highest upper bound. Example: @(>= 1 && <
-- 3) || (>= 4 && < 5)@ is converted to @(>= 1 && < 3) || (>= 4)@.
re
lax
UpperBound
::
VersionRange
->
VersionRange
re
lax
UpperBound
=
fromVersionIntervals
.
relaxLastInterval
.
toVersionIntervals
re
move
UpperBound
::
VersionRange
->
VersionRange
re
move
UpperBound
=
fromVersionIntervals
.
relaxLastInterval
.
toVersionIntervals
where
relaxLastInterval
(
VersionIntervals
intervals
)
=
VersionIntervals
(
relaxLastInterval'
intervals
)
...
...
cabal-install/Distribution/Client/Configure.hs
View file @
563fd590
...
...
@@ -149,8 +149,8 @@ planLocalPackage verbosity comp platform configFlags configExFlags installedPkgI
fromFlagOrDefault
False
$
configBenchmarks
configFlags
resolverParams
=
re
lax
UpperBounds
(
fromFlagOrDefault
AllowNewerNone
$
configAllowNewer
configExFlags
)
re
move
UpperBounds
(
fromFlagOrDefault
AllowNewerNone
$
configAllowNewer
configExFlags
)
.
addPreferences
-- preferences from the config file or command line
...
...
cabal-install/Distribution/Client/Dependency.hs
View file @
563fd590
...
...
@@ -55,7 +55,7 @@ module Distribution.Client.Dependency (
hideInstalledPackagesSpecificByInstalledPackageId
,
hideInstalledPackagesSpecificBySourcePackageId
,
hideInstalledPackagesAllVersions
,
re
lax
UpperBounds
re
move
UpperBounds
)
where
import
Distribution.Client.Dependency.TopDown
...
...
@@ -88,7 +88,7 @@ import Distribution.PackageDescription (BuildInfo(targetBuildDepends))
import
Distribution.PackageDescription.Configuration
(
mapCondTree
)
import
Distribution.Version
(
Version
(
..
),
VersionRange
,
anyVersion
,
thisVersion
,
withinRange
,
re
lax
UpperBound
,
simplifyVersionRange
)
,
re
move
UpperBound
,
simplifyVersionRange
)
import
Distribution.Compiler
(
CompilerId
(
..
),
CompilerFlavor
(
..
)
)
import
Distribution.System
...
...
@@ -290,12 +290,12 @@ hideBrokenInstalledPackages params =
.
InstalledPackageIndex
.
brokenPackages
$
depResolverInstalledPkgIndex
params
-- | Re
lax
upper bounds in dependencies using the policy specified by the
-- | Re
move
upper bounds in dependencies using the policy specified by the
-- 'AllowNewer' argument (all/some/none).
re
lax
UpperBounds
::
AllowNewer
->
DepResolverParams
->
DepResolverParams
re
lax
UpperBounds
allowNewer
params
=
re
move
UpperBounds
::
AllowNewer
->
DepResolverParams
->
DepResolverParams
re
move
UpperBounds
allowNewer
params
=
params
{
-- NB: It's important to apply 're
lax
UpperBounds' after
-- NB: It's important to apply 're
move
UpperBounds' after
-- 'addSourcePackages'. Otherwise, the packages inserted by
-- 'addSourcePackages' won't have upper bounds in dependencies relaxed.
...
...
@@ -312,14 +312,14 @@ relaxUpperBounds allowNewer params =
relaxAllPackageDeps
=
onAllBuildDepends
doRelax
where
doRelax
(
Dependency
pkgName
verRange
)
=
Dependency
pkgName
(
re
lax
UpperBound
verRange
)
Dependency
pkgName
(
re
move
UpperBound
verRange
)
relaxSomePackageDeps
::
[
PackageName
]
->
SourcePackage
->
SourcePackage
relaxSomePackageDeps
pkgNames
=
onAllBuildDepends
doRelax
where
doRelax
d
@
(
Dependency
pkgName
verRange
)
|
pkgName
`
elem
`
pkgNames
=
Dependency
pkgName
(
re
lax
UpperBound
verRange
)
(
re
move
UpperBound
verRange
)
|
otherwise
=
d
-- Walk a 'GenericPackageDescription' and apply 'f' to all 'build-depends'
...
...
cabal-install/Distribution/Client/Install.hs
View file @
563fd590
...
...
@@ -334,7 +334,7 @@ planPackages comp platform mSandboxPkgInfo solver
.
setPreferenceDefault
(
if
upgradeDeps
then
PreferAllLatest
else
PreferLatestForSelected
)
.
re
lax
UpperBounds
allowNewer
.
re
move
UpperBounds
allowNewer
.
addPreferences
-- preferences from the config file or command line
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment