PrettyPrinter

scalus.compiler.sir.PrettyPrinter
object PrettyPrinter

Pretty printers.

  • Use pretty to pretty print to a org.typelevel.paiges.Doc.
  • Use prettyXTerm to pretty print to a org.typelevel.paiges.Doc with syntax highlighting for XTerm.

For example:

PrettyPrinter.prettyXTerm(sir).render(80)
// renders a single line if possible
PrettyPrinter.pretty(sir).flatten.render(120)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Deprecated types

type Style = Style

Attributes

Deprecated
[Since version 0.14.2] Use scalus.utils.Style instead

Use scalus.utils.Style instead

Value members

Concrete methods

def inBraces(d: Doc): Doc
def inBrackets(d: Doc): Doc
def inOptBrackets(d: Doc): Doc
def inParens(d: Doc): Doc
def pretty(df: DefaultFun): Doc
def pretty(d: Data): Doc
def pretty(c: Constant): Doc
def pretty(du: DefaultUni): Doc
def pretty(sir: SIR, style: Style): Doc
def pretty(sirType: SIRType): Doc
def pretty(p: Program): Doc
def prettyValue(c: Constant, dataParens: Boolean = ...): Doc

Deprecated methods

def pretty(term: Term, style: Style): Doc

Attributes

Deprecated
[Since version 0.14.2] Use Pretty[Term] instance from Term companion object instead

Use Pretty[Term] instance instead

def pretty(program: Program, style: Style): Doc

Attributes

Deprecated
[Since version 0.14.2] Use Pretty[Program] instance from Program companion object instead

Use Pretty[Program] instance instead

Deprecated fields

val Style: Style.type

Attributes

Deprecated
[Since version 0.14.2] Use scalus.utils.Style instead

Use scalus.utils.Style instead