libcspm-1.0.0: A library providing a parser, type checker and evaluator for CSPM.

Safe HaskellSafe-Inferred

Util.PrettyPrint

Synopsis

Documentation

class PrettyPrintable a whereSource

Methods

prettyPrint :: a -> DocSource

Instances

PrettyPrintable SrcSpan 
PrettyPrintable Literal 
PrettyPrintable ErrorMessage 
PrettyPrintable ErrorMessages 
PrettyPrintable ScopeIdentifier 
PrettyPrintable Value 
PrettyPrintable UnCompiledProc 
PrettyPrintable ProcName 
PrettyPrintable Event 
PrettyPrintable ValueSet 
PrettyPrintable Name 
PrettyPrintable UnRenamedName 
PrettyPrintable OccName 
PrettyPrintable Type 
PrettyPrintable Constraint 
PrettyPrintable TypeScheme 
PrettyPrintable TypeVar 
PrettyPrintable SemanticProperty 
PrettyPrintable Model 
PrettyPrintable BinaryMathsOp 
PrettyPrintable UnaryMathsOp 
PrettyPrintable UnaryBooleanOp 
PrettyPrintable BinaryBooleanOp 
PrettyPrintable Token 
PrettyPrintable ProfilingData 
PrettyPrintable [b] => PrettyPrintable [Annotated a b] 
PrettyPrintable (Seq Event) 
PrettyPrintable a => PrettyPrintable (Located a) 
PrettyPrintable id => PrettyPrintable (SType id) 
PrettyPrintable id => PrettyPrintable (STypeConstraint id) 
PrettyPrintable id => PrettyPrintable (STypeScheme id) 
PrettyPrintable id => PrettyPrintable (Pat id) 
PrettyPrintable id => PrettyPrintable (DataTypeClause id) 
PrettyPrintable id => PrettyPrintable (ModelOption id) 
PrettyPrintable id => PrettyPrintable (Assertion id) 
PrettyPrintable id => PrettyPrintable (Decl id) 
PrettyPrintable id => PrettyPrintable (InteractiveStmt id) 
PrettyPrintable id => PrettyPrintable (Stmt id) 
PrettyPrintable id => PrettyPrintable (Field id) 
PrettyPrintable id => PrettyPrintable (Exp id) 
PrettyPrintable id => PrettyPrintable (CSPMFile id) 
PrettyPrintable b => PrettyPrintable (Annotated a b) 
(Foldable seq, MonadicPrettyPrintable Identity evs) => PrettyPrintable (ProcOperator seq evs) 

tabWidth :: IntSource

The width, in spaces, of a tab character.

tabIndent :: Doc -> DocSource

Indent a document by tabWidth characters, on each line (uses nest).

shortDouble :: Int -> Double -> DocSource

Show a double d printing only places places after the decimal place.

commaSeparatedInt :: Int -> DocSource

Pretty prints an integer and separates it into groups of 3, separated by commas.

angles :: Doc -> DocSource

Surrounds a Doc with < and >.

bars :: Doc -> DocSource

Surrounds a Doc with '|'.

list :: [Doc] -> DocSource

Separates a list of Docs by ','.

dotSep :: [Doc] -> DocSource

Separates a list of Docs by ..

speakNth :: Int -> DocSource

Converts a number into first, second etc.

punctuateFront :: Doc -> [Doc] -> [Doc]Source

Equivalent to [d1, sep d2, sep d3, ...].