Distribution.FieldGrammar.FieldDescrs

Cabal-2.2.0.1: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.FieldGrammar.FieldDescrs

Synopsis

- data FieldDescrs s a
- fieldDescrPretty :: FieldDescrs s a -> String -> Maybe (s -> Doc)
- fieldDescrParse :: CabalParsing m => FieldDescrs s a -> String -> Maybe (s -> m s)
- fieldDescrsToList :: CabalParsing m => FieldDescrs s a -> [(String, s -> Doc, s -> m s)]

# Documentation

data FieldDescrs s a Source #

A collection field parsers and pretty-printers.

Instances

FieldGrammar FieldDescrs Source # | Note: default values are printed.
Instance details Defined in Distribution.FieldGrammar.FieldDescrs Methods blurFieldGrammar :: ALens' a b -> FieldDescrs b c -> FieldDescrs a c Source # uniqueFieldAla :: (Parsec b, Pretty b, Newtype b a) => FieldName -> (a -> b) -> ALens' s a -> FieldDescrs s a Source # booleanFieldDef :: FieldName -> ALens' s Bool -> Bool -> FieldDescrs s Bool Source # optionalFieldAla :: (Parsec b, Pretty b, Newtype b a) => FieldName -> (a -> b) -> ALens' s (Maybe a) -> FieldDescrs s (Maybe a) Source # optionalFieldDefAla :: (Parsec b, Pretty b, Newtype b a, Eq a) => FieldName -> (a -> b) -> ALens' s a -> a -> FieldDescrs s a Source # monoidalFieldAla :: (Parsec b, Pretty b, Monoid a, Newtype b a) => FieldName -> (a -> b) -> ALens' s a -> FieldDescrs s a Source # prefixedFields :: FieldName -> ALens' s [(String, String)] -> FieldDescrs s [(String, String)] Source # knownField :: FieldName -> FieldDescrs s () Source # hiddenField :: FieldDescrs s a -> FieldDescrs s a Source # deprecatedSince :: [Int] -> String -> FieldDescrs s a -> FieldDescrs s a Source # availableSince :: [Int] -> a -> FieldDescrs s a -> FieldDescrs s a Source #
Functor (FieldDescrs s) Source # |
Instance details Defined in Distribution.FieldGrammar.FieldDescrs Methods fmap :: (a -> b) -> FieldDescrs s a -> FieldDescrs s b Source # (<$) :: a -> FieldDescrs s b -> FieldDescrs s a Source #
Applicative (FieldDescrs s) Source # |
Instance details Defined in Distribution.FieldGrammar.FieldDescrs Methods pure :: a -> FieldDescrs s a Source # (<*>) :: FieldDescrs s (a -> b) -> FieldDescrs s a -> FieldDescrs s b Source # liftA2 :: (a -> b -> c) -> FieldDescrs s a -> FieldDescrs s b -> FieldDescrs s c Source # (*>) :: FieldDescrs s a -> FieldDescrs s b -> FieldDescrs s b Source # (<*) :: FieldDescrs s a -> FieldDescrs s b -> FieldDescrs s a Source #

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

Lookup a field value pretty-printer.

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

Lookup a field value parser.

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