implicit val showA =
Print[A] {
new Print(_) {
val A(n, s) = t
echo(s"$n, $s")
}
}
echo and other CanPrint utilities are availabe to write to an implicit Printer wrapping a
ByteArrayOutputStream from which a string-representation is parsed.
case classPrinter(ps: PrintStream) extends Product with Serializable
case classSampleSize(size: Option[Int]) extends Product with Serializable
Wrapper for implementing Shows using a Printer.
Example syntax (from test):
implicit val showA = Print[A] { new Print(_) { val A(n, s) = t echo(s"$n, $s") } }
echo and other CanPrint utilities are availabe to write to an implicit Printer wrapping a ByteArrayOutputStream from which a string-representation is parsed.