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

Safe HaskellSafe
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

($+$) :: Doc ann -> Doc ann -> Doc ann Source #

x $+$ y concatenates x and y with a line in between

($++$) :: Doc ann -> Doc ann -> Doc ann Source #

Behaves like $+$ except that if one of the documents was empty we do not concatenate at all. mempty is the identity of $+$:

x $++$ mempty == x

and

mempty $++$ y == y

(<++>) :: Doc ann -> Doc ann -> Doc ann Source #

Behaves like <+> except that if one of the documents was empty we do not concatenate at all. mempty is the identity of <+>:

x <++> mempty == x

and

mempty <++> y == y

prettyText :: Pretty a => a -> String Source #

Pretty-print to a String.