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

Safe HaskellSafe
LanguageHaskell2010

Agda.Utils.Pretty

Contents

Description

Pretty printing functions.

Synopsis

Documentation

class Pretty a where #

While Show is for rendering data in Haskell syntax, Pretty is for displaying data to the world, i.e., the user and the environment.

Atomic data has no inner document structure, so just implement pretty as pretty a = text $ ... a ....

Methods

pretty :: a -> Doc #

prettyPrec :: Int -> a -> Doc #

prettyList :: [a] -> Doc #

Instances
Pretty Bool # 
Instance details

Defined in Agda.Utils.Pretty

Methods

pretty :: Bool -> Doc #

prettyPrec :: Int -> Bool -> Doc #

prettyList :: [Bool] -> Doc #

Pretty Char # 
Instance details

Defined in Agda.Utils.Pretty

Methods

pretty :: Char -> Doc #

prettyPrec :: Int -> Char -> Doc #

prettyList :: [Char] -> Doc #

Pretty Int # 
Instance details

Defined in Agda.Utils.Pretty

Methods

pretty :: Int -> Doc #

prettyPrec :: Int -> Int -> Doc #

prettyList :: [Int] -> Doc #

Pretty Int32 # 
Instance details

Defined in Agda.Utils.Pretty

Methods

pretty :: Int32 -> Doc #

prettyPrec :: Int -> Int32 -> Doc #

prettyList :: [Int32] -> Doc #

Pretty Integer # 
Instance details

Defined in Agda.Utils.Pretty

Pretty Doc # 
Instance details

Defined in Agda.Utils.Pretty

Methods

pretty :: Doc -> Doc #

prettyPrec :: Int -> Doc -> Doc #

prettyList :: [Doc] -> Doc #

Pretty TyVarBind # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty QOp # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: QOp -> Doc #

prettyPrec :: Int -> QOp -> Doc #

prettyList :: [QOp] -> Doc #

Pretty Name # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Name -> Doc #

prettyPrec :: Int -> Name -> Doc #

prettyList :: [Name] -> Doc #

Pretty QName # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: QName -> Doc #

prettyPrec :: Int -> QName -> Doc #

prettyList :: [QName] -> Doc #

Pretty ModuleName # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty Literal # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty Alt # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Alt -> Doc #

prettyPrec :: Int -> Alt -> Doc #

prettyList :: [Alt] -> Doc #

Pretty Exp # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Exp -> Doc #

prettyPrec :: Int -> Exp -> Doc #

prettyList :: [Exp] -> Doc #

Pretty Stmt # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Stmt -> Doc #

prettyPrec :: Int -> Stmt -> Doc #

prettyList :: [Stmt] -> Doc #

Pretty Pat # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Pat -> Doc #

prettyPrec :: Int -> Pat -> Doc #

prettyList :: [Pat] -> Doc #

Pretty Type # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Type -> Doc #

prettyPrec :: Int -> Type -> Doc #

prettyList :: [Type] -> Doc #

Pretty Match # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Match -> Doc #

prettyPrec :: Int -> Match -> Doc #

prettyList :: [Match] -> Doc #

Pretty Binds # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Binds -> Doc #

prettyPrec :: Int -> Binds -> Doc #

prettyList :: [Binds] -> Doc #

Pretty Strictness # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty ConDecl # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty DataOrNew # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty Decl # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Decl -> Doc #

prettyPrec :: Int -> Decl -> Doc #

prettyList :: [Decl] -> Doc #

Pretty ImportSpec # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty ImportDecl # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty ModulePragma # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Pretty Module # 
Instance details

Defined in Agda.Compiler.MAlonzo.Pretty

Methods

pretty :: Module -> Doc #

prettyPrec :: Int -> Module -> Doc #

prettyList :: [Module] -> Doc #

Pretty Polarity # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Pretty Cmp # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Methods

pretty :: Cmp -> Doc #

prettyPrec :: Int -> Cmp -> Doc #

prettyList :: [Cmp] -> Doc #

Pretty Flex # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Methods

pretty :: Flex -> Doc #

prettyPrec :: Int -> Flex -> Doc #

prettyList :: [Flex] -> Doc #

