package pretty
Implementation of a pretty printer inspired by Wadler's one and adapted to strict language (port of https://github.com/kfl/wpp).
- Source
- package.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- pretty
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- sealed trait Doc extends AnyRef
A pretty-printed document that can then be rendered to a certain witdh.
- trait Pretty[-T] extends AnyRef
Typeclass for types that can be pretty-printed.
Typeclass for types that can be pretty-printed.
- Annotations
- @implicitNotFound("No idea how to pretty-print a ${T}")
- implicit final class PrettyOps[T] extends AnyVal
Value Members
- def break(sp: Int, off: Int): Doc
- def concat(ds: Seq[Doc]): Doc
- val empty: Doc
- def fromConv[T](conv: (T) => String, t: T): Doc
- def group(d: Doc): Doc
- def int(i: Int): Doc
- val line: Doc
- def nest(indent: Int, d: Doc): Doc
- val newline: Doc
- def seq[T](sep: Doc, render: (T) => Doc, ts: Seq[T]): Doc
- def seq(sep: Doc, ts: Seq[Doc]): Doc
- def seq[T](sep: Doc, ts: Seq[T])(implicit T: Pretty[T]): Doc
- val space: Doc
- def str(t: String): Doc
- implicit object DocPretty extends Pretty[Doc]
- implicit object IntPretty extends Pretty[Int]