Packages

p

pprint

package pprint

Contains a convenient default pre-configured PPrinter.

Hard-coded and inflexible, but feel free to instantiate your own PPrint if you want to customize it.

Linear Supertypes
PPrinter, Serializable, Product, Equals, Walker, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. pprint
  2. PPrinter
  3. Serializable
  4. Product
  5. Equals
  6. Walker
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class PPrinter(defaultWidth: Int = 100, defaultHeight: Int = 500, defaultIndent: Int = 2, defaultEscapeUnicode: Boolean = false, defaultShowFieldNames: Boolean = true, colorLiteral: Attrs = fansi.Color.Green, colorApplyPrefix: Attrs = fansi.Color.Yellow, additionalHandlers: PartialFunction[Any, Tree] = PartialFunction.empty) extends Walker with Product with Serializable

    defaultWidth

    How wide to allow a pretty-printed value to become before wrapping

    defaultHeight

    How tall to allow the pretty-printed output to become before truncated it with a ...

    defaultIndent

    How many spaces to indent each nested Tree.Apply by

    colorLiteral

    What color to assign to literals like "lol" or 31337

    colorApplyPrefix

    What color to assign to Foo in Foo(bar, baz)

    additionalHandlers

    Provide this to override how certain types are pretty-printed at runtime

  2. class Renderer extends AnyRef
  3. class Result extends AnyRef

    The intermediate return type of the pretty-print system: provides an iterator which produces the actual string output, as well as metadata around that output that is only available after the iterator is exhausted

  4. trait TPrint[T] extends AnyRef

    Summoning an implicit TPrint[T] provides a pretty-printed string representation of the type T, much better than is provided by the default Type#toString.

    Summoning an implicit TPrint[T] provides a pretty-printed string representation of the type T, much better than is provided by the default Type#toString. In particular

    - More forms are properly supported and printed - Prefixed Types are printed un-qualified, according to what's currently in scope

  5. case class TPrintColors(typeColor: Attrs) extends Product with Serializable
  6. trait TPrintLowPri extends AnyRef
  7. sealed trait Tree extends AnyRef

    A lazy AST representing pretty-printable text.

    A lazy AST representing pretty-printable text. Models foo(a, b) foo op bar, and terminals foo in both lazy and eager forms

  8. class Truncated extends Iterator[Str]

    Wraps an input iterator of colored fansi.Strs, and produces the same fansi.Strs but truncated once the wrapped-at-width text reaches beyond a certain height

  9. abstract class Walker extends AnyRef

Abstract Value Members

  1. abstract def additionalHandlers: PartialFunction[Any, Tree]
    Definition Classes
    Walker
  2. abstract def canEqual(that: Any): Boolean
    Definition Classes
    Equals
  3. abstract def getClass(): Class[_ <: AnyRef]
    Definition Classes
    Any
  4. abstract def productArity: Int
    Definition Classes
    Product
  5. abstract def productElement(n: Int): Any
    Definition Classes
    Product

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. def apply(x: Any, width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0, escapeUnicode: Boolean = defaultEscapeUnicode, showFieldNames: Boolean = defaultShowFieldNames): Str

    Converts an Any into a large colored fansi.Str

    Converts an Any into a large colored fansi.Str

    Definition Classes
    PPrinter
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val colorApplyPrefix: Attrs
    Definition Classes
    PPrinter
  7. val colorLiteral: Attrs
    Definition Classes
    PPrinter
  8. val defaultEscapeUnicode: Boolean
    Definition Classes
    PPrinter
  9. val defaultHeight: Int
    Definition Classes
    PPrinter
  10. val defaultIndent: Int
    Definition Classes
    PPrinter
  11. val defaultShowFieldNames: Boolean
    Definition Classes
    PPrinter
  12. val defaultWidth: Int
    Definition Classes
    PPrinter
  13. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  14. def hashCode(): Int
    Definition Classes
    Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def log[T](x: Text[T], tag: String = "", width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, escapeUnicode: Boolean = defaultEscapeUnicode, showFieldNames: Boolean = defaultShowFieldNames)(implicit line: Line, fileName: FileName): T

    Logs a given value to stdout with some metadata to identify where the log message came from.

    Logs a given value to stdout with some metadata to identify where the log message came from. Hard-coded and not very flexible, but you can easily implement your own log method if you want to customize it further.

    Definition Classes
    PPrinter
  17. def pprintln[T](x: T, width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0, escapeUnicode: Boolean = defaultEscapeUnicode, showFieldNames: Boolean = defaultShowFieldNames): Unit

    Converts an Any into a large colored fansi.Str

    Converts an Any into a large colored fansi.Str

    Definition Classes
    PPrinter
  18. def productElementName(n: Int): String
    Definition Classes
    Product
  19. def productElementNames: Iterator[String]
    Definition Classes
    Product
  20. def productIterator: Iterator[Any]
    Definition Classes
    Product
  21. def productPrefix: String
    Definition Classes
    Product
  22. def toString(): String
    Definition Classes
    Any
  23. def tokenize(x: Any, width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0, escapeUnicode: Boolean = defaultEscapeUnicode, showFieldNames: Boolean = defaultShowFieldNames): Iterator[Str]

    Converts an Any into an iterator of colored chunks, wrapped at a certain width and truncated at a certain height

    Converts an Any into an iterator of colored chunks, wrapped at a certain width and truncated at a certain height

    Definition Classes
    PPrinter
  24. def tprint[T](implicit arg0: TPrint[T], config: TPrintColors): Str
  25. def treeify(x: Any, escapeUnicode: Boolean, showFieldNames: Boolean): Tree
    Definition Classes
    Walker
  26. val tuplePrefix: String
    Definition Classes
    Walker
  27. object PPrinter extends Serializable
  28. object ProductSupport
  29. object Renderer
  30. object Result
  31. object StringPrefix
  32. object TPrint extends TPrintLowPri
  33. object TPrintColors extends Serializable
  34. object TPrintLowPri
  35. object Tree
  36. object Util

Inherited from PPrinter

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Walker

Inherited from AnyRef

Inherited from Any

Ungrouped