uhc-util-0.1.3.0: UHC utilities

Safe HaskellNone

UHC.Util.Pretty

Contents

Synopsis

Documentation

Choice combinators

(>-|-<) :: (PP a, PP b) => a -> b -> PP_DocSource

As (>|but doing (-<) when does not fit on single line

(>-#-<) :: (PP a, PP b) => a -> b -> PP_DocSource

As (>#but doing (-<) when does not fit on single line

General PP for list

ppListSep :: (PP s, PP c, PP o, PP a) => o -> c -> s -> [a] -> PP_DocSource

PP list with open, separator, and close

ppListSepV :: (PP s, PP c, PP o, PP a) => o -> c -> s -> [a] -> PP_DocSource

Deprecated: Use pp...Block variants

ppListSepVV :: (PP s, PP c, PP o, PP a) => o -> c -> s -> [a] -> PP_DocSource

Deprecated: Use pp...Block variants

Pack PP around

ppCurlys :: PP p => p -> PP_DocSource

ppPacked :: (PP o, PP c, PP p) => o -> c -> p -> PP_DocSource

ppParens :: PP p => p -> PP_DocSource

ppCurly :: PP p => p -> PP_DocSource

ppVBar :: PP p => p -> PP_DocSource

Block, horizontal/vertical as required

ppBlock :: (PP ocs, PP a) => ocs -> ocs -> ocs -> [a] -> PP_DocSource

PP list with open, separator, and close in a possibly multiline block structure

ppBlockH :: (PP ocs, PP a) => ocs -> ocs -> ocs -> [a] -> PP_DocSource

PP list with open, separator, and close in a possibly multiline block structure

ppBlock' :: (PP ocs, PP a) => ocs -> ocs -> ocs -> ocs -> [a] -> [PP_Doc]Source

ppBlockWithStrings :: PP a => String -> String -> String -> [a] -> PP_DocSource

See ppBlock, but with string delimiters aligned properly

ppBlockWithStrings' :: PP a => String -> String -> String -> [a] -> [PP_Doc]Source

See ppBlock, but with string delimiters aligned properly, yielding a list of elements

ppParensCommasBlock :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with (, ,, and ) in a possibly multiline block structure

ppCurlysBlock :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with {, , and } in a possibly multiline block structure

ppCurlysSemisBlock :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with {, ;, and } in a possibly multiline block structure

ppCurlysCommasBlock :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with {, ,, and } in a possibly multiline block structure

ppParensSemisBlock :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with (, ;, and ) in a possibly multiline block structure

ppBracketsCommasBlock :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with [, ,, and ] in a possibly multiline block structure

ppParensCommasBlockH :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with (, ,, and ) in a possibly multiline block structure

ppCurlysBlockH :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with {, , and } in a possibly multiline block structure

ppCurlysSemisBlockH :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with {, ;, and } in a possibly multiline block structure

ppCurlysCommasBlockH :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with {, ,, and } in a possibly multiline block structure

ppParensSemisBlockH :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with (, ;, and ) in a possibly multiline block structure

ppBracketsCommasBlockH :: PP a => [a] -> PP_DocSource

PP horizontally or vertically with [, ,, and ] in a possibly multiline block structure

ppBracketsCommasV :: PP a => [a] -> PP_DocSource

Deprecated: Use ppBracketsCommasBlock

PP horizontally or vertically with [, ,, and ] in a possibly multiline block structure

Vertical PP of list only

Horizontal PP of list only

ppCommas :: PP a => [a] -> PP_DocSource

PP horizontally: list separated by comma

ppCommas' :: PP a => [a] -> PP_DocSource

PP horizontally: list separated by comma + single blank

ppSemis :: PP a => [a] -> PP_DocSource

PP horizontally: list separated by semicolon

ppSemis' :: PP a => [a] -> PP_DocSource

PP horizontally: list separated by semicolon + single blank

ppSpaces :: PP a => [a] -> PP_DocSource

PP horizontally: list separated by single blank

ppCurlysCommas :: PP a => [a] -> PP_DocSource

PP horizontally with {, ,, and }

ppCurlysCommas' :: PP a => [a] -> PP_DocSource

PP horizontally with {, , , and }

ppCurlysCommasWith :: PP a => (a -> PP_Doc) -> [a] -> PP_DocSource

ppCurlysSemis :: PP a => [a] -> PP_DocSource

PP horizontally with {, ;, and }

ppCurlysSemis' :: PP a => [a] -> PP_DocSource

PP horizontally with {, ; , and }

ppParensSpaces :: PP a => [a] -> PP_DocSource

PP horizontally with (, , and )

ppParensCommas :: PP a => [a] -> PP_DocSource

PP horizontally with (, ,, and )

ppParensCommas' :: PP a => [a] -> PP_DocSource

PP horizontally with (, , , and )

ppBracketsCommas :: PP a => [a] -> PP_DocSource

PP horizontally with [, ,, and ]

ppBracketsCommas' :: PP a => [a] -> PP_DocSource

PP horizontally with [, , , and ]

ppListSepFill :: (PP s, PP c, PP o, PP a) => o -> c -> s -> [a] -> PP_DocSource

Deprecated: Use ppListSep

Conditional

ppMbPre :: (PP x, PP r) => (a -> x) -> Maybe a -> r -> PP_DocSource

Only prefix with a Maybe and extra space when Just

ppMbPost :: (PP x, PP r) => (a -> x) -> Maybe a -> r -> PP_DocSource

Only suffix with a Maybe and extra space when Just

ppListPre :: (PP x, PP r) => ([a] -> x) -> [a] -> r -> PP_DocSource

Only prefix with a list and extra space when non-empty

ppListPost :: (PP x, PP r) => ([a] -> x) -> [a] -> r -> PP_DocSource

Only suffix with a list and extra space when non-empty

Misc

ppDots :: PP a => [a] -> PP_DocSource

ppMb :: PP a => Maybe a -> PP_DocSource

ppUnless :: PP x => Bool -> x -> PP_DocSource

Guard around PP: if False pass through

ppWhen :: PP x => Bool -> x -> PP_DocSource

Guard around PP: if True pass through

IO