Pretty Rigid # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Methods

pretty :: Rigid -> Doc #

prettyPrec :: Int -> Rigid -> Doc #

prettyList :: [Rigid] -> Doc #

Pretty Offset # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Methods

pretty :: Offset -> Doc #

prettyPrec :: Int -> Offset -> Doc #

prettyList :: [Offset] -> Doc #

Pretty CPUTime #

Print CPU time in milli (10^-3) seconds.

Instance details

Defined in Agda.Utils.Time

Pretty AbsolutePath # 
Instance details

Defined in Agda.Utils.FileName

Pretty IntervalWithoutFile # 
Instance details

Defined in Agda.Syntax.Position

Pretty PositionWithoutFile # 
Instance details

Defined in Agda.Syntax.Position

Pretty ParseWarning # 
Instance details

Defined in Agda.Syntax.Parser.Monad

Pretty ParseError # 
Instance details

Defined in Agda.Syntax.Parser.Monad

Pretty Fixity' # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty MetaId # 
Instance details

Defined in Agda.Syntax.Common

Methods

pretty :: MetaId -> Doc #

prettyPrec :: Int -> MetaId -> Doc #

prettyList :: [MetaId] -> Doc #

Pretty NameId # 
Instance details

Defined in Agda.TypeChecking.Reduce.Fast

Methods

pretty :: NameId -> Doc #

prettyPrec :: Int -> NameId -> Doc #

prettyList :: [NameId] -> Doc #

Pretty Access # 
Instance details

Defined in Agda.Syntax.Common

Methods

pretty :: Access -> Doc #

prettyPrec :: Int -> Access -> Doc #

prettyList :: [Access] -> Doc #

Pretty Relevance # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty Induction # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty TopLevelModuleName # 
Instance details

Defined in Agda.Syntax.Concrete.Name

Pretty QName # 
Instance details

Defined in Agda.Syntax.Concrete.Name

Methods

pretty :: QName -> Doc #

prettyPrec :: Int -> QName -> Doc #

prettyList :: [QName] -> Doc #

Pretty NamePart # 
Instance details

Defined in Agda.Syntax.Concrete.Name

Pretty Name # 
Instance details

Defined in Agda.Syntax.Concrete.Name

Methods

pretty :: Name -> Doc #

prettyPrec :: Int -> Name -> Doc #

prettyList :: [Name] -> Doc #

Pretty GenPart # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty AmbiguousQName # 
Instance details

Defined in Agda.Syntax.Abstract.Name

Pretty ModuleName # 
Instance details

Defined in Agda.Syntax.Abstract.Name

Pretty QName # 
Instance details

Defined in Agda.Syntax.Abstract.Name

Methods

pretty :: QName -> Doc #

prettyPrec :: Int -> QName -> Doc #

prettyList :: [QName] -> Doc #

Pretty Name # 
Instance details

Defined in Agda.Syntax.Abstract.Name

Methods

pretty :: Name -> Doc #

prettyPrec :: Int -> Name -> Doc #

prettyList :: [Name] -> Doc #

Pretty Literal # 
Instance details

Defined in Agda.Syntax.Literal

Pretty TTerm # 
Instance details

Defined in Agda.Compiler.Treeless.Pretty

Methods

pretty :: TTerm -> Doc #

prettyPrec :: Int -> TTerm -> Doc #

prettyList :: [TTerm] -> Doc #

Pretty Precedence # 
Instance details

Defined in Agda.Syntax.Fixity

Pretty Fixity # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: Fixity -> Doc #

prettyPrec :: Int -> Fixity -> Doc #

prettyList :: [Fixity] -> Doc #

Pretty Label # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.WarshallSolver

Methods

pretty :: Label -> Doc #

prettyPrec :: Int -> Label -> Doc #

prettyList :: [Label] -> Doc #

Pretty Weight # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.WarshallSolver

Methods

pretty :: Weight -> Doc #

prettyPrec :: Int -> Weight -> Doc #

prettyList :: [Weight] -> Doc #

Pretty Occurrence # 
Instance details

Defined in Agda.TypeChecking.Positivity.Occurrence

Pretty Where # 
Instance details

Defined in Agda.TypeChecking.Positivity.Occurrence

