object LogTreeSyntaxWithoutAnnotations extends LogTreeSyntax[Nothing]
- Alphabetic
- By Inheritance
- LogTreeSyntaxWithoutAnnotations
- LogTreeSyntax
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
implicit
class
AnnotationsSyntax[V] extends AnyRef
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]
- Definition Classes
- LogTreeSyntax
-
implicit
class
BooleanSyntax extends AnyRef
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 ofmyBoolean
.- Definition Classes
- LogTreeSyntax
-
implicit
class
BranchLabelingSyntax extends AnyRef
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.
- Definition Classes
- LogTreeSyntax
-
implicit
class
DisjunctionSyntax[V] extends AnyRef
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 ofmyEither
.- Definition Classes
- LogTreeSyntax
-
implicit
class
EitherSyntax[V] extends AnyRef
Syntax for treating
scala.Either
as signifiers of success or failure in a computation.Syntax for treating
scala.Either
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 ofmyEither
.- Definition Classes
- LogTreeSyntax
-
implicit
class
FoldSyntax[V] extends AnyRef
- Definition Classes
- LogTreeSyntax
-
implicit
class
LabellingSyntax[V] extends AnyRef
Syntax for labeling root nodes of trees in
DescribedComputions
Syntax for labeling root nodes of trees in
DescribedComputions
- Definition Classes
- LogTreeSyntax
-
implicit
class
LeafSyntax[V] extends AnyRef
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.- Definition Classes
- LogTreeSyntax
-
implicit
class
LeftDisjunctionSyntax[E, V] extends AnyRef
- Definition Classes
- LogTreeSyntax
-
implicit
class
MaybeSyntax[V] extends AnyRef
- Definition Classes
- LogTreeSyntax
-
implicit
class
OptionSyntax[V] extends AnyRef
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 ofmyOption
.- Definition Classes
- LogTreeSyntax
-
implicit
class
TraversableMonadSyntax[F[_], V] extends AnyRef
Syntax for dealing with traversable monads
Syntax for dealing with traversable monads
- Definition Classes
- LogTreeSyntax
-
type
DescribedComputation[V] = EitherT[LogTreeWriter, String, V]
- Definition Classes
- LogTreeSyntax
-
case class
DescribedComputationT[F[_], A](run: F[LogTreeSyntaxWithoutAnnotations.DescribedComputation[A]]) extends Product with Serializable
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
-
implicit
class
DescribedComputationTSyntax[F[_], A] extends AnyRef
This is just a small helper methods to construct DescribedComputationT for contextual f values.
This is just a small helper methods to construct DescribedComputationT for contextual f values. Example:
import scalaz.effect.IO._ import IO._ for { line1 <- readLn ~> ("read input1: " + _) line2 <- readLn ~> ("read input2: " + _) res <- putStr(line1 + line2) ~> ("output input1+input2: " + _) } return res
If you want to handle error, you can have several ways. 1. Id F is an instance of MonadError class, you can call recover error and call ~> like this
monadErrorValue.handleError( err => ..return normal computation..) ~> description
2. Or, you can inspect value via match statement and construct described computation like this.
f match { case v if v.isSuccess => DescribedComputationT(v.map(_.logSuccess(description)) case v if v.isFailure => DescribedComputationT(v.map(_.logFailure(description)) }
-
type
LogTree = Tree[LogTreeLabel[Nothing]]
- Definition Classes
- LogTreeSyntax
-
type
LogTreeWriter[V] = WriterT[scalaz.Id.Id, LogTree, V]
- Definition Classes
- LogTreeSyntax
-
type
SerializableDescribedComputation[V] = (\/[String, V], SerializableTree[Nothing])
- Definition Classes
- LogTreeSyntax
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
- implicit val dcTrans: Hoist[DescribedComputationT]
- implicit def describedComputationTEqual[F[_], A](implicit arg0: Monad[F], F0: Equal[F[DescribedComputation[A]]]): Equal[DescribedComputationT[F, A]]
- implicit def describedComputationTMonad[F[_]](implicit F0: Monad[F]): Monad[[β$1$]DescribedComputationT[F, β$1$]]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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 thevalue
, which will be a scalaz.-\/.Create a treelog.LogTreeSyntax.DescribedComputation representing a failure using the given
description
for both the log tree label and as the content of thevalue
, which will be a scalaz.-\/.- Definition Classes
- LogTreeSyntax
-
def
failureLog[V](dc: DescribedComputation[V]): DescribedComputation[V]
- Definition Classes
- LogTreeSyntax
-
def
fromSerializableForm[V](sdc: SerializableDescribedComputation[V]): DescribedComputation[V]
- Definition Classes
- LogTreeSyntax
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
implicit
val
logTreeMonoid: Monoid[LogTree] { val zero: treelog.LogTreeSyntaxWithoutAnnotations.LogTree }
- Definition Classes
- LogTreeSyntax
-
implicit
def
logTreeShow(implicit annotationShow: Show[Nothing]): Show[LogTree]
- Definition Classes
- LogTreeSyntax
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
success[V](value: V): DescribedComputation[V]
Create a treelog.LogTreeSyntax.DescribedComputation representing a success with the given
value
(lifted into a scalaz.\/-) and no description.Create a treelog.LogTreeSyntax.DescribedComputation representing a success with the given
value
(lifted into a scalaz.\/-) and no description.- Definition Classes
- 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 scalaz.\/-) and the givendescription
in the log tree.Create a treelog.LogTreeSyntax.DescribedComputation representing a success with the given
value
(lifted into a scalaz.\/-) and the givendescription
in the log tree.- Definition Classes
- LogTreeSyntax
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toSerializableForm[V](dc: DescribedComputation[V]): SerializableDescribedComputation[V]
- Definition Classes
- LogTreeSyntax
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- implicit object NothingShow extends Show[Nothing]