Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- class Sep sep where
- prettySep :: P sep -> [Doc] -> Doc
- parseSep :: CabalParsing m => P sep -> m a -> m [a]
- 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 FilePathNT = FilePathNT {}
List
Modifiers
Vertical list with commas. Displayed with vcat
Paragraph fill list with commas. Displayed with fsep
Vertical list with optional commas. Displayed with vcat
.
Paragraph fill list with optional commas. Displayed with fsep
.
data NoCommaFSep Source #
Paragraph fill list without commas. Displayed with fsep
.
Instances
Sep NoCommaFSep Source # | |
Defined in Distribution.Parsec.Newtypes prettySep :: P NoCommaFSep -> [Doc] -> Doc Source # parseSep :: CabalParsing m => P NoCommaFSep -> m a -> m [a] Source # |
prettySep :: P sep -> [Doc] -> Doc Source #
parseSep :: CabalParsing m => P sep -> m a -> m [a] Source #
Type
List separated with optional commas. Displayed with sep
, arguments of
type a
are parsed and pretty-printed as b
.
Instances
Newtype [a] (List sep wrapper a) Source # | |
(Newtype a b, Sep sep, Pretty b) => Pretty (List sep b a) Source # | |
Defined in Distribution.Parsec.Newtypes | |
(Newtype a b, Sep sep, Parsec b) => Parsec (List sep b a) Source # | |
Defined in Distribution.Parsec.Newtypes parsec :: CabalParsing m => m (List sep b a) Source # |
Version & License
newtype SpecVersion Source #
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
Instances
Pretty SpecVersion Source # | |
Defined in Distribution.Parsec.Newtypes pretty :: SpecVersion -> Doc Source # prettyVersioned :: CabalSpecVersion -> SpecVersion -> Doc Source # | |
Parsec SpecVersion Source # | |
Defined in Distribution.Parsec.Newtypes parsec :: CabalParsing m => m SpecVersion Source # | |
Newtype (Either Version VersionRange) SpecVersion Source # | |
Defined in Distribution.Parsec.Newtypes pack :: Either Version VersionRange -> SpecVersion Source # unpack :: SpecVersion -> Either Version VersionRange Source # |
newtype TestedWith Source #
Version range or just version
Instances
Pretty TestedWith Source # | |
Defined in Distribution.Parsec.Newtypes pretty :: TestedWith -> Doc Source # prettyVersioned :: CabalSpecVersion -> TestedWith -> Doc Source # | |
Parsec TestedWith Source # | |
Defined in Distribution.Parsec.Newtypes parsec :: CabalParsing m => m TestedWith Source # | |
Newtype (CompilerFlavor, VersionRange) TestedWith Source # | |
Defined in Distribution.Parsec.Newtypes pack :: (CompilerFlavor, VersionRange) -> TestedWith Source # unpack :: TestedWith -> (CompilerFlavor, VersionRange) Source # |
newtype SpecLicense Source #
SPDX License expression or legacy license
Instances
Pretty SpecLicense Source # | |
Defined in Distribution.Parsec.Newtypes pretty :: SpecLicense -> Doc Source # prettyVersioned :: CabalSpecVersion -> SpecLicense -> Doc Source # | |
Parsec SpecLicense Source # | |
Defined in Distribution.Parsec.Newtypes parsec :: CabalParsing m => m SpecLicense Source # | |
Newtype (Either License License) SpecLicense Source # | |
Defined in Distribution.Parsec.Newtypes |
Identifiers
Haskell string or [^ ,]+
Haskell string or [^ ]+
Either "quoted"
or un-quoted
.
MQuoted | |
|
newtype FilePathNT Source #
Filepath are parsed as Token
.
Instances
Pretty FilePathNT Source # | |
Defined in Distribution.Parsec.Newtypes pretty :: FilePathNT -> Doc Source # prettyVersioned :: CabalSpecVersion -> FilePathNT -> Doc Source # | |
Parsec FilePathNT Source # | |
Defined in Distribution.Parsec.Newtypes parsec :: CabalParsing m => m FilePathNT Source # | |
Newtype String FilePathNT Source # | |
Defined in Distribution.Parsec.Newtypes pack :: String -> FilePathNT Source # unpack :: FilePathNT -> String Source # |