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

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