language-boogie-0.2: Interpreter and language infrastructure for Boogie.

Safe HaskellNone

Language.Boogie.PrettyPrinter

Contents

Description

Pretty printer for Boogie 2

Synopsis

Pretty-printing programs

programDoc :: Program -> DocSource

Pretty-printed program

renderWithTabs :: Doc -> StringSource

Render document with tabs instead of spaces

typeDoc :: Type -> DocSource

Pretty-printed type

exprDoc :: Expression -> DocSource

Pretty-printed expression

statementDoc :: Statement -> DocSource

Pretty-printed statement

declDoc :: Decl -> DocSource

Pretty-printed top-level declaration

Functions and procedures

fdefDoc :: Bool -> FDef -> DocSource

fdefDoc isDef fdef : fdef pretty-printed as definition if isDef and as constraint otherwise

constraintSetDoc :: ConstraintSet -> DocSource

Pretty-printed constraint set

abstractStoreDoc :: AbstractStore -> DocSource

Pretty-printed abstract store

Utility

newline :: DocSource

New line

vsep :: [Doc] -> DocSource

Separate by new lines

commaSep :: [Doc] -> DocSource

Separate by commas

angles :: Doc -> DocSource

Enclose in < >

spaces :: Doc -> DocSource

Enclose in spaces

option :: Bool -> Doc -> DocSource

Conditionally produce a doc

optionMaybe :: Maybe t -> (t -> Doc) -> DocSource

Convert a Just value to doc

unOpDoc :: UnOp -> DocSource

Pretty-printed unary operator

binOpDoc :: BinOp -> DocSource

Pretty-printed binary operator

sigDoc :: [Type] -> [Type] -> DocSource

Pretty-printed function or procedure signature