Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
3ef4f03c
Commit
3ef4f03c
authored
May 14, 2013
by
Brent Yorgey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init: generate build-depends with >=x.x && <x.y syntax instead of ==x.*
fixes #1329.
parent
4b0204db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
cabal-install/Distribution/Client/Init.hs
cabal-install/Distribution/Client/Init.hs
+13
-2
No files found.
cabal-install/Distribution/Client/Init.hs
View file @
3ef4f03c
...
...
@@ -54,7 +54,7 @@ import Text.PrettyPrint hiding (mode, cat)
import
Data.Version
(
Version
(
..
)
)
import
Distribution.Version
(
orLaterVersion
,
within
Version
,
VersionRange
)
(
orLaterVersion
,
earlierVersion
,
intersect
Version
Ranges
,
VersionRange
)
import
Distribution.Verbosity
(
Verbosity
)
import
Distribution.ModuleName
...
...
@@ -400,7 +400,18 @@ chooseDep flags (m, Just ps)
(
pvpize
.
maximum
.
map
P
.
pkgVersion
$
pids
)
pvpize
::
Version
->
VersionRange
pvpize
v
=
withinVersion
$
v
{
versionBranch
=
take
2
(
versionBranch
v
)
}
pvpize
v
=
orLaterVersion
v'
`
intersectVersionRanges
`
earlierVersion
(
incVersion
1
v'
)
where
v'
=
(
v
{
versionBranch
=
take
2
(
versionBranch
v
)
})
incVersion
::
Int
->
Version
->
Version
incVersion
n
(
Version
vlist
tags
)
=
Version
(
incVersion'
n
vlist
)
tags
where
incVersion'
0
[]
=
[
1
]
incVersion'
0
(
v
:
_
)
=
[
v
+
1
]
incVersion'
m
[]
=
replicate
m
0
++
[
1
]
incVersion'
m
(
v
:
vs
)
=
v
:
incVersion'
(
m
-
1
)
vs
---------------------------------------------------------------------------
-- Prompting/user interaction -------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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