LogTreeSyntaxWithoutAnnotations
Type members
Classlikes
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
Inherited classlikes
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]
- Inherited from
- LogTreeSyntax
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
.
- Inherited from
- LogTreeSyntax
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.
- Inherited from
- LogTreeSyntax
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
.
- Inherited from
- LogTreeSyntax
Syntax for labeling root nodes of trees in DescribedComputions
Syntax for labeling root nodes of trees in DescribedComputions
- Inherited from
- LogTreeSyntax
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.
- Inherited from
- LogTreeSyntax
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
.
- Inherited from
- LogTreeSyntax
Syntax for dealing with traversable monads
Syntax for dealing with traversable monads
- Inherited from
- LogTreeSyntax
Inherited types
Value members
Inherited methods
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.
- Inherited from
- LogTreeSyntax
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.
- Inherited from
- LogTreeSyntax
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.
- Inherited from
- LogTreeSyntax