Methods

pretty :: Where -> Doc #

prettyPrec :: Int -> Where -> Doc #

prettyList :: [Where] -> Doc #

Pretty OccursWhere # 
Instance details

Defined in Agda.TypeChecking.Positivity.Occurrence

Pretty Pragma # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: Pragma -> Doc #

prettyPrec :: Int -> Pragma -> Doc #

prettyList :: [Pragma] -> Doc #

Pretty OpenShortHand # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty ModuleApplication # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty Declaration # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty LamClause # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty WhereClause # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty RHS # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: RHS -> Doc #

prettyPrec :: Int -> RHS -> Doc #

prettyList :: [RHS] -> Doc #

Pretty LHSCore # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty LHS # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: LHS -> Doc #

prettyPrec :: Int -> LHS -> Doc #

prettyList :: [LHS] -> Doc #

Pretty TypedBinding # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty BoundName # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty TypedBindings # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty LamBinding # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty DoStmt # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: DoStmt -> Doc #

prettyPrec :: Int -> DoStmt -> Doc #

prettyList :: [DoStmt] -> Doc #

Pretty Pattern # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty Expr # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: Expr -> Doc #

prettyPrec :: Int -> Expr -> Doc #

prettyList :: [Expr] -> Doc #

Pretty ModuleAssignment # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty Tel # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: Tel -> Doc #

prettyPrec :: Int -> Tel -> Doc #

prettyList :: [Tel] -> Doc #

Pretty Phase # 
Instance details

Defined in Agda.Benchmarking

Methods

pretty :: Phase -> Doc #

prettyPrec :: Int -> Phase -> Doc #

prettyList :: [Phase] -> Doc #

Pretty ResolvedName # 
Instance details

Defined in Agda.Syntax.Scope.Base

Pretty AbstractModule # 
Instance details

Defined in Agda.Syntax.Scope.Base

Pretty AbstractName # 
Instance details

Defined in Agda.Syntax.Scope.Base

Pretty NameSpace # 
Instance details

Defined in Agda.Syntax.Scope.Base

Pretty LocalVar #

We show shadowed variables as prefixed by a ".", as not in scope.

Instance details

Defined in Agda.Syntax.Scope.Base

Pretty ScopeInfo # 
Instance details

Defined in Agda.Syntax.Scope.Base

Pretty NameSpaceId # 
Instance details

Defined in Agda.Syntax.Scope.Base

Pretty Scope # 
Instance details

Defined in Agda.Syntax.Scope.Base

Methods

pretty :: Scope -> Doc #

prettyPrec :: Int -> Scope -> Doc #

prettyList :: [Scope] -> Doc #

Pretty Order # 
Instance details

Defined in Agda.Termination.Order

Methods

pretty :: Order -> Doc #

prettyPrec :: Int -> Order -> Doc #

prettyList :: [Order] -> Doc #

Pretty CallMatrix # 
Instance details

Defined in Agda.Termination.CallMatrix

Pretty DBPatVar # 
Instance details

Defined in Agda.Syntax.Internal

Pretty Clause # 
Instance details

Defined in Agda.Syntax.Internal

Methods

pretty :: Clause -> Doc #

prettyPrec :: Int -> Clause -> Doc #

prettyList :: [Clause] -> Doc #

Pretty LevelAtom # 
Instance details

Defined in Agda.Syntax.Internal

Pretty PlusLevel # 
Instance details

Defined in Agda.Syntax.Internal

Pretty Level # 
Instance details

Defined in Agda.Syntax.Internal

Methods

pretty :: Level -> Doc #

prettyPrec :: Int -> Level -> Doc #

prettyList :: [Level] -> Doc #

Pretty Sort # 
Instance details

Defined in Agda.Syntax.Internal

Methods

pretty :: Sort -> Doc #

prettyPrec :: Int -> Sort -> Doc #

prettyList :: [Sort] -> Doc #

Pretty Type # 
Instance details

Defined in Agda.Syntax.Internal

Methods

pretty :: Type -> Doc #

prettyPrec :: Int -> Type -> Doc #

prettyList :: [Type] -> Doc #

Pretty Term # 
Instance details

