LogTreeSyntaxWithoutAnnotations

treelog.LogTreeSyntaxWithoutAnnotations

Attributes

Graph
Supertypes
trait LogTreeSyntax[Nothing]
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class DescribedComputationT[F[_], A](run: F[DescribedComputation[A]])

Represents a computation of type F[DescribedCompution[A]].

Represents a computation of type F[DescribedCompution[A]].

Example:

val x: Option[DescribedComputation[Int]] = Some(1 ~> "1")
val y: Option[DescribedComputation[Int]] = Some(2 ~> "1")
val z: Option[DescribedComputation[Int]] = (for {
 one <- DescribedComputationT(x)
 two <- DescribedComputationT(y)
 res <- DescribedComputationT(Some((one + two) ~> ("1 + 2 =" + _))
} yield res).run

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
object NothingShow extends Show[Nothing]

Attributes

Supertypes
trait Show[Nothing]
trait ContravariantShow[Nothing]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type

Inherited classlikes

implicit class AnnotationsSyntax[V](w: DescribedComputation[V])

Syntax for allowing annotations to be added to log tree nodes.

Syntax for allowing annotations to be added to log tree nodes.

The best way to see how this syntax works is to take a look at the annotations example on GitHub.

Here is a short example:

import scalaz.syntax.show._

val syntax = new LogTreeSyntax[String] {}
import syntax._

val result = 1 ~> "One" ~~ Set("Annotating with a string", "And another")
println(result.run.value)
// Will print: \/-(1) - note that the 'right' means ''success''

println(result.run.written.shows)
// Will print:
// One - [Annotating with a string, And another]

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class BooleanSyntax(b: Boolean)

Syntax for treating booleans as indicators of success or failure in a computation.

Syntax for treating booleans as indicators of success or failure in a computation.

The simplest usage is something like: myBoolean ~>? "Is my boolean true?". The 'value' and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure depending on the value of myBoolean.

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class BranchLabelingSyntax(description: String)

Syntax for labeling or creating new branches in a log tree given a description.

Syntax for labeling or creating new branches in a log tree given a description.

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class EitherSyntax[V](either: Either[String, V])

Syntax for treating scalaz.\/ as signifiers of success or failure in a computation.

Syntax for treating scalaz.\/ as signifiers of success or failure in a computation.

The simplest usage is something like: myEither ~>? "Do I have the right?". The 'value' and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure depending on the value of myEither.

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class FoldSyntax[V](values: Iterable[V])

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class LabellingSyntax[V](w: DescribedComputation[V])

Syntax for labeling root nodes of trees in DescribedComputions

Syntax for labeling root nodes of trees in DescribedComputions

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class LeafSyntax[V](value: V)

Syntax for lifting values into DescribedComputations and creating leaf nodes in the log tree.

Syntax for lifting values into DescribedComputations and creating leaf nodes in the log tree.

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class OptionSyntax[V](option: Option[V])

Syntax for treating Options as indicators of success or failure in a computation.

Syntax for treating Options as indicators of success or failure in a computation.

The simplest usage is something like: myOption ~>? "Do I have Some?". The 'value' and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure depending on the value of myOption.

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class TraversableMonadSyntax[F[_], V](values: F[V])(implicit evidence$1: Monad[F], evidence$2: Traverse[F])

Syntax for dealing with traversable monads

Syntax for dealing with traversable monads

Attributes

Inherited from:
LogTreeSyntax
Supertypes
class Object
trait Matchable
class Any

Inherited types

type DescribedComputation[V] = EitherT[LogTreeWriter, String, V]

Attributes

Inherited from:
LogTreeSyntax
type LogTree = Tree[LogTreeLabel[Annotation]]

Attributes

Inherited from:
LogTreeSyntax
type LogTreeWriter[V] = Writer[LogTree, V]

Attributes

Inherited from:
LogTreeSyntax
type SerializableDescribedComputation[V] = (Either[String, V], SerializableTree[Annotation])

Attributes

Inherited from:
LogTreeSyntax

Value members

Inherited methods

def failure[V](description: String): DescribedComputation[V]

Create a treelog.LogTreeSyntax.DescribedComputation representing a failure using the given description for both the log tree label and as the content of the value, which will be a Left.

Create a treelog.LogTreeSyntax.DescribedComputation representing a failure using the given description for both the log tree label and as the content of the value, which will be a Left.

Attributes

Inherited from:
LogTreeSyntax

Attributes

Inherited from:
LogTreeSyntax

Attributes

Inherited from:
LogTreeSyntax
def success[V](value: V): DescribedComputation[V]

Create a treelog.LogTreeSyntax.DescribedComputation representing a success with the given value (lifted into a Right) and no description.

Create a treelog.LogTreeSyntax.DescribedComputation representing a success with the given value (lifted into a Right) and no description.

Attributes

Inherited from:
LogTreeSyntax
def success[V](value: V, description: String): DescribedComputation[V]

Create a treelog.LogTreeSyntax.DescribedComputation representing a success with the given value (lifted into a Right) and the given description in the log tree.

Create a treelog.LogTreeSyntax.DescribedComputation representing a success with the given value (lifted into a Right) and the given description in the log tree.

Attributes

Inherited from:
LogTreeSyntax

Attributes

Inherited from:
LogTreeSyntax

Implicits

Inherited implicits

final implicit def AnnotationsSyntax[V](w: DescribedComputation[V]): AnnotationsSyntax[V]

Syntax for allowing annotations to be added to log tree nodes.

Syntax for allowing annotations to be added to log tree nodes.

The best way to see how this syntax works is to take a look at the annotations example on GitHub.

Here is a short example:

import scalaz.syntax.show._

val syntax = new LogTreeSyntax[String] {}
import syntax._

val result = 1 ~> "One" ~~ Set("Annotating with a string", "And another")
println(result.run.value)
// Will print: \/-(1) - note that the 'right' means ''success''

println(result.run.written.shows)
// Will print:
// One - [Annotating with a string, And another]

Attributes

Inherited from:
LogTreeSyntax
final implicit def BooleanSyntax(b: Boolean): BooleanSyntax

Syntax for treating booleans as indicators of success or failure in a computation.

Syntax for treating booleans as indicators of success or failure in a computation.

The simplest usage is something like: myBoolean ~>? "Is my boolean true?". The 'value' and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure depending on the value of myBoolean.

Attributes

Inherited from:
LogTreeSyntax
final implicit def BranchLabelingSyntax(description: String): BranchLabelingSyntax

Syntax for labeling or creating new branches in a log tree given a description.

Syntax for labeling or creating new branches in a log tree given a description.

Attributes

Inherited from:
LogTreeSyntax
final implicit def EitherSyntax[V](either: Either[String, V]): EitherSyntax[V]

Syntax for treating scalaz.\/ as signifiers of success or failure in a computation.

Syntax for treating scalaz.\/ as signifiers of success or failure in a computation.

The simplest usage is something like: myEither ~>? "Do I have the right?". The 'value' and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure depending on the value of myEither.

Attributes

Inherited from:
LogTreeSyntax
final implicit def FoldSyntax[V](values: Iterable[V]): FoldSyntax[V]

Attributes

Inherited from:
LogTreeSyntax
final implicit def LabellingSyntax[V](w: DescribedComputation[V]): LabellingSyntax[V]

Syntax for labeling root nodes of trees in DescribedComputions

Syntax for labeling root nodes of trees in DescribedComputions

Attributes

Inherited from:
LogTreeSyntax
final implicit def LeafSyntax[V](value: V): LeafSyntax[V]

Syntax for lifting values into DescribedComputations and creating leaf nodes in the log tree.

Syntax for lifting values into DescribedComputations and creating leaf nodes in the log tree.

Attributes

Inherited from:
LogTreeSyntax
final implicit def OptionSyntax[V](option: Option[V]): OptionSyntax[V]

Syntax for treating Options as indicators of success or failure in a computation.

Syntax for treating Options as indicators of success or failure in a computation.

The simplest usage is something like: myOption ~>? "Do I have Some?". The 'value' and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure depending on the value of myOption.

Attributes

Inherited from:
LogTreeSyntax
final implicit def TraversableMonadSyntax[F[_] : Traverse, V](values: F[V]): TraversableMonadSyntax[F, V]

Syntax for dealing with traversable monads

Syntax for dealing with traversable monads

Attributes

Inherited from:
LogTreeSyntax
implicit val logTreeMonoid: Monoid[LogTree]

Attributes

Inherited from:
LogTreeSyntax
implicit def logTreeShow(implicit annotationShow: Show[Nothing]): Show[LogTree]

Attributes

Inherited from:
LogTreeSyntax