Cabal-syntax-3.12.1.0: A library for working with .cabal files

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 Source #

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

#### Instances

Instances details

Parsec LicenseRef Source # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods parsec :: CabalParsing m => m LicenseRef Source #
Pretty LicenseRef Source # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods pretty :: LicenseRef -> Doc Source # prettyVersioned :: CabalSpecVersion -> LicenseRef -> Doc Source #
Structured LicenseRef Source # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods structure :: Proxy LicenseRef -> Structure Source # structureHash' :: Tagged LicenseRef MD5
Binary LicenseRef Source # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods put :: LicenseRef -> Put Source # get :: Get LicenseRef Source # putList :: [LicenseRef] -> Put Source #
NFData LicenseRef Source # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods rnf :: LicenseRef -> () Source #
Data LicenseRef Source # |

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 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LicenseRef #

toConstr :: LicenseRef -> Constr #

dataTypeOf :: LicenseRef -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LicenseRef) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LicenseRef) #

gmapT :: (forall b. Data b => b -> b) -> LicenseRef -> LicenseRef #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LicenseRef -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LicenseRef -> r #

gmapQ :: (forall d. Data d => d -> u) -> LicenseRef -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LicenseRef -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LicenseRef -> m LicenseRef #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LicenseRef -> m LicenseRef #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LicenseRef -> m LicenseRef #

Generic LicenseRef Source # |

Instance details

Defined in Distribution.SPDX.LicenseReference

Associated Types

type Rep LicenseRef |

Instance details

Defined in Distribution.SPDX.LicenseReference

type Rep LicenseRef = D1 ('MetaData "LicenseRef" "Distribution.SPDX.LicenseReference" "Cabal-syntax-3.12.1.0-5c0e" '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)))

Methods

from :: LicenseRef -> Rep LicenseRef x #

to :: Rep LicenseRef x -> LicenseRef #

Read LicenseRef Source # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods readsPrec :: Int -> ReadS LicenseRef # readList :: ReadS [LicenseRef] # readPrec :: ReadPrec LicenseRef # readListPrec :: ReadPrec [LicenseRef] #
Show LicenseRef Source # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods showsPrec :: Int -> LicenseRef -> ShowS # show :: LicenseRef -> String # showList :: [LicenseRef] -> ShowS #
Eq LicenseRef Source # |
Instance details Defined in Distribution.SPDX.LicenseReference Methods (==) :: LicenseRef -> LicenseRef -> Bool # (/=) :: LicenseRef -> LicenseRef -> Bool #
Ord LicenseRef Source # |
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 #
type Rep LicenseRef Source # |

Instance details

Defined in Distribution.SPDX.LicenseReference

type Rep LicenseRef = D1 ('MetaData "LicenseRef" "Distribution.SPDX.LicenseReference" "Cabal-syntax-3.12.1.0-5c0e" '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 Source #

License reference.

licenseDocumentRef :: LicenseRef -> Maybe String Source #

Document reference.

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

Create `LicenseRef` from optional document ref and name.

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

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