Distribution.SPDX.LicenseReference

Cabal-3.2.1.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.SPDX.LicenseReference

Synopsis

- data LicenseRef
- licenseRef :: LicenseRef -> String
- licenseDocumentRef :: LicenseRef -> Maybe String
- mkLicenseRef :: Maybe String -> String -> Maybe LicenseRef
- mkLicenseRef' :: Maybe String -> String -> LicenseRef

# Documentation

data LicenseRef #

A user defined license reference denoted by `LicenseRef-[idstring]` (for a license not on the SPDX License List);

#### Instances

Instances details

Eq LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods (==) :: LicenseRef -> LicenseRef -> Bool # (/=) :: LicenseRef -> LicenseRef -> Bool #
Data LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LicenseRef -> c LicenseRef Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LicenseRef Source # toConstr :: LicenseRef -> Constr Source # dataTypeOf :: LicenseRef -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LicenseRef) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LicenseRef) Source # gmapT :: (forall b. Data b => b -> b) -> LicenseRef -> LicenseRef Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LicenseRef -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LicenseRef -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LicenseRef -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LicenseRef -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LicenseRef -> m LicenseRef Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LicenseRef -> m LicenseRef Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LicenseRef -> m LicenseRef Source #
Ord LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods compare :: LicenseRef -> LicenseRef -> Ordering # (<) :: LicenseRef -> LicenseRef -> Bool # (<=) :: LicenseRef -> LicenseRef -> Bool # (>) :: LicenseRef -> LicenseRef -> Bool # (>=) :: LicenseRef -> LicenseRef -> Bool # max :: LicenseRef -> LicenseRef -> LicenseRef # min :: LicenseRef -> LicenseRef -> LicenseRef #
Read LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods readsPrec :: Int -> ReadS LicenseRef Source # readList :: ReadS [LicenseRef] Source # readPrec :: ReadPrec LicenseRef Source # readListPrec :: ReadPrec [LicenseRef] Source #
Show LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods showsPrec :: Int -> LicenseRef -> ShowS Source # show :: LicenseRef -> String Source # showList :: [LicenseRef] -> ShowS Source #
Generic LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Associated Types type Rep LicenseRef :: Type -> Type Source # Methods from :: LicenseRef -> Rep LicenseRef x Source # to :: Rep LicenseRef x -> LicenseRef Source #
Binary LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods put :: LicenseRef -> Put Source # get :: Get LicenseRef Source # putList :: [LicenseRef] -> Put Source #
NFData LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods rnf :: LicenseRef -> () Source #
Structured LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods structure :: Proxy LicenseRef -> Structure # structureHash' :: Tagged LicenseRef MD5
Pretty LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods pretty :: LicenseRef -> Doc # prettyVersioned :: CabalSpecVersion -> LicenseRef -> Doc #
Parsec LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods parsec :: CabalParsing m => m LicenseRef #
type Rep LicenseRef # |
Instance details Defined in Distribution.SPDX.LicenseReference type Rep LicenseRef = D1 ('MetaData "LicenseRef" "Distribution.SPDX.LicenseReference" "Cabal-3.2.1.0" 'False) (C1 ('MetaCons "LicenseRef" 'PrefixI 'True) (S1 ('MetaSel ('Just "_lrDocument") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "_lrLicense") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))

licenseRef :: LicenseRef -> String #

License reference.

licenseDocumentRef :: LicenseRef -> Maybe String #

Document reference.

mkLicenseRef :: Maybe String -> String -> Maybe LicenseRef #

Create `LicenseRef` from optional document ref and name.

mkLicenseRef' :: Maybe String -> String -> LicenseRef #

Like `mkLicenseRef` but convert invalid characters into `-`.