Module

Text.Pretty

Package
purescript-pprint
Repository
paf31/purescript-pprint

This module defines a set of combinators for pretty printing text.

#Doc Source

newtype Doc

A text document.

#width Source

width :: Doc -> Int

Get the width of a document.

#height Source

height :: Doc -> Int

Get the height of a document.

#render Source

render :: Doc -> String

Render a document to a string.

#empty Source

empty :: Int -> Int -> Doc

An empty document

#text Source

text :: String -> Doc

Create a document from some text.

#beside Source

beside :: Doc -> Doc -> Doc

Place one document beside another.

#atop Source

atop :: Doc -> Doc -> Doc

Place one document on top of another.

#Stack Source

newtype Stack

A wrapper for Doc with a Monoid instance which stacks documents vertically.

Constructors

Instances

#vcat Source

vcat :: forall f. Foldable f => f Doc -> Doc

Stack documents vertically

#Columns Source

newtype Columns

A wrapper for Doc with a Monoid instance which stacks documents in columns.

Constructors

Instances

#hcat Source

hcat :: forall f. Foldable f => f Doc -> Doc

Place documents in columns

Modules
Text.Pretty