Paiges

object Paiges
class Object
trait Matchable
class Any

Extensions

Extensions

extension (doc: Doc)
def prefixBy(left: Doc, indent: Int): Doc
def suffixBy(right: Doc, indent: Int): Doc
def tightPrefixBy(left: Doc, indent: Int): Doc
def tightSuffixBy(right: Doc, indent: Int): Doc
extension (docs: Iterable[Doc])
def fill(s: Doc): Doc

Collapse a collection of documents into one document, delimited by a separator. Simply calls the Doc.fill method.

Collapse a collection of documents into one document, delimited by a separator. Simply calls the Doc.fill method.

For example:

import Doc.{ comma, line, text, fill } val ds = text("1") :: text("2") :: text("3") :: Nil val doc = ds.fill(comma + line)

doc.render(0) // produces "1,\n2,\n3" doc.render(6) // produces "1, 2,\n3" doc.render(10) // produces "1, 2, 3"

def stack: Doc

Concatenate the given documents together, delimited by newlines.

Concatenate the given documents together, delimited by newlines.

extension (obj: Matchable)
def toDoc: Doc