Copyright | (c) 2017-2020 Kowainik |
---|---|
License | MPL-2.0 |
Maintainer | Kowainik <xrom.xkov@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Data types that represent license names and license content and functions to work with them.
Synopsis
- data LicenseName
- newtype License = License {}
- customizeLicense :: LicenseName -> License -> Text -> Text -> License
- githubLicenseQueryNames :: LicenseName -> Text
- parseLicenseName :: Text -> Maybe LicenseName
- fetchLicense :: LicenseName -> IO License
- fetchLicenseCustom :: LicenseName -> Text -> Text -> IO License
- licenseShortDesc :: LicenseName -> Text
- showLicenseWithDesc :: LicenseName -> Text
Documentation
data LicenseName Source #
Licenses supported by summoner
.
Instances
customizeLicense :: LicenseName -> License -> Text -> Text -> License Source #
Replaces name/year placeholders with the actual data.
githubLicenseQueryNames :: LicenseName -> Text Source #
Used for downloading the license text form Github
.
parseLicenseName :: Text -> Maybe LicenseName Source #
fetchLicense :: LicenseName -> IO License Source #
Download the given LICENSE text as it is from GitHub API.
fetchLicenseCustom :: LicenseName -> Text -> Text -> IO License Source #
Fetches the license by given name and customises user information where applicable.
licenseShortDesc :: LicenseName -> Text Source #
Show short information for the LicenseName
.
showLicenseWithDesc :: LicenseName -> Text Source #
Show license name along with its short description.