@@ -33,12 +33,14 @@ data SPDXLicenseListVersion
33
33
| SPDXLicenseListVersion_3_16
34
34
| SPDXLicenseListVersion_3_23
35
35
| SPDXLicenseListVersion_3_25
36
+ | SPDXLicenseListVersion_3_26
36
37
deriving (Eq , Ord , Show , Enum , Bounded )
37
38
38
39
allVers :: Set. Set SPDXLicenseListVersion
39
40
allVers = Set. fromList [minBound .. maxBound ]
40
41
41
42
prettyVer :: SPDXLicenseListVersion -> Text
43
+ prettyVer SPDXLicenseListVersion_3_26 = " SPDX License List 3.26"
42
44
prettyVer SPDXLicenseListVersion_3_25 = " SPDX License List 3.25"
43
45
prettyVer SPDXLicenseListVersion_3_23 = " SPDX License List 3.23"
44
46
prettyVer SPDXLicenseListVersion_3_16 = " SPDX License List 3.16"
@@ -49,6 +51,7 @@ prettyVer SPDXLicenseListVersion_3_2 = "SPDX License List 3.2"
49
51
prettyVer SPDXLicenseListVersion_3_0 = " SPDX License List 3.0"
50
52
51
53
suffixVer :: SPDXLicenseListVersion -> String
54
+ suffixVer SPDXLicenseListVersion_3_26 = " _3_26"
52
55
suffixVer SPDXLicenseListVersion_3_25 = " _3_25"
53
56
suffixVer SPDXLicenseListVersion_3_23 = " _3_23"
54
57
suffixVer SPDXLicenseListVersion_3_16 = " _3_16"
@@ -62,22 +65,23 @@ suffixVer SPDXLicenseListVersion_3_0 = "_3_0"
62
65
-- Per version
63
66
-------------------------------------------------------------------------------
64
67
65
- data PerV a = PerV a a a a a a a a
68
+ data PerV a = PerV a a a a a a a a a
66
69
deriving (Show , Functor , Foldable , Traversable )
67
70
68
71
class Functor f => Representable i f | f -> i where
69
72
index :: i -> f a -> a
70
73
tabulate :: (i -> a ) -> f a
71
74
72
75
instance Representable SPDXLicenseListVersion PerV where
73
- index SPDXLicenseListVersion_3_0 (PerV x _ _ _ _ _ _ _) = x
74
- index SPDXLicenseListVersion_3_2 (PerV _ x _ _ _ _ _ _) = x
75
- index SPDXLicenseListVersion_3_6 (PerV _ _ x _ _ _ _ _) = x
76
- index SPDXLicenseListVersion_3_9 (PerV _ _ _ x _ _ _ _) = x
77
- index SPDXLicenseListVersion_3_10 (PerV _ _ _ _ x _ _ _) = x
78
- index SPDXLicenseListVersion_3_16 (PerV _ _ _ _ _ x _ _) = x
79
- index SPDXLicenseListVersion_3_23 (PerV _ _ _ _ _ _ x _) = x
80
- index SPDXLicenseListVersion_3_25 (PerV _ _ _ _ _ _ _ x) = x
76
+ index SPDXLicenseListVersion_3_0 (PerV x _ _ _ _ _ _ _ _) = x
77
+ index SPDXLicenseListVersion_3_2 (PerV _ x _ _ _ _ _ _ _) = x
78
+ index SPDXLicenseListVersion_3_6 (PerV _ _ x _ _ _ _ _ _) = x
79
+ index SPDXLicenseListVersion_3_9 (PerV _ _ _ x _ _ _ _ _) = x
80
+ index SPDXLicenseListVersion_3_10 (PerV _ _ _ _ x _ _ _ _) = x
81
+ index SPDXLicenseListVersion_3_16 (PerV _ _ _ _ _ x _ _ _) = x
82
+ index SPDXLicenseListVersion_3_23 (PerV _ _ _ _ _ _ x _ _) = x
83
+ index SPDXLicenseListVersion_3_25 (PerV _ _ _ _ _ _ _ x _) = x
84
+ index SPDXLicenseListVersion_3_26 (PerV _ _ _ _ _ _ _ _ x) = x
81
85
82
86
tabulate f = PerV
83
87
(f SPDXLicenseListVersion_3_0 )
@@ -88,6 +92,7 @@ instance Representable SPDXLicenseListVersion PerV where
88
92
(f SPDXLicenseListVersion_3_16 )
89
93
(f SPDXLicenseListVersion_3_23 )
90
94
(f SPDXLicenseListVersion_3_25 )
95
+ (f SPDXLicenseListVersion_3_26 )
91
96
92
97
-------------------------------------------------------------------------------
93
98
-- Sorting
0 commit comments