| Copyright | (c) 2019-2020 Vaclav Svejcar |
|---|---|
| License | BSD-3 |
| Maintainer | vaclav.svejcar@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Headroom.License
Description
This module provides data types and functions for representing various
opensource licenses, for which this application can generate Jinja templates.
As the template text itself of given license may differ based on target
programming language (i.e. syntax for comments is different), each License is
represented by the LicenseType and FileType.
Synopsis
- data License = License LicenseType FileType
- data LicenseType
- parseLicense :: Text -> Maybe License
- parseLicenseType :: Text -> Maybe LicenseType
Documentation
License (specified by LicenseType and FileType)
Constructors
| License LicenseType FileType |
data LicenseType Source #
Type of the license.
Constructors
| Apache2 | Apache License, version 2.0 |
| BSD3 | BSD-3 license |
| GPL2 | GNU GPL v.2 license |
| GPL3 | GNU GPL v.3 license |
| MIT | MIT license |
Instances
Parses License from the raw string representation, formatted as
licenseType:fileType.
>>>parseLicense "bsd3:haskell"Just (License BSD3 Haskell)
parseLicenseType :: Text -> Maybe LicenseType Source #
Parses LicenseType from the raw string representation.
>>>parseLicenseType "bsd3"Just BSD3