Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data CopyrightDescription = CopyrightDescription {}
- data FilesOrLicenseDescription
- = FilesDescription { }
- | LicenseDescription { }
- format :: Lens' CopyrightDescription URI
- upstreamName :: Lens' CopyrightDescription (Maybe Text)
- upstreamContact :: Lens' CopyrightDescription (Maybe Text)
- upstreamSource :: Lens' CopyrightDescription (Maybe Text)
- disclaimer :: Lens' CopyrightDescription (Maybe Text)
- summaryComment :: Lens' CopyrightDescription (Maybe Text)
- summaryLicense :: Lens' CopyrightDescription (Maybe (License, Maybe Text))
- summaryCopyright :: Lens' CopyrightDescription (Maybe Text)
- filesAndLicenses :: Lens' CopyrightDescription [FilesOrLicenseDescription]
- filesPattern :: Traversal' FilesOrLicenseDescription FilePath
- filesCopyright :: Traversal' FilesOrLicenseDescription Text
- filesLicense :: Traversal' FilesOrLicenseDescription License
- filesLicenseText :: Traversal' FilesOrLicenseDescription (Maybe Text)
- filesComment :: Traversal' FilesOrLicenseDescription (Maybe Text)
- license :: Traversal' FilesOrLicenseDescription License
- licenseText :: Traversal' FilesOrLicenseDescription (Maybe Text)
- comment :: Traversal' FilesOrLicenseDescription (Maybe Text)
- readCopyrightDescription :: Text -> CopyrightDescription
- parseCopyrightDescription :: [Paragraph' Text] -> Maybe CopyrightDescription
- defaultCopyrightDescription :: PackageDescription -> IO CopyrightDescription
Documentation
data CopyrightDescription Source #
Description of the machine readable debian/copyright file. A special case is used to represeent the old style free format file - if the value is equal to newCopyrightDescription except for the field _summaryComment, the text in _summaryComment is the copyright file.
Lenses
Builders
readCopyrightDescription :: Text -> CopyrightDescription Source #
Read a CopyrightDescription
from the text one might obtain from
a debian/copyright
file.
parseCopyrightDescription :: [Paragraph' Text] -> Maybe CopyrightDescription Source #
Try to parse a structured copyright file
defaultCopyrightDescription :: PackageDescription -> IO CopyrightDescription Source #
Infer a CopyrightDescription
from a Cabal package description.
This will try to read any copyright files listed in the cabal
configuration. Inputs include the license field from the cabal
file, the contents of the license files mentioned there, and the
provided copyright0
value.