language-bash-0.7.1: 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

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.

Instances
Pretty Char Source # 
Instance details

Defined in Language.Bash.Pretty

Pretty Doc Source # 
Instance details

Defined in Language.Bash.Pretty

Methods

pretty :: Doc -> Doc Source #

prettyList :: [Doc] -> Doc Source #

Pretty BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Pretty UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Pretty ProcessSubstOp Source # 
Instance details

Defined in Language.Bash.Word

Pretty Direction Source # 
Instance details

Defined in Language.Bash.Word

Pretty LetterCaseOp Source # 
Instance details

Defined in Language.Bash.Word

Pretty AltOp Source # 
Instance details

Defined in Language.Bash.Word

Pretty ParamSubst Source # 
Instance details

Defined in Language.Bash.Word

Pretty Parameter Source # 
Instance details

Defined in Language.Bash.Word

Pretty Span Source # 
Instance details

Defined in Language.Bash.Word

Pretty RValue Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty AssignOp Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty Assign Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty Pipeline Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty AndOr Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty ListTerm Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty Statement Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty List Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty HeredocOp Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty RedirOp Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty IODesc Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty Redir Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty CaseTerm Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty CaseClause Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty WordList Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty ShellCommand Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty Command Source # 
Instance details

Defined in Language.Bash.Syntax

Pretty TildePrefix Source # 
Instance details

Defined in Language.Bash.Expand

Pretty a => Pretty [a] Source # 
Instance details

Defined in Language.Bash.Pretty

Methods

pretty :: [a] -> Doc Source #

prettyList :: [[a]] -> Doc Source #

Pretty a => Pretty (Maybe a) Source # 
Instance details

Defined in Language.Bash.Pretty

Methods

pretty :: Maybe a -> Doc Source #

prettyList :: [Maybe a] -> Doc Source #

Pretty a => Pretty (CondExpr a) Source # 
Instance details

Defined in Language.Bash.Cond

(Pretty a, Pretty b) => Pretty (Either a b) Source # 
Instance details

Defined in Language.Bash.Pretty

Methods

pretty :: Either a b -> Doc Source #

prettyList :: [Either a b] -> Doc Source #

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

Pretty-print to a String.