Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cabal-like file AST types: Field
, Section
etc,
This (intermediate) data type is used for pretty-printing.
Since: Cabal-3.0.0.0
Synopsis
- data PrettyField
- showFields :: [PrettyField] -> String
- showFields' :: Int -> [PrettyField] -> String
- fromParsecFields :: [Field ann] -> [PrettyField]
- genericFromParsecFields :: Applicative f => (FieldName -> [FieldLine ann] -> f Doc) -> (FieldName -> [SectionArg ann] -> f [Doc]) -> [Field ann] -> f [PrettyField]
- prettyFieldLines :: FieldName -> [FieldLine ann] -> Doc
- prettySectionArgs :: FieldName -> [SectionArg ann] -> [Doc]
Fields
showFields :: [PrettyField] -> String Source #
Prettyprint a list of fields.
showFields' :: Int -> [PrettyField] -> String Source #
showFields
with user specified indentation.
Transformation from Field
fromParsecFields :: [Field ann] -> [PrettyField] Source #
Simple variant of genericFromParsecField
genericFromParsecFields Source #
:: Applicative f | |
=> (FieldName -> [FieldLine ann] -> f Doc) | transform field contents |
-> (FieldName -> [SectionArg ann] -> f [Doc]) | transform section arguments |
-> [Field ann] | |
-> f [PrettyField] |
prettyFieldLines :: FieldName -> [FieldLine ann] -> Doc Source #
Used in fromParsecFields
.
prettySectionArgs :: FieldName -> [SectionArg ann] -> [Doc] Source #
Used in fromParsecFields
.