Skip to content

Commit a3db67f

Browse files
committed
add constructor for cabal spec 3.0 for CabalSpecVersion type.
1 parent c750ef8 commit a3db67f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Cabal/Distribution/CabalSpecVersion.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ data CabalSpecVersion
1616
| CabalSpecV1_24
1717
| CabalSpecV2_0
1818
| CabalSpecV2_2
19+
| CabalSpecV3_0
1920
deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data, Generic)
2021

2122
cabalSpecLatest :: CabalSpecVersion
22-
cabalSpecLatest = CabalSpecV2_2
23+
cabalSpecLatest = CabalSpecV3_0
2324

2425
cabalSpecFeatures :: CabalSpecVersion -> Set.Set CabalFeature
2526
cabalSpecFeatures CabalSpecOld = Set.empty
@@ -30,13 +31,15 @@ cabalSpecFeatures CabalSpecV2_2 = Set.fromList
3031
[ Elif
3132
, CommonStanzas
3233
]
34+
cabalSpecFeatures CabalSpecV3_0 = cabalSpecFeatures CabalSpecV2_2
3335

3436
cabalSpecSupports :: CabalSpecVersion -> [Int] -> Bool
3537
cabalSpecSupports CabalSpecOld v = v < [1,21]
3638
cabalSpecSupports CabalSpecV1_22 v = v < [1,23]
3739
cabalSpecSupports CabalSpecV1_24 v = v < [1,25]
3840
cabalSpecSupports CabalSpecV2_0 v = v < [2,1]
39-
cabalSpecSupports CabalSpecV2_2 _ = True
41+
cabalSpecSupports CabalSpecV2_2 v = v < [2,3]
42+
cabalSpecSupports CabalSpecV3_0 _ = True
4043

4144
specHasCommonStanzas :: CabalSpecVersion -> HasCommonStanzas
4245
specHasCommonStanzas CabalSpecV2_2 = HasCommonStanzas

0 commit comments

Comments
 (0)