Cabal-2.5.0.0: A framework for packaging Haskell software
Safe HaskellNone
LanguageHaskell2010

Distribution.Fields.Pretty

Description

Cabal-like file AST types: Field, Section etc,

This (intermediate) data type is used for pretty-printing.

Since: Cabal-3.0.0.0

Synopsis

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 #

Arguments

:: Applicative f 
=> (FieldName -> [FieldLine ann] -> f Doc)

transform field contents

-> (FieldName -> [SectionArg ann] -> f [Doc])

transform section arguments

-> [Field ann] 
-> f [PrettyField]