Defined in Agda.Syntax.Internal

Methods

pretty :: Term -> Doc #

prettyPrec :: Int -> Term -> Doc #

prettyList :: [Term] -> Doc #

Pretty ConHead # 
Instance details

Defined in Agda.Syntax.Internal

Pretty CompiledClauses # 
Instance details

Defined in Agda.TypeChecking.CompiledClause

Pretty ScopeCopyInfo # 
Instance details

Defined in Agda.Syntax.Abstract

Pretty DeclarationWarning # 
Instance details

Defined in Agda.Syntax.Concrete.Definitions

Pretty DeclarationException # 
Instance details

Defined in Agda.Syntax.Concrete.Definitions

Pretty CallInfo #

We only show the name of the callee.

Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty Call # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Methods

pretty :: Call -> Doc #

prettyPrec :: Int -> Call -> Doc #

prettyList :: [Call] -> Doc #

Pretty TermHead # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty Defn # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Methods

pretty :: Defn -> Doc #

prettyPrec :: Int -> Defn -> Doc #

prettyList :: [Defn] -> Doc #

Pretty Polarity # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty Definition # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty DisplayTerm # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty Section # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty NamedMeta # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty CompareDirection # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty Comparison # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty Interface # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty CheckpointId # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty ProblemId # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Pretty AsBinding # 
Instance details

Defined in Agda.TypeChecking.Rules.LHS.Problem

Pretty Node # 
Instance details

Defined in Agda.TypeChecking.Positivity

Methods

pretty :: Node -> Doc #

prettyPrec :: Int -> Node -> Doc #

prettyList :: [Node] -> Doc #

Pretty SplitTag # 
Instance details

Defined in Agda.TypeChecking.Coverage.SplitTree

Pretty BlockingVar # 
Instance details

Defined in Agda.TypeChecking.Coverage.Match

Pretty SplitPatVar # 
Instance details

Defined in Agda.TypeChecking.Coverage.Match

Pretty SizeMeta # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Solve

Pretty NamedRigid # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Solve

Pretty Cl # 
Instance details

Defined in Agda.TypeChecking.CompiledClause.Compile

Methods

pretty :: Cl -> Doc #

prettyPrec :: Int -> Cl -> Doc #

prettyList :: [Cl] -> Doc #

Pretty CallPath #

Only show intermediate nodes. (Drop last CallInfo).

Instance details

Defined in Agda.Termination.Monad

Pretty a => Pretty [a] # 
Instance details

Defined in Agda.Utils.Pretty

Methods

pretty :: [a] -> Doc #

prettyPrec :: Int -> [a] -> Doc #

prettyList :: [[a]] -> Doc #

Pretty a => Pretty (Maybe a) # 
Instance details

Defined in Agda.Utils.Pretty

Methods

pretty :: Maybe a -> Doc #

prettyPrec :: Int -> Maybe a -> Doc #

prettyList :: [Maybe a] -> Doc #

Pretty a => Pretty (NonemptyList a) # 
Instance details

Defined in Agda.Utils.Pretty

Pretty flex => Pretty (PolarityAssignment flex) # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Pretty a => Pretty (Lisp a) # 
Instance details

Defined in Agda.Interaction.EmacsCommand

Methods

pretty :: Lisp a -> Doc #

prettyPrec :: Int -> Lisp a -> Doc #

prettyList :: [Lisp a] -> Doc #

(Ord a, Pretty a) => Pretty (Benchmark a) #

Print benchmark as three-column table with totals.

Instance details

Defined in Agda.Utils.Benchmark

Methods

pretty :: Benchmark a -> Doc #

prettyPrec :: Int -> Benchmark a -> Doc #

prettyList :: [Benchmark a] -> Doc #

(Pretty a, HasRange a) => Pretty (PrintRange a) # 
Instance details

Defined in Agda.Syntax.Position

