Package

pprint

Permalink

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, Serializable, Product, Equals, Walker, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. pprint
  2. PPrinter
  3. Serializable
  4. Serializable
  5. Product
  6. Equals
  7. Walker
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

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

    Permalink

    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

    Permalink
  3. class Result extends AnyRef

    Permalink

    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

    Permalink

    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

    Permalink
  6. trait TPrintGen[Type[_], Cfg] extends AnyRef

    Permalink
  7. trait TPrintLowPri extends AnyRef

    Permalink
  8. sealed trait Tree extends AnyRef

    Permalink

    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

  9. class Truncated extends Iterator[Str]

    Permalink

    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

  10. abstract class Walker extends AnyRef

    Permalink

Abstract Value Members

  1. abstract def additionalHandlers: PartialFunction[Any, Tree]

    Permalink
    Definition Classes
    Walker
  2. abstract def canEqual(that: Any): Boolean

    Permalink
    Definition Classes
    Equals
  3. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  4. abstract def productArity: Int

    Permalink
    Definition Classes
    Product
  5. abstract def productElement(n: Int): Any

    Permalink
    Definition Classes
    Product

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. object PPrinter extends Serializable

    Permalink
  5. object ProductSupport

    Permalink
  6. object Renderer

    Permalink
  7. object Result

    Permalink
  8. object StringPrefix

    Permalink
  9. object TPrint extends TPrintGen[TPrint, TPrintColors] with TPrintLowPri

    Permalink
  10. object TPrintColors extends Serializable

    Permalink
  11. object TPrintLowPri

    Permalink
  12. object Tree

    Permalink
  13. object Util

    Permalink
  14. def apply(x: Any, width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0): Str

    Permalink

    Converts an Any into a large colored fansi.Str

    Converts an Any into a large colored fansi.Str

    Definition Classes
    PPrinter
  15. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  16. val colorApplyPrefix: Attrs

    Permalink

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

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

    Definition Classes
    PPrinter
  17. val colorLiteral: Attrs

    Permalink

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

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

    Definition Classes
    PPrinter
  18. val defaultHeight: Int

    Permalink

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

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

    Definition Classes
    PPrinter
  19. val defaultIndent: Int

    Permalink

    How many spaces to indent each nested Tree.Apply by

    How many spaces to indent each nested Tree.Apply by

    Definition Classes
    PPrinter
  20. val defaultWidth: Int

    Permalink

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

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

    Definition Classes
    PPrinter
  21. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  22. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def log[T](x: Text[T], tag: String = "", width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0)(implicit line: Line, fileName: FileName): T

    Permalink

    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
  25. def pprintln[T](x: T, width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0): Unit

    Permalink

    Converts an Any into a large colored fansi.Str

    Converts an Any into a large colored fansi.Str

    Definition Classes
    PPrinter
  26. def productIterator: Iterator[Any]

    Permalink
    Definition Classes
    Product
  27. def productPrefix: String

    Permalink
    Definition Classes
    Product
  28. def showFieldNames: Boolean

    Permalink
    Definition Classes
    Walker
  29. def toString(): String

    Permalink
    Definition Classes
    Any
  30. def tokenize(x: Any, width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0): Iterator[Str]

    Permalink

    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
  31. def tprint[T](implicit arg0: TPrint[T], config: TPrintColors): String

    Permalink
  32. def treeify(x: Any): Tree

    Permalink
    Definition Classes
    Walker
  33. val tuplePrefix: String

    Permalink
    Definition Classes
    Walker

Inherited from PPrinter

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Walker

Inherited from AnyRef

Inherited from Any

Ungrouped