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. 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

    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 TPrintGen[Type[_], Cfg] extends AnyRef
  7. trait TPrintLowPri extends AnyRef
  8. 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

  9. 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

  10. 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): 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 defaultHeight: Int
    Definition Classes
    PPrinter
  9. val defaultIndent: Int
    Definition Classes
    PPrinter
  10. val defaultWidth: Int
    Definition Classes
    PPrinter
  11. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  12. def hashCode(): Int
    Definition Classes
    Any
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. 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

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

    Converts an Any into a large colored fansi.Str

    Converts an Any into a large colored fansi.Str

    Definition Classes
    PPrinter
  16. def productElementName(n: Int): String
    Definition Classes
    Product
  17. def productElementNames: Iterator[String]
    Definition Classes
    Product
  18. def productIterator: Iterator[Any]
    Definition Classes
    Product
  19. def productPrefix: String
    Definition Classes
    Product
  20. def toString(): String
    Definition Classes
    Any
  21. def tokenize(x: Any, width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0): 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
  22. def tprint[T](implicit arg0: TPrint[T], config: TPrintColors): String
  23. def treeify(x: Any): Tree
    Definition Classes
    Walker
  24. val tuplePrefix: String
    Definition Classes
    Walker
  25. object PPrinter extends Serializable
  26. object Renderer
  27. object Result
  28. object StringPrefix
  29. object TPrint extends TPrintGen[TPrint, TPrintColors] with TPrintLowPri
  30. object TPrintColors extends Serializable
  31. object TPrintLowPri
  32. object Tree
  33. object Util

Inherited from PPrinter

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Walker

Inherited from AnyRef

Inherited from Any

Ungrouped