Distribution.FieldGrammar.FieldDescrs

Cabal-syntax-3.12.0.0: A library for working with .cabal files

Safe Haskell | None
Language | Haskell2010

Distribution.FieldGrammar.FieldDescrs

Synopsis

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

# Documentation

data FieldDescrs s a Source #

A collection of field parsers and pretty-printers.

#### Instances

Instances details

Applicative (FieldDescrs s) Source # |
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 #
Functor (FieldDescrs s) Source # |
Instance details Defined in Distribution.FieldGrammar.FieldDescrs Methods fmap :: (a -> b) -> FieldDescrs s a -> FieldDescrs s b # (<$) :: a -> FieldDescrs s b -> FieldDescrs s a #

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

Lookup a field value pretty-printer.

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

Lookup a field value parser.

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