Cabal-3.2.1.0: A framework for packaging Haskell software
Safe Haskell None
Language Haskell2010

Distribution.Parsec.Newtypes

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

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

Defined in Distribution.Parsec.Newtypes

Methods

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

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

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

Defined in Distribution.Parsec.Newtypes

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

Defined in Distribution.Parsec.Newtypes

Set

alaSet :: sep -> Set a -> Set' sep ( Identity a) a Source #

alaSet and alaSet' are simply Set' constructor, with additional phantom arguments to constraint the resulting type

>>> :t alaSet VCat
alaSet VCat :: Set a -> Set' VCat (Identity a) a
>>> :t alaSet' FSep Token
alaSet' FSep Token :: Set String -> Set' FSep Token String
>>> unpack' (alaSet' FSep Token) <$> eitherParsec "foo bar foo"
Right (fromList ["bar","foo"])

Since: 3.2.0.0

alaSet' :: sep -> (a -> b) -> Set a -> Set' sep b a Source #

More general version of alaSet .

Since: 3.2.0.0

data Set' sep b a Source #

Like List , but for Set .

Since: 3.2.0.0

Version & License

Identifiers