module Distribution.SPDX.LicenseListVersion (
    LicenseListVersion (..),
    cabalSpecVersionToSPDXListVersion,
    ) where

import Distribution.CabalSpecVersion

-- | SPDX License List version @Cabal@ is aware of.
data LicenseListVersion
    = LicenseListVersion_3_0
    | LicenseListVersion_3_2
    | LicenseListVersion_3_6
    | LicenseListVersion_3_9
  deriving (LicenseListVersion -> LicenseListVersion -> Bool
(LicenseListVersion -> LicenseListVersion -> Bool)
-> (LicenseListVersion -> LicenseListVersion -> Bool)
-> Eq LicenseListVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LicenseListVersion -> LicenseListVersion -> Bool
$c/= :: LicenseListVersion -> LicenseListVersion -> Bool
== :: LicenseListVersion -> LicenseListVersion -> Bool
$c== :: LicenseListVersion -> LicenseListVersion -> Bool
Eq, Eq LicenseListVersion
Eq LicenseListVersion
-> (LicenseListVersion -> LicenseListVersion -> Ordering)
-> (LicenseListVersion -> LicenseListVersion -> Bool)
-> (LicenseListVersion -> LicenseListVersion -> Bool)
-> (LicenseListVersion -> LicenseListVersion -> Bool)
-> (LicenseListVersion -> LicenseListVersion -> Bool)
-> (LicenseListVersion -> LicenseListVersion -> LicenseListVersion)
-> (LicenseListVersion -> LicenseListVersion -> LicenseListVersion)
-> Ord LicenseListVersion
LicenseListVersion -> LicenseListVersion -> Bool
LicenseListVersion -> LicenseListVersion -> Ordering
LicenseListVersion -> LicenseListVersion -> LicenseListVersion
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: LicenseListVersion -> LicenseListVersion -> LicenseListVersion
$cmin :: LicenseListVersion -> LicenseListVersion -> LicenseListVersion
max :: LicenseListVersion -> LicenseListVersion -> LicenseListVersion
$cmax :: LicenseListVersion -> LicenseListVersion -> LicenseListVersion
>= :: LicenseListVersion -> LicenseListVersion -> Bool
$c>= :: LicenseListVersion -> LicenseListVersion -> Bool
> :: LicenseListVersion -> LicenseListVersion -> Bool
$c> :: LicenseListVersion -> LicenseListVersion -> Bool
<= :: LicenseListVersion -> LicenseListVersion -> Bool
$c<= :: LicenseListVersion -> LicenseListVersion -> Bool
< :: LicenseListVersion -> LicenseListVersion -> Bool
$c< :: LicenseListVersion -> LicenseListVersion -> Bool
compare :: LicenseListVersion -> LicenseListVersion -> Ordering
$ccompare :: LicenseListVersion -> LicenseListVersion -> Ordering
$cp1Ord :: Eq LicenseListVersion
Ord, Int -> LicenseListVersion -> ShowS
[LicenseListVersion] -> ShowS
LicenseListVersion -> String
(Int -> LicenseListVersion -> ShowS)
-> (LicenseListVersion -> String)
-> ([LicenseListVersion] -> ShowS)
-> Show LicenseListVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LicenseListVersion] -> ShowS
$cshowList :: [LicenseListVersion] -> ShowS
show :: LicenseListVersion -> String
$cshow :: LicenseListVersion -> String
showsPrec :: Int -> LicenseListVersion -> ShowS
$cshowsPrec :: Int -> LicenseListVersion -> ShowS
Show, Int -> LicenseListVersion
LicenseListVersion -> Int
LicenseListVersion -> [LicenseListVersion]
LicenseListVersion -> LicenseListVersion
LicenseListVersion -> LicenseListVersion -> [LicenseListVersion]
LicenseListVersion
-> LicenseListVersion -> LicenseListVersion -> [LicenseListVersion]
(LicenseListVersion -> LicenseListVersion)
-> (LicenseListVersion -> LicenseListVersion)
-> (Int -> LicenseListVersion)
-> (LicenseListVersion -> Int)
-> (LicenseListVersion -> [LicenseListVersion])
-> (LicenseListVersion
    -> LicenseListVersion -> [LicenseListVersion])
-> (LicenseListVersion
    -> LicenseListVersion -> [LicenseListVersion])
-> (LicenseListVersion
    -> LicenseListVersion
    -> LicenseListVersion
    -> [LicenseListVersion])
-> Enum LicenseListVersion
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: LicenseListVersion
-> LicenseListVersion -> LicenseListVersion -> [LicenseListVersion]
$cenumFromThenTo :: LicenseListVersion
-> LicenseListVersion -> LicenseListVersion -> [LicenseListVersion]
enumFromTo :: LicenseListVersion -> LicenseListVersion -> [LicenseListVersion]
$cenumFromTo :: LicenseListVersion -> LicenseListVersion -> [LicenseListVersion]
enumFromThen :: LicenseListVersion -> LicenseListVersion -> [LicenseListVersion]
$cenumFromThen :: LicenseListVersion -> LicenseListVersion -> [LicenseListVersion]
enumFrom :: LicenseListVersion -> [LicenseListVersion]
$cenumFrom :: LicenseListVersion -> [LicenseListVersion]
fromEnum :: LicenseListVersion -> Int
$cfromEnum :: LicenseListVersion -> Int
toEnum :: Int -> LicenseListVersion
$ctoEnum :: Int -> LicenseListVersion
pred :: LicenseListVersion -> LicenseListVersion
$cpred :: LicenseListVersion -> LicenseListVersion
succ :: LicenseListVersion -> LicenseListVersion
$csucc :: LicenseListVersion -> LicenseListVersion
Enum, LicenseListVersion
LicenseListVersion
-> LicenseListVersion -> Bounded LicenseListVersion
forall a. a -> a -> Bounded a
maxBound :: LicenseListVersion
$cmaxBound :: LicenseListVersion
minBound :: LicenseListVersion
$cminBound :: LicenseListVersion
Bounded)

cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
cabalSpecVersionToSPDXListVersion CabalSpecVersion
CabalSpecV3_4 = LicenseListVersion
LicenseListVersion_3_9
cabalSpecVersionToSPDXListVersion CabalSpecVersion
CabalSpecV3_0 = LicenseListVersion
LicenseListVersion_3_6
cabalSpecVersionToSPDXListVersion CabalSpecVersion
CabalSpecV2_4 = LicenseListVersion
LicenseListVersion_3_2
cabalSpecVersionToSPDXListVersion CabalSpecVersion
_             = LicenseListVersion
LicenseListVersion_3_0