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
95a6ee3b
Unverified
Commit
95a6ee3b
authored
Apr 07, 2020
by
Oleg Grenrus
Committed by
GitHub
Apr 07, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6663 from phadej/cabalspec-3.4
Cabalspec 3.4
parents
d4ebb699
7494da98
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
Cabal/Distribution/CabalSpecVersion.hs
Cabal/Distribution/CabalSpecVersion.hs
+6
-6
Cabal/Distribution/SPDX/LicenseListVersion.hs
Cabal/Distribution/SPDX/LicenseListVersion.hs
+1
-0
Cabal/doc/file-format-changelog.rst
Cabal/doc/file-format-changelog.rst
+6
-0
Cabal/tests/UnitTests/Distribution/Utils/Structured.hs
Cabal/tests/UnitTests/Distribution/Utils/Structured.hs
+1
-1
No files found.
Cabal/Distribution/CabalSpecVersion.hs
View file @
95a6ee3b
...
...
@@ -26,11 +26,8 @@ data CabalSpecVersion
|
CabalSpecV2_2
|
CabalSpecV2_4
|
CabalSpecV3_0
-- ^ we need this value for solver
-- to represent GPDs which it should skip
--
-- We could filter the files already in package reading phase,
-- but then files would be silently omitted.
-- 3.2: no changes
|
CabalSpecV3_4
deriving
(
Eq
,
Ord
,
Show
,
Read
,
Enum
,
Bounded
,
Typeable
,
Data
,
Generic
)
instance
Binary
CabalSpecVersion
...
...
@@ -41,6 +38,7 @@ instance NFData CabalSpecVersion where rnf = genericRnf
--
-- @since 3.0.0.0
showCabalSpecVersion
::
CabalSpecVersion
->
String
showCabalSpecVersion
CabalSpecV3_4
=
"3.4"
showCabalSpecVersion
CabalSpecV3_0
=
"3.0"
showCabalSpecVersion
CabalSpecV2_4
=
"2.4"
showCabalSpecVersion
CabalSpecV2_2
=
"2.2"
...
...
@@ -58,7 +56,7 @@ showCabalSpecVersion CabalSpecV1_2 = "1.2"
showCabalSpecVersion
CabalSpecV1_0
=
"1.0"
cabalSpecLatest
::
CabalSpecVersion
cabalSpecLatest
=
CabalSpecV3_
0
cabalSpecLatest
=
CabalSpecV3_
4
-- | Parse 'CabalSpecVersion' from version digits.
--
...
...
@@ -66,6 +64,7 @@ cabalSpecLatest = CabalSpecV3_0
--
cabalSpecFromVersionDigits
::
[
Int
]
->
Maybe
CabalSpecVersion
cabalSpecFromVersionDigits
v
|
v
==
[
3
,
4
]
=
Just
CabalSpecV3_4
|
v
==
[
3
,
0
]
=
Just
CabalSpecV3_0
|
v
>=
[
3
]
=
Nothing
|
v
>=
[
2
,
3
]
=
Just
CabalSpecV2_4
...
...
@@ -85,6 +84,7 @@ cabalSpecFromVersionDigits v
-- | @since 3.4.0.0
cabalSpecToVersionDigits
::
CabalSpecVersion
->
[
Int
]
cabalSpecToVersionDigits
CabalSpecV3_4
=
[
3
,
4
]
cabalSpecToVersionDigits
CabalSpecV3_0
=
[
3
,
0
]
cabalSpecToVersionDigits
CabalSpecV2_4
=
[
2
,
4
]
cabalSpecToVersionDigits
CabalSpecV2_2
=
[
2
,
2
]
...
...
Cabal/Distribution/SPDX/LicenseListVersion.hs
View file @
95a6ee3b
...
...
@@ -14,6 +14,7 @@ data LicenseListVersion
deriving
(
Eq
,
Ord
,
Show
,
Enum
,
Bounded
)
cabalSpecVersionToSPDXListVersion
::
CabalSpecVersion
->
LicenseListVersion
cabalSpecVersionToSPDXListVersion
CabalSpecV3_4
=
LicenseListVersion_3_8
cabalSpecVersionToSPDXListVersion
CabalSpecV3_0
=
LicenseListVersion_3_6
cabalSpecVersionToSPDXListVersion
CabalSpecV2_4
=
LicenseListVersion_3_2
cabalSpecVersionToSPDXListVersion
_
=
LicenseListVersion_3_0
Cabal/doc/file-format-changelog.rst
View file @
95a6ee3b
...
...
@@ -19,6 +19,12 @@ relative to the respective preceding *published* version.
versions of the ``Cabal`` library denote unreleased development
branches which have no stability guarantee.
``cabal-version: 3.4``
----------------------
* License fields use identifiers from SPDX License List version
``3.8 2020-02-09``
``cabal-version: 3.0``
----------------------
...
...
Cabal/tests/UnitTests/Distribution/Utils/Structured.hs
View file @
95a6ee3b
...
...
@@ -23,6 +23,6 @@ tests = testGroup "Distribution.Utils.Structured"
,
testCase
"SPDX.License"
$
structureHash
(
Proxy
::
Proxy
License
)
@?=
Fingerprint
0xd3d4a09f517f9f75
0xbc3d16370d5a853a
-- The difference is in encoding of newtypes
#
if
MIN_VERSION_base
(
4
,
7
,
0
)
,
testCase
"LocalBuildInfo"
$
structureHash
(
Proxy
::
Proxy
LocalBuildInfo
)
@?=
Fingerprint
0xe
0f5a6119058a02c
0x703cb61a72aa4564
,
testCase
"LocalBuildInfo"
$
structureHash
(
Proxy
::
Proxy
LocalBuildInfo
)
@?=
Fingerprint
0xe
426ef7c5c6e25e8
0x79b156f0f3c58f79
#
endif
]
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