Agda-2.3.2: A dependently typed functional programming language and proof assistant

Safe Haskell | Safe-Inferred

Agda.Utils.Pretty

Description

Pretty printing functions.

Synopsis

- class Pretty a where
  - pretty :: a -> Doc
  - prettyPrec :: Int -> a -> Doc
- pwords :: String -> [Doc]
- fwords :: String -> Doc
- mparens :: Bool -> Doc -> Doc
- align :: Int -> [(String, Doc)] -> Doc
- module Text.PrettyPrint

# Documentation

class Pretty a where

Methods

pretty :: a -> Doc

prettyPrec :: Int -> a -> Doc

Instances

Pretty String |
Pretty Doc |
Pretty Order |
Pretty Relevance |
Pretty Induction |
Pretty TopLevelModuleName |
Pretty QName |
Pretty Name |
Pretty Fixity |
Pretty Literal |
Pretty Pragma |
Pretty OpenShortHand |
Pretty ModuleApplication |
Pretty Declaration |
Pretty ImportedName |
Pretty UsingOrHiding |
Pretty ImportDirective |
Pretty WhereClause |
Pretty RHS |
Pretty LHSCore |
Pretty LHS |
Pretty TypedBinding |
Pretty BoundName |
Pretty TypedBindings |
Pretty LamBinding |
Pretty Pattern |
Pretty Expr |
Pretty CompiledClauses |
Pretty [Declaration] |
Pretty [Pattern] |
Pretty a => Pretty (Lisp a) |
Show meta => Pretty (CallGraph meta) | Displays the recursion behaviour corresponding to a call graph.
Pretty e => Pretty (Arg e) |
Pretty (ThingWithFixity Name) |
Pretty (OpApp Expr) |
Pretty a => Pretty (Case a) |
Pretty a => Pretty (WithArity a) |
(Show i, Integral i, HasZero b, Pretty b) => Pretty (Matrix i b) |
Pretty e => Pretty (Named String e) |
(Pretty a, Pretty b) => Pretty (OutputConstraint' a b) |

pwords :: String -> [Doc]

fwords :: String -> Doc

mparens :: Bool -> Doc -> Doc

align :: Int -> [(String, Doc)] -> Doc

`align max rows` lays out the elements of `rows` in two columns, with the second components aligned. The alignment column of the second components is at most `max` characters to the right of the left-most column.

Precondition: `max > 0`.

module Text.PrettyPrint