Cabal-2.2.0.0: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.Parsec.Newtypes

Contents

Description

This module provides newtype wrappers to be used with Distribution.FieldGrammar.

Synopsis

List

alaList :: sep -> [a] -> List sep (Identity a) a Source #

alaList and alaList' are simply List, with additional phantom arguments to constraint the resulting type

>>> :t alaList VCat
alaList VCat :: [a] -> List VCat (Identity a) a
>>> :t alaList' FSep Token
alaList' FSep Token :: [String] -> List FSep Token String

alaList' :: sep -> (a -> b) -> [a] -> List sep b a Source #

More general version of alaList.

Modifiers

data CommaVCat Source #

Vertical list with commas. Displayed with vcat

Constructors

CommaVCat 

data CommaFSep Source #

Paragraph fill list with commas. Displayed with fsep

Constructors

CommaFSep 

data VCat Source #

Vertical list with optional commas. Displayed with vcat.

Constructors

VCat 

data FSep Source #

Paragraph fill list with optional commas. Displayed with fsep.

Constructors

FSep 

data NoCommaFSep Source #

Paragraph fill list without commas. Displayed with fsep.

Constructors

NoCommaFSep 

Type

data List sep b a Source #

List separated with optional commas. Displayed with sep, arguments of type a are parsed and pretty-printed as b.

Instances
(Newtype b a, Sep sep, Pretty b) => Pretty (List sep b a) Source # 
Instance details

Methods

pretty :: List sep b a -> Doc Source #

(Newtype b a, Sep sep, Parsec b) => Parsec (List sep b a) Source # 
Instance details

Methods

parsec :: CabalParsing m => m (List sep b a) Source #

Newtype (List sep wrapper a) [a] Source # 
Instance details

Methods

pack :: [a] -> List sep wrapper a Source #

unpack :: List sep wrapper a -> [a] Source #

Version & License

newtype SpecVersion Source #

Version range or just version, i.e. cabal-version field.

There are few things to consider:

newtype TestedWith Source #

Version range or just version

newtype SpecLicense Source #

SPDX License expression or legacy license

Identifiers

newtype Token Source #

Haskell string or [^ ,]+

Constructors

Token 

Fields

Instances
Pretty Token Source # 
Instance details

Methods

pretty :: Token -> Doc Source #

Parsec Token Source # 
Instance details

Methods

parsec :: CabalParsing m => m Token Source #

Newtype Token String Source # 
Instance details

newtype Token' Source #

Haskell string or [^ ]+

Constructors

Token' 

Fields

Instances
Pretty Token' Source # 
Instance details

Methods

pretty :: Token' -> Doc Source #

Parsec Token' Source # 
Instance details

Methods

parsec :: CabalParsing m => m Token' Source #

Newtype Token' String Source # 
Instance details

newtype MQuoted a Source #

Either "quoted" or un-quoted.

Constructors

MQuoted 

Fields

Instances
Pretty a => Pretty (MQuoted a) Source # 
Instance details

Methods

pretty :: MQuoted a -> Doc Source #

Parsec a => Parsec (MQuoted a) Source # 
Instance details

Methods

parsec :: CabalParsing m => m (MQuoted a) Source #

Newtype (MQuoted a) a Source # 
Instance details

Methods

pack :: a -> MQuoted a Source #

unpack :: MQuoted a -> a Source #

newtype FreeText Source #

This is almost many anyChar, but it

  • trims whitespace from ends of the lines,
  • converts lines with only single dot into empty line.

Constructors

FreeText 

Fields

Instances
Pretty FreeText Source # 
Instance details

Methods

pretty :: FreeText -> Doc Source #

Parsec FreeText Source # 
Instance details
Newtype FreeText String Source # 
Instance details

newtype FilePathNT Source #

Filepath are parsed as Token.

Constructors

FilePathNT 
Instances
Pretty FilePathNT Source # 
Instance details
Parsec FilePathNT Source # 
Instance details
Newtype FilePathNT String Source # 
Instance details