language-sally-0.1.0.0: AST and pretty printer for Sally

CopyrightBenjamin Jones 2017
LicenseISC
Maintainerbjones@galois.com
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe
LanguageHaskell2010

Language.Sally.PPrint

Contents

Description

Export top-level pretty printer functions taking general pretty-printable values and writing them to stdout or to String. These functions avoid the need to export the specific pretty printer library to clients.

Synopsis

pretty printing

spPrint :: Pretty a => a -> String Source #

Render a value of the Pretty class as a string.

pprintSystem :: Pretty a => a -> Text Source #

Render a value of the Pretty class as Data.Text.

putSystem :: Pretty a => a -> IO () Source #

Render a value of the pretty class to stdout.

putSExpCompact :: ToSExp a => a -> IO () Source #

Render a value of the pretty class in a compact fashion to stdout.

putSystemLn :: Pretty a => a -> IO () Source #

Same as putSystem but with a newline.

hPutSystem :: Pretty a => Handle -> a -> IO () Source #

Same as putSystem but takes a Handle.