Cabal-2.4.0.0: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.FieldGrammar.FieldDescrs

Synopsis

Documentation

data FieldDescrs s a #

A collection field parsers and pretty-printers.

Instances
FieldGrammar FieldDescrs #

Note: default values are printed.

Instance details

Defined in Distribution.FieldGrammar.FieldDescrs

Methods

blurFieldGrammar :: ALens' a b -> FieldDescrs b c -> FieldDescrs a c #

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

booleanFieldDef :: FieldName -> ALens' s Bool -> Bool -> FieldDescrs s Bool #

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

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

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

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

knownField :: FieldName -> FieldDescrs s () #

hiddenField :: FieldDescrs s a -> FieldDescrs s a #

deprecatedSince :: [Int] -> String -> FieldDescrs s a -> FieldDescrs s a #

availableSince :: [Int] -> a -> FieldDescrs s a -> FieldDescrs s a #

Functor (FieldDescrs s) # 
Instance details

Defined in Distribution.FieldGrammar.FieldDescrs

Methods

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

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

Applicative (FieldDescrs s) # 
Instance details

Defined in Distribution.FieldGrammar.FieldDescrs

Methods

pure :: a -> FieldDescrs s a #

(<*>) :: FieldDescrs s (a -> b) -> FieldDescrs s a -> FieldDescrs s b #

liftA2 :: (a -> b -> c) -> FieldDescrs s a -> FieldDescrs s b -> FieldDescrs s c #

(*>) :: FieldDescrs s a -> FieldDescrs s b -> FieldDescrs s b #

(<*) :: FieldDescrs s a -> FieldDescrs s b -> FieldDescrs s a #

fieldDescrPretty :: FieldDescrs s a -> String -> Maybe (s -> Doc) #

Lookup a field value pretty-printer.

fieldDescrParse :: CabalParsing m => FieldDescrs s a -> String -> Maybe (s -> m s) #

Lookup a field value parser.

fieldDescrsToList :: CabalParsing m => FieldDescrs s a -> [(String, s -> Doc, s -> m s)] #