Safe Haskell | Safe-Inferred |
---|
Pretty-printing of Bash scripts. This tries to stay close to the format
used by the Bash builtin declare -f
.
- class Pretty a where
- pretty :: a -> Doc
- prettyList :: [a] -> Doc
- prettyText :: Pretty a => a -> String
Documentation
A class of types which may be pretty-printed.
Pretty-print to a Doc
.
prettyList :: [a] -> DocSource
Pretty-print a list. By default, this separates each element with
a space using hsep
.
Pretty Char | |
Pretty Doc | |
Pretty BinaryOp | |
Pretty UnaryOp | |
Pretty CondExpr | |
Pretty RValue | |
Pretty AssignOp | |
Pretty LValue | |
Pretty Assign | |
Pretty Pipeline | |
Pretty AndOr | |
Pretty ListTerm | |
Pretty Statement | |
Pretty List | |
Pretty CaseTerm | |
Pretty CaseClause | |
Pretty ShellCommand | |
Pretty RedirOp | A redirection operator. |
Pretty IODesc | |
Pretty Redir | |
Pretty Command | |
Pretty a => Pretty [a] | |
Pretty a => Pretty (Maybe a) | |
(Pretty a, Pretty b) => Pretty (Either a b) |
prettyText :: Pretty a => a -> StringSource
Pretty-print to a String
.