| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Parsec.Newtypes
Description
This module provides newtype wrappers to be used with Distribution.FieldGrammar.
Synopsis
- alaList :: sep -> [a] -> List sep (Identity a) a
- alaList' :: sep -> (a -> b) -> [a] -> List sep b a
- data CommaVCat = CommaVCat
- data CommaFSep = CommaFSep
- data VCat = VCat
- data FSep = FSep
- data NoCommaFSep = NoCommaFSep
- data List sep b a
- newtype SpecVersion = SpecVersion {}
- newtype TestedWith = TestedWith {}
- newtype SpecLicense = SpecLicense {}
- newtype Token = Token {}
- newtype Token' = Token' {}
- newtype MQuoted a = MQuoted {
- getMQuoted :: a
- newtype FreeText = FreeText {}
- newtype FilePathNT = FilePathNT {}
List
Modifiers
Type
List separated with optional commas. Displayed with sep, arguments of
type a are parsed and pretty-printed as b.
Version & License
newtype SpecVersion #
Version range or just version, i.e. cabal-version field.
There are few things to consider:
- Starting with 2.2 the cabal-version field should be the first field in the
file and only exact version is accepted. Therefore if we get e.g.
>= 2.2, we fail. See https://github.com/haskell/cabal/issues/4899
Constructors
| SpecVersion | |
Fields | |
Instances
| Pretty SpecVersion # | |
Defined in Distribution.Parsec.Newtypes Methods pretty :: SpecVersion -> Doc # | |
| Parsec SpecVersion # | |
Defined in Distribution.Parsec.Newtypes Methods parsec :: CabalParsing m => m SpecVersion # | |
| Newtype SpecVersion (Either Version VersionRange) # | |
Defined in Distribution.Parsec.Newtypes Methods pack :: Either Version VersionRange -> SpecVersion # unpack :: SpecVersion -> Either Version VersionRange # | |
newtype TestedWith #
Version range or just version
Constructors
| TestedWith | |
Fields | |
Instances
| Pretty TestedWith # | |
Defined in Distribution.Parsec.Newtypes Methods pretty :: TestedWith -> Doc # | |
| Parsec TestedWith # | |
Defined in Distribution.Parsec.Newtypes Methods parsec :: CabalParsing m => m TestedWith # | |
| Newtype TestedWith (CompilerFlavor, VersionRange) # | |
Defined in Distribution.Parsec.Newtypes Methods pack :: (CompilerFlavor, VersionRange) -> TestedWith # unpack :: TestedWith -> (CompilerFlavor, VersionRange) # | |
newtype SpecLicense #
SPDX License expression or legacy license
Constructors
| SpecLicense | |
Fields | |
Instances
| Pretty SpecLicense # | |
Defined in Distribution.Parsec.Newtypes Methods pretty :: SpecLicense -> Doc # | |
| Parsec SpecLicense # | |
Defined in Distribution.Parsec.Newtypes Methods parsec :: CabalParsing m => m SpecLicense # | |
| Newtype SpecLicense (Either License License) # | |
Defined in Distribution.Parsec.Newtypes | |
Identifiers
Haskell string or [^ ,]+
Haskell string or [^ ]+
Either "quoted" or un-quoted.
Constructors
| MQuoted | |
Fields
| |
This is almost , but itmany anyChar
- trims whitespace from ends of the lines,
- converts lines with only single dot into empty line.
Constructors
| FreeText | |
Fields | |
newtype FilePathNT #
Filepath are parsed as Token.
Constructors
| FilePathNT | |
Fields | |
Instances
| Pretty FilePathNT # | |
Defined in Distribution.Parsec.Newtypes Methods pretty :: FilePathNT -> Doc # | |
| Parsec FilePathNT # | |
Defined in Distribution.Parsec.Newtypes Methods parsec :: CabalParsing m => m FilePathNT # | |
| Newtype FilePathNT String # | |
Defined in Distribution.Parsec.Newtypes | |