final-pretty-printer-0.1.0.0: Extensible pretty printing with semantic annotations and proportional fonts

Copyright(c) David Darais David Christiansen and Weixi Ma 2016-2017
LicenseMIT
Maintainerdavid.darais@gmail.com
Stabilityexperimental
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Text.PrettyPrint.Final.Rendering.Console

Description

A renderer for colored monospace text on a console.

Synopsis

Documentation

render Source #

Arguments

:: Monad m 
=> (ann -> m () -> m ())

How to transform a rendering based on an annotation

-> (Text -> m ())

How to output an atomic string

-> POut Int ann

The document to render

-> m () 

Render a POut in some monad.

dumpDoc :: (ann -> [SGR]) -> (ann -> StateT [ann] IO () -> StateT [ann] IO ()) -> POut Int ann -> IO () Source #

Dump pretty printer output to a console.

In IO to support rendering colors on Windows.