ShowTell

ostrat.ShowTell
See theShowTell companion object
trait ShowTell[A <: Tell] extends Show[A]

A sub trait of the Show sub class where the type parameter extends Tell. This allows this Show type class to delegate to the Tell object for the implementation of its strT and Show methods. It is better to use Tell and ShowTell for types you control rather than have the toString method delegate to the Show type class instance in the companion object. Potentially that can create initialisation order problems, but at the very least it can increase compile times. The typeStr is the only data that a Show instance requires, that can't be implemented through delegation to the Tell object.

Attributes

Companion
object
Graph
Supertypes
trait Show[A]
trait Persist
class Object
trait Matchable
class Any
Known subtypes
trait ShowTell2[A1, A2, R]
class ShowTell2Imp[A1, A2, R]
trait ShowTellDbl2[R]
class ShowTellDbl2Imp[R]
trait ShowTellElemDbl2[R]
class ShowTellDbl2Imp[R]
class ShowTellInt2[R]
trait ShowTell4[A1, A2, A3, A4, R]
class ShowTell4Imp[A1, A2, A3, A4, R]
class ShowTellInt4[R]
trait ShowTellN[A]
class ShowTellSimple[R]
Show all

Members list

Value members

Concrete methods

override def show(obj: A, way: ShowStyle, maxPlaces: Int, minPlaces: Int): String

Attributes

Definition Classes
override def strT(obj: A): String

Provides the standard string representation for the object. Its called ShowT to indicate this is a type class method that acts upon an object rather than a method on the object being shown.

Provides the standard string representation for the object. Its called ShowT to indicate this is a type class method that acts upon an object rather than a method on the object being shown.

Attributes

Definition Classes
override def syntaxDepth(obj: A): Int

Simple values such as Int, String, Double have a syntax depth of one. A Tuple3[String, Int, Double] has a depth of 2. Not clear whether this should always be determined at compile time or if sometimes it should be determined at runtime.

Simple values such as Int, String, Double have a syntax depth of one. A Tuple3[String, Int, Double] has a depth of 2. Not clear whether this should always be determined at compile time or if sometimes it should be determined at runtime.

Attributes

Definition Classes

Inherited methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Show -> Any
Inherited from:
Show

The type of the object to be persisted.

The type of the object to be persisted.

Attributes

Inherited from:
Persist

This property determines if the type can be used with Multiple syntax.

This property determines if the type can be used with Multiple syntax.

MyObj * 7

. for describing sequences succinctly. This is not desirable for some types such as numerical and mathematical vector types as this could be confusing 3 * 4 should resolve to an Int of value 12, not a Multiple(3, 4).

Attributes

Inherited from:
Persist