Pretty

scalus.utils.Pretty
See thePretty companion object
trait Pretty[A]

Typeclass for pretty printing values to org.typelevel.paiges.Doc.

Pretty instances should be defined in companion objects of the types they print. This typeclass supports two rendering modes:

  • pretty: concise, single-line friendly output
  • prettyDetailed: expanded, multi-line output with full details

Example usage:

import scalus.utils.Pretty.given

val value: Value = ...
println(value.show)           // concise output
println(value.showDetailed)   // detailed output
println(value.showHighlighted) // with XTerm colors

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def pretty(a: A, style: Style = ...): Doc

Pretty print to a Doc in concise format

Pretty print to a Doc in concise format

Attributes

Concrete methods

def prettyDetailed(a: A, style: Style = ...): Doc

Pretty print to a Doc in detailed format. Defaults to pretty if not overridden.

Pretty print to a Doc in detailed format. Defaults to pretty if not overridden.

Attributes