Skip to content
Snippets Groups Projects
Commit 47679f95 authored by Oleg Grenrus's avatar Oleg Grenrus
Browse files

Add cabal-version: 3.6 values

parent c41878aa
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ data CabalSpecVersion
| CabalSpecV3_0
-- 3.2: no changes
| CabalSpecV3_4
| CabalSpecV3_6
deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data, Generic)
instance Binary CabalSpecVersion
......@@ -38,6 +39,7 @@ instance NFData CabalSpecVersion where rnf = genericRnf
--
-- @since 3.0.0.0
showCabalSpecVersion :: CabalSpecVersion -> String
showCabalSpecVersion CabalSpecV3_6 = "3.6"
showCabalSpecVersion CabalSpecV3_4 = "3.4"
showCabalSpecVersion CabalSpecV3_0 = "3.0"
showCabalSpecVersion CabalSpecV2_4 = "2.4"
......@@ -56,7 +58,7 @@ showCabalSpecVersion CabalSpecV1_2 = "1.2"
showCabalSpecVersion CabalSpecV1_0 = "1.0"
cabalSpecLatest :: CabalSpecVersion
cabalSpecLatest = CabalSpecV3_4
cabalSpecLatest = CabalSpecV3_6
-- | Parse 'CabalSpecVersion' from version digits.
--
......@@ -64,6 +66,7 @@ cabalSpecLatest = CabalSpecV3_4
--
cabalSpecFromVersionDigits :: [Int] -> Maybe CabalSpecVersion
cabalSpecFromVersionDigits v
| v == [3,6] = Just CabalSpecV3_6
| v == [3,4] = Just CabalSpecV3_4
| v == [3,0] = Just CabalSpecV3_0
| v == [2,4] = Just CabalSpecV2_4
......@@ -84,6 +87,7 @@ cabalSpecFromVersionDigits v
-- | @since 3.4.0.0
cabalSpecToVersionDigits :: CabalSpecVersion -> [Int]
cabalSpecToVersionDigits CabalSpecV3_6 = [3,6]
cabalSpecToVersionDigits CabalSpecV3_4 = [3,4]
cabalSpecToVersionDigits CabalSpecV3_0 = [3,0]
cabalSpecToVersionDigits CabalSpecV2_4 = [2,4]
......
......@@ -14,6 +14,7 @@ data LicenseListVersion
deriving (Eq, Ord, Show, Enum, Bounded)
cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
cabalSpecVersionToSPDXListVersion CabalSpecV3_6 = LicenseListVersion_3_9
cabalSpecVersionToSPDXListVersion CabalSpecV3_4 = LicenseListVersion_3_9
cabalSpecVersionToSPDXListVersion CabalSpecV3_0 = LicenseListVersion_3_6
cabalSpecVersionToSPDXListVersion CabalSpecV2_4 = LicenseListVersion_3_2
......
......@@ -24,7 +24,7 @@ tests = testGroup "Distribution.Utils.Structured"
, testCase "SPDX.License" $ structureHash (Proxy :: Proxy License) @?= md5FromInteger 0xd3d4a09f517f9f75bc3d16370d5a853a
-- The difference is in encoding of newtypes
#if MIN_VERSION_base(4,7,0)
, testCase "GenericPackageDescription" $ structureHash (Proxy :: Proxy GenericPackageDescription) @?= md5FromInteger 0x2f869c09d0cd2288d55b0455830e5a61
, testCase "LocalBuildInfo" $ structureHash (Proxy :: Proxy LocalBuildInfo) @?= md5FromInteger 0x2d64c99467083bef4a894162a121c467
, testCase "GenericPackageDescription" $ structureHash (Proxy :: Proxy GenericPackageDescription) @?= md5FromInteger 0x85108a50f7eef63ee549349b080548f3
, testCase "LocalBuildInfo" $ structureHash (Proxy :: Proxy LocalBuildInfo) @?= md5FromInteger 0xff0724263e69d314fc7cd327ca617264
#endif
]
......@@ -19,6 +19,11 @@ relative to the respective preceding *published* version.
versions of the ``Cabal`` library denote unreleased development
branches which have no stability guarantee.
``cabal-version: 3.6``
----------------------
* TBW
``cabal-version: 3.4``
----------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment