language-bash-0.2.0: Parsing and pretty-printing Bash shell scripts

Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Bash.Pretty

Description

Pretty-printing of Bash scripts. This tries to stay close to the format used by the Bash builtin declare -f.

Synopsis

Documentation

class Pretty a where Source

A class of types which may be pretty-printed.

Minimal complete definition

pretty

Methods

pretty :: a -> Doc Source

Pretty-print to a Doc.

prettyList :: [a] -> Doc Source

Pretty-print a list. By default, this separates each element with a space using hsep.

render :: Doc -> String

Render the Doc to a String using the default Style.