cabal-install-3.8.1.0: The command-line interface for Cabal and Hackage.
Copyright(c) Brent Yorgey 2009
LicenseBSD-like
Maintainercabal-devel@haskell.org
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.Client.Init.Format

Description

Pretty printing and field formatting utilities used for file creation.

Synopsis

cabal file formatters

field :: Pretty b => FieldName -> (a -> b) -> a -> [String] -> Bool -> WriteOpts -> PrettyField FieldAnnotation Source #

Construct a PrettyField from a field that can be automatically converted to a Doc via display.

fieldD Source #

Arguments

:: FieldName

Name of the field

-> Doc

Field contents

-> [String]

Comment to explain the field

-> Bool

Should the field be included (commented out) even if blank?

-> WriteOpts 
-> PrettyField FieldAnnotation 

Construct a PrettyField from a Doc Flag.

commentedOutWithComments :: CommentPosition -> FieldAnnotation Source #

A field annotation instructing the pretty printer to comment out the field and any contents, with no comments.

withComments :: CommentPosition -> FieldAnnotation Source #

A field annotation with the specified comment lines.

annNoComments :: FieldAnnotation Source #

A field annotation with no comments.

stanza generation