Copyright | (c) 2019-2021 Vaclav Svejcar |
---|---|
License | BSD-3-Clause |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
This module contains custom readers required by the optparse-applicative
library to parse data types such as LicenseType
or FileType
.
Synopsis
Documentation
licenseReader :: ReadM (LicenseType, FileType) Source #
Reader for tuple of LicenseType
and FileType
.
licenseTypeReader :: ReadM LicenseType Source #
Reader for LicenseType
.
parseLicense :: Text -> Maybe (LicenseType, FileType) Source #
Parses LicenseType
and FileType
from the input string,
formatted as licenseType:fileType
.
>>>
parseLicense "bsd3:haskell"
Just (BSD3,Haskell)