@@ -35,6 +35,7 @@ data CabalSpecVersion
35
35
| -- 3.10: no changes
36
36
CabalSpecV3_12
37
37
| CabalSpecV3_14
38
+ | CabalSpecV3_16
38
39
deriving (Eq , Ord , Show , Read , Enum , Bounded , Data , Generic )
39
40
40
41
instance Binary CabalSpecVersion
@@ -45,6 +46,7 @@ instance NFData CabalSpecVersion where rnf = genericRnf
45
46
--
46
47
-- @since 3.0.0.0
47
48
showCabalSpecVersion :: CabalSpecVersion -> String
49
+ showCabalSpecVersion CabalSpecV3_16 = " 3.16"
48
50
showCabalSpecVersion CabalSpecV3_14 = " 3.14"
49
51
showCabalSpecVersion CabalSpecV3_12 = " 3.12"
50
52
showCabalSpecVersion CabalSpecV3_8 = " 3.8"
@@ -67,13 +69,14 @@ showCabalSpecVersion CabalSpecV1_2 = "1.2"
67
69
showCabalSpecVersion CabalSpecV1_0 = " 1.0"
68
70
69
71
cabalSpecLatest :: CabalSpecVersion
70
- cabalSpecLatest = CabalSpecV3_14
72
+ cabalSpecLatest = CabalSpecV3_16
71
73
72
74
-- | Parse 'CabalSpecVersion' from version digits.
73
75
--
74
76
-- It may fail if for recent versions the version is not exact.
75
77
cabalSpecFromVersionDigits :: [Int ] -> Maybe CabalSpecVersion
76
78
cabalSpecFromVersionDigits v
79
+ | v == [3 , 16 ] = Just CabalSpecV3_16
77
80
| v == [3 , 14 ] = Just CabalSpecV3_14
78
81
| v == [3 , 12 ] = Just CabalSpecV3_12
79
82
| v == [3 , 8 ] = Just CabalSpecV3_8
@@ -98,6 +101,7 @@ cabalSpecFromVersionDigits v
98
101
99
102
-- | @since 3.4.0.0
100
103
cabalSpecToVersionDigits :: CabalSpecVersion -> [Int ]
104
+ cabalSpecToVersionDigits CabalSpecV3_16 = [3 , 16 ]
101
105
cabalSpecToVersionDigits CabalSpecV3_14 = [3 , 14 ]
102
106
cabalSpecToVersionDigits CabalSpecV3_12 = [3 , 12 ]
103
107
cabalSpecToVersionDigits CabalSpecV3_8 = [3 , 8 ]
0 commit comments