Pretty a => Pretty (Range' (Maybe a)) # 
Instance details

Defined in Agda.Syntax.Position

Methods

pretty :: Range' (Maybe a) -> Doc #

prettyPrec :: Int -> Range' (Maybe a) -> Doc #

prettyList :: [Range' (Maybe a)] -> Doc #

Pretty a => Pretty (Interval' (Maybe a)) # 
Instance details

Defined in Agda.Syntax.Position

Pretty a => Pretty (Position' (Maybe a)) # 
Instance details

Defined in Agda.Syntax.Position

Pretty a => Pretty (MaybePlaceholder a) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty e => Pretty (Named_ e) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: Named_ e -> Doc #

prettyPrec :: Int -> Named_ e -> Doc #

prettyList :: [Named_ e] -> Doc #

Pretty a => Pretty (Arg a) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: Arg a -> Doc #

prettyPrec :: Int -> Arg a -> Doc #

prettyList :: [Arg a] -> Doc #

Pretty a => Pretty (WithHiding a) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty a => Pretty (QNamed a) # 
Instance details

Defined in Agda.Syntax.Abstract.Name

Methods

pretty :: QNamed a -> Doc #

prettyPrec :: Int -> QNamed a -> Doc #

prettyList :: [QNamed a] -> Doc #

Pretty (ThingWithFixity Name) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty a => Pretty (FieldAssignment' a) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty (OpApp Expr) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Pretty cinfo => Pretty (CMSet cinfo) # 
Instance details

Defined in Agda.Termination.CallMatrix

Methods

pretty :: CMSet cinfo -> Doc #

prettyPrec :: Int -> CMSet cinfo -> Doc #

prettyList :: [CMSet cinfo] -> Doc #

Pretty cinfo => Pretty (CallMatrixAug cinfo) # 
Instance details

Defined in Agda.Termination.CallMatrix

Methods

pretty :: CallMatrixAug cinfo -> Doc #

prettyPrec :: Int -> CallMatrixAug cinfo -> Doc #

prettyList :: [CallMatrixAug cinfo] -> Doc #

Pretty cinfo => Pretty (CallGraph cinfo) #

Displays the recursion behaviour corresponding to a call graph.

Instance details

Defined in Agda.Termination.CallGraph

Methods

pretty :: CallGraph cinfo -> Doc #

prettyPrec :: Int -> CallGraph cinfo -> Doc #

prettyList :: [CallGraph cinfo] -> Doc #

Pretty a => Pretty (Substitution' a) # 
Instance details

Defined in Agda.Syntax.Internal

Pretty a => Pretty (Pattern' a) # 
Instance details

Defined in Agda.Syntax.Internal

Methods

pretty :: Pattern' a -> Doc #

prettyPrec :: Int -> Pattern' a -> Doc #

prettyList :: [Pattern' a] -> Doc #

Pretty a => Pretty (Tele (Dom a)) # 
Instance details

Defined in Agda.Syntax.Internal

Methods

pretty :: Tele (Dom a) -> Doc #

prettyPrec :: Int -> Tele (Dom a) -> Doc #

prettyList :: [Tele (Dom a)] -> Doc #

Pretty tm => Pretty (Elim' tm) # 
Instance details

Defined in Agda.Syntax.Internal

Methods

pretty :: Elim' tm -> Doc #

prettyPrec :: Int -> Elim' tm -> Doc #

prettyList :: [Elim' tm] -> Doc #

Pretty a => Pretty (Case a) # 
Instance details

Defined in Agda.TypeChecking.CompiledClause

Methods

pretty :: Case a -> Doc #

prettyPrec :: Int -> Case a -> Doc #

prettyList :: [Case a] -> Doc #

Pretty a => Pretty (WithArity a) # 
Instance details

Defined in Agda.TypeChecking.CompiledClause

Methods

pretty :: WithArity a -> Doc #

prettyPrec :: Int -> WithArity a -> Doc #

prettyList :: [WithArity a] -> Doc #

Pretty a => Pretty (SplitTreeLabel a) # 
Instance details

Defined in Agda.TypeChecking.Coverage.SplitTree

Pretty a => Pretty (SplitTree' a) # 
Instance details

Defined in Agda.TypeChecking.Coverage.SplitTree

(Pretty a, Pretty b) => Pretty (Either a b) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: Either a b -> Doc #

prettyPrec :: Int -> Either a b -> Doc #

prettyList :: [Either a b] -> Doc #

(Pretty a, Pretty b) => Pretty (a, b) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: (a, b) -> Doc #

prettyPrec :: Int -> (a, b) -> Doc #

prettyList :: [(a, b)] -> Doc #

(Pretty r, Pretty f) => Pretty (Solution r f) # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Methods

pretty :: Solution r f -> Doc #

prettyPrec :: Int -> Solution r f -> Doc #

prettyList :: [Solution r f] -> Doc #

(Pretty r, Pretty f) => Pretty (Constraint' r f) # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Methods

pretty :: Constraint' r f -> Doc #

prettyPrec :: Int -> Constraint' r f -> Doc #

prettyList :: [Constraint' r f] -> Doc #

(Pretty r, Pretty f) => Pretty (SizeExpr' r f) # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.Syntax

Methods

pretty :: SizeExpr' r f -> Doc #

prettyPrec :: Int -> SizeExpr' r f -> Doc #

prettyList :: [SizeExpr' r f] -> Doc #

(Pretty a, Pretty b) => Pretty (ImportedName' a b) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

(Pretty a, Pretty b) => Pretty (Using' a b) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

Methods

pretty :: Using' a b -> Doc #

prettyPrec :: Int -> Using' a b -> Doc #

prettyList :: [Using' a b] -> Doc #

(Pretty a, Pretty b) => Pretty (ImportDirective' a b) # 
Instance details

Defined in Agda.Syntax.Concrete.Pretty

(Pretty n, Pretty e) => Pretty (Edge n e) # 
Instance details

Defined in Agda.Utils.Graph.AdjacencyMap.Unidirectional

Methods

pretty :: Edge n e -> Doc #

prettyPrec :: Int -> Edge n e -> Doc #

prettyList :: [Edge n e] -> Doc #

(Ord n, Pretty n, Pretty e) => Pretty (Graph n e) # 
Instance details

Defined in Agda.Utils.Graph.AdjacencyMap.Unidirectional

Methods

pretty :: Graph n e -> Doc #

prettyPrec :: Int -> Graph n e -> Doc #

prettyList :: [Graph n e] -> Doc #

(Pretty rigid, Pretty flex) => Pretty (Node rigid flex) # 
Instance details

Defined in Agda.TypeChecking.SizedTypes.WarshallSolver

Methods

pretty :: Node rigid flex -> Doc #

prettyPrec :: Int -> Node rigid flex -> Doc #

prettyList :: [Node rigid flex] -> Doc #

(Integral i, HasZero b, Pretty b) => Pretty (Matrix i b) # 
Instance details

Defined in Agda.Termination.SparseMatrix

Methods

pretty :: Matrix i b -> Doc #

prettyPrec :: Int -> Matrix i b -> Doc #

prettyList :: [Matrix i b] -> Doc #

(Pretty a, Pretty b) => Pretty (OutputConstraint' a b) # 
Instance details

Defined in Agda.Interaction.BasicOps

prettyShow :: Pretty a => a -> String #

Use instead of show when printing to world.

pwords :: String -> [Doc] #

prettyList_ :: Pretty a => [a] -> Doc #

Comma separated list, without the brackets.

mparens :: Bool -> Doc -> Doc #

Apply parens to Doc if boolean is true.

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.

multiLineText :: String -> Doc #

Handles strings with newlines properly (preserving indentation)

(<?>) :: Doc -> Doc -> Doc infixl 6 #

a ? b = hang a 2 b

pshow :: Show a => a -> Doc #

pshow = text . pretty

fullRender #

Arguments

:: Mode

Rendering mode.

-> Int

Line length.

-> Float

Ribbons per line.

-> (TextDetails -> a -> a)

What to do with text.

-> a

What to do at the end.

-> Doc

The document.

-> a

Result.

The general rendering interface. Please refer to the Style and Mode types for a description of rendering mode, line length and ribbons.

renderStyle :: Style -> Doc -> String #

Render the Doc to a String using the given Style.

render :: Doc -> String #

Render the Doc to a String using the default Style (see style).

fsep :: [Doc] -> Doc #

"Paragraph fill" version of sep.

fcat :: [Doc] -> Doc #

"Paragraph fill" version of cat.

cat :: [Doc] -> Doc #

Either hcat or vcat.

sep :: [Doc] -> Doc #

Either hsep or vcat.

(<+>) :: Doc -> Doc -> Doc infixl 6 #

Beside, separated by space, unless one of the arguments is empty. <+> is associative, with identity empty.

(<>) :: Doc -> Doc -> Doc infixl 6 #

Beside. <> is associative, with identity empty.

($+$) :: Doc -> Doc -> Doc infixl 5 #

Above, with no overlapping. $+$ is associative, with identity empty.

($$) :: Doc -> Doc -> Doc infixl 5 #

Above, except that if the last line of the first argument stops at least one position before the first line of the second begins, these two lines are overlapped. For example:

   text "hi" $$ nest 5 (text "there")

lays out as

   hi   there

rather than

   hi
        there

$$ is associative, with identity empty, and also satisfies

  • (x $$ y) <> z = x $$ (y <> z), if y non-empty.

punctuate :: Doc -> [Doc] -> [Doc] #

punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn]

hang :: Doc -> Int -> Doc -> Doc #

hang d1 n d2 = sep [d1, nest n d2]

nest :: Int -> Doc -> Doc #

Nest (or indent) a document by a given number of positions (which may also be negative). nest satisfies the laws:

The side condition on the last law is needed because empty is a left identity for <>.

vcat :: [Doc] -> Doc #

List version of $$.

hsep :: [Doc] -> Doc #

List version of <+>.

hcat :: [Doc] -> Doc #

List version of <>.

braces #

Arguments

:: Doc 
-> Doc

Wrap document in {...}

brackets #

Arguments

:: Doc 
-> Doc

Wrap document in [...]

parens #

Arguments

:: Doc 
-> Doc

Wrap document in (...)

doubleQuotes #

Arguments

:: Doc 
-> Doc

Wrap document in "..."

quotes #

Arguments

:: Doc 
-> Doc

Wrap document in '...'

rational #

Arguments

:: Rational 
-> Doc
rational n = text (show n)

double #

Arguments

:: Double 
-> Doc
double n = text (show n)

float #

Arguments

:: Float 
-> Doc
float n = text (show n)

integer #

Arguments

:: Integer 
-> Doc
integer n = text (show n)

int #

Arguments

:: Int 
-> Doc
int n = text (show n)

rbrace #

Arguments

:: Doc

A '}' character

lbrace #

Arguments

:: Doc

A '{' character

rbrack #

Arguments

:: Doc

A ']' character

lbrack #

Arguments

:: Doc

A '[' character

rparen #

Arguments

:: Doc

A ')' character

lparen #

Arguments

:: Doc

A '(' character

equals #

Arguments

:: Doc

A '=' character

space #

Arguments

:: Doc

A space character

colon #

Arguments

:: Doc

A : character

comma #

Arguments

:: Doc

A ',' character

semi #

Arguments

:: Doc

A ';' character

isEmpty :: Doc -> Bool #

Returns True if the document is empty

zeroWidthText :: String -> Doc #

Some text, but without any width. Use for non-printing text such as a HTML or Latex tags

sizedText :: Int -> String -> Doc #

Some text with any width. (text s = sizedText (length s) s)

ptext :: String -> Doc #

Same as text. Used to be used for Bytestrings.

text :: String -> Doc #

A document of height 1 containing a literal string. text satisfies the following laws:

The side condition on the last law is necessary because text "" has height 1, while empty has no height.

char :: Char -> Doc #

A document of height and width 1, containing a literal character.

data Doc #

The abstract type of documents. A Doc represents a set of layouts. A Doc with no occurrences of Union or NoDoc represents just one layout.

Instances
Eq Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

(==) :: Doc -> Doc -> Bool #

(/=) :: Doc -> Doc -> Bool #

Data Doc # 
Instance details

Defined in Agda.Utils.Pretty

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Doc -> c Doc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Doc #

toConstr :: Doc -> Constr #

dataTypeOf :: Doc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Doc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Doc) #

gmapT :: (forall b. Data b => b -> b) -> Doc -> Doc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Doc -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Doc -> r #

gmapQ :: (forall d. Data d => d -> u) -> Doc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Doc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Doc -> m Doc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Doc -> m Doc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Doc -> m Doc #

Show Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String #

showList :: [Doc] -> ShowS #

IsString Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

fromString :: String -> Doc #

Generic Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: * -> * #

Methods

from :: Doc -> Rep Doc x #

to :: Rep Doc x -> Doc #

Semigroup Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

(<>) :: Doc -> Doc -> Doc #

sconcat :: NonEmpty Doc -> Doc #

stimes :: Integral b => b -> Doc -> Doc #

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

NFData Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

rnf :: Doc -> () #

Null Doc # 
Instance details

Defined in Agda.Utils.Null

Methods

empty :: Doc #

null :: Doc -> Bool #

Pretty Doc # 
Instance details

Defined in Agda.Utils.Pretty

Methods

pretty :: Doc -> Doc #

prettyPrec :: Int -> Doc -> Doc #

prettyList :: [Doc] -> Doc #

Underscore Doc # 
Instance details

Defined in Agda.Syntax.Common

EmbPrj Doc # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Errors

Methods

icode :: Doc -> S Int32 #

icod_ :: Doc -> S Int32 #

value :: Int32 -> R Doc #

Null (TCM Doc) # 
Instance details

Defined in Agda.TypeChecking.Monad.Base

Methods

empty :: TCM Doc #

null :: TCM Doc -> Bool #

type Rep Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

type Rep Doc = D1 (MetaData "Doc" "Text.PrettyPrint.HughesPJ" "pretty-1.1.3.6" True) (C1 (MetaCons "Doc" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Doc ()))))

style :: Style #

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

pattern Chr :: !Char -> TextDetails #

A single Char fragment

pattern PStr :: String -> TextDetails #

Used to represent a Fast String fragment but now deprecated and identical to the Str constructor.

data Style #

A rendering style. Allows us to specify constraints to choose among the many different rendering options.

Constructors

Style 

Fields

  • mode :: Mode

    The rendering mode.

  • lineLength :: Int

    Maximum length of a line, in characters.

  • ribbonsPerLine :: Float

    Ratio of line length to ribbon length. A ribbon refers to the characters on a line excluding indentation. So a lineLength of 100, with a ribbonsPerLine of 2.0 would only allow up to 50 characters of ribbon to be displayed on a line, while allowing it to be indented up to 50 characters.

Instances
Eq Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(==) :: Style -> Style -> Bool #

(/=) :: Style -> Style -> Bool #

Show Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Generic Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Style :: * -> * #

Methods

from :: Style -> Rep Style x #

to :: Rep Style x -> Style #

type Rep Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

type Rep Style = D1 (MetaData "Style" "Text.PrettyPrint.Annotated.HughesPJ" "pretty-1.1.3.6" False) (C1 (MetaCons "Style" PrefixI True) (S1 (MetaSel (Just "mode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Mode) :*: (S1 (MetaSel (Just "lineLength") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "ribbonsPerLine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Float))))

data Mode #

Rendering mode.

Constructors

PageMode

Normal rendering (lineLength and ribbonsPerLine respected').

ZigZagMode

With zig-zag cuts.

LeftMode

No indentation, infinitely long lines (lineLength ignored), but explicit new lines, i.e., text "one" $$ text "two", are respected.

OneLineMode

All on one line, lineLength ignored and explicit new lines ($$) are turned into spaces.

Instances
Eq Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Show Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

Generic Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Mode :: * -> * #

Methods

from :: Mode -> Rep Mode x #

to :: Rep Mode x -> Mode #

type Rep Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

type Rep Mode = D1 (MetaData "Mode" "Text.PrettyPrint.Annotated.HughesPJ" "pretty-1.1.3.6" False) ((C1 (MetaCons "PageMode" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ZigZagMode" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "LeftMode" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "OneLineMode" PrefixI False) (U1 :: * -> *)))

Orphan instances

Data Doc # 
Instance details

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Doc -> c Doc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Doc #

toConstr :: Doc -> Constr #

dataTypeOf :: Doc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Doc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Doc) #

gmapT :: (forall b. Data b => b -> b) -> Doc -> Doc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Doc -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Doc -> r #

gmapQ :: (forall d. Data d => d -> u) -> Doc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Doc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Doc -> m Doc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Doc -> m Doc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Doc -> m Doc #