scyther-proof-0.3.0: Automatic generation of Isabelle/HOL correctness proofs for security protocols.

Text.PrettyPrint.Class

Description

Document class allowing to have different interpretations of the HughesPJ pretty-printing combinators.

Synopsis

Documentation

data Doc

The abstract type of documents. The Show instance is equivalent to using render.

Instances

class Document d whereSource

Methods

char :: Char -> dSource

text :: String -> dSource

zeroWidthText :: String -> dSource

emptyDoc :: dSource

(<>) :: d -> d -> dSource

(<->) :: d -> d -> dSource

hcat :: [d] -> dSource

hsep :: [d] -> dSource

($$) :: d -> d -> dSource

($-$) :: d -> d -> dSource

vcat :: [d] -> dSource

sep :: [d] -> dSource

cat :: [d] -> dSource

fsep :: [d] -> dSource

fcat :: [d] -> dSource

nest :: Int -> d -> dSource

caseEmptyDoc :: d -> d -> d -> dSource

Instances

isEmpty :: Doc -> Bool

Returns True if the document is empty

render :: Doc -> String

Renders the document as a string using the default style.

renderStyle :: Style -> Doc -> String

Render the document as a string using a specified style.

style :: Style

The default style (mode=PageMode, lineLength=100, ribbonsPerLine=1.5).

data Style

A rendering style.

Constructors

Style 

Fields

mode :: Mode

The rendering mode

lineLength :: Int

Length of line, in chars

ribbonsPerLine :: Float

Ratio of ribbon length to line length

data Mode

Rendering mode.

Constructors

PageMode

Normal

ZigZagMode

With zig-zag cuts

LeftMode

No indentation, infinitely long lines

OneLineMode

All on one line

($--$) :: Document d => d -> d -> dSource

Vertical concatentation of two documents with an empty line in between.

int :: Document d => Int -> dSource

quotes :: Document d => d -> dSource

parens :: Document d => d -> dSource

brackets :: Document d => d -> dSource

braces :: Document d => d -> dSource

hang :: Document d => d -> Int -> d -> dSource

punctuate :: Document d => d -> [d] -> [d]Source