Cabal-syntax-3.11.0.0: A library for working with .cabal files
Safe HaskellNone
LanguageHaskell2010

Distribution.FieldGrammar.Pretty

Synopsis

Documentation

data PrettyFieldGrammar s a Source #

Instances

Instances details
FieldGrammar Pretty PrettyFieldGrammar Source # 
Instance details

Defined in Distribution.FieldGrammar.Pretty

Methods

blurFieldGrammar :: ALens' a b -> PrettyFieldGrammar b d -> PrettyFieldGrammar a d Source #

uniqueFieldAla :: (Pretty b, Newtype a b) => FieldName -> (a -> b) -> ALens' s a -> PrettyFieldGrammar s a Source #

booleanFieldDef :: FieldName -> ALens' s Bool -> Bool -> PrettyFieldGrammar s Bool Source #

optionalFieldAla :: (Pretty b, Newtype a b) => FieldName -> (a -> b) -> ALens' s (Maybe a) -> PrettyFieldGrammar s (Maybe a) Source #

optionalFieldDefAla :: (Pretty b, Newtype a b, Eq a) => FieldName -> (a -> b) -> ALens' s a -> a -> PrettyFieldGrammar s a Source #

freeTextField :: FieldName -> ALens' s (Maybe String) -> PrettyFieldGrammar s (Maybe String) Source #

freeTextFieldDef :: FieldName -> ALens' s String -> PrettyFieldGrammar s String Source #

freeTextFieldDefST :: FieldName -> ALens' s ShortText -> PrettyFieldGrammar s ShortText Source #

monoidalFieldAla :: (Pretty b, Monoid a, Newtype a b) => FieldName -> (a -> b) -> ALens' s a -> PrettyFieldGrammar s a Source #

prefixedFields :: FieldName -> ALens' s [(String, String)] -> PrettyFieldGrammar s [(String, String)] Source #

knownField :: FieldName -> PrettyFieldGrammar s () Source #

hiddenField :: PrettyFieldGrammar s a -> PrettyFieldGrammar s a Source #

deprecatedSince :: CabalSpecVersion -> String -> PrettyFieldGrammar s a -> PrettyFieldGrammar s a Source #

removedIn :: CabalSpecVersion -> String -> PrettyFieldGrammar s a -> PrettyFieldGrammar s a Source #

availableSince :: CabalSpecVersion -> a -> PrettyFieldGrammar s a -> PrettyFieldGrammar s a Source #

availableSinceWarn :: CabalSpecVersion -> PrettyFieldGrammar s a -> PrettyFieldGrammar s a Source #

Applicative (PrettyFieldGrammar s) Source # 
Instance details

Defined in Distribution.FieldGrammar.Pretty

Functor (PrettyFieldGrammar s) Source # 
Instance details

Defined in Distribution.FieldGrammar.Pretty

Methods

fmap :: (a -> b) -> PrettyFieldGrammar s a -> PrettyFieldGrammar s b #

(<$) :: a -> PrettyFieldGrammar s b -> PrettyFieldGrammar s a #

prettyFieldGrammar :: CabalSpecVersion -> PrettyFieldGrammar s a -> s -> [PrettyField ()] Source #

We can use PrettyFieldGrammar to pp print the s.

Note: there is not trailing ($+$ text "").