Class

treelog.LogTreeSyntaxWithoutAnnotations

DescribedComputationTSyntax

Related Doc: package LogTreeSyntaxWithoutAnnotations

Permalink

implicit class DescribedComputationTSyntax[F[_], A] extends AnyRef

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))
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DescribedComputationTSyntax
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DescribedComputationTSyntax(fa: F[A])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. def logFailure(description: (A) ⇒ String)(implicit F: Functor[F]): DescribedComputationT[F, A]

    Permalink
  12. def logSuccess(description: (A) ⇒ String)(implicit F: Functor[F]): DescribedComputationT[F, A]

    Permalink
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  16. def success()(implicit F: Functor[F]): DescribedComputationT[F, A]

    Permalink
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def ~>(description: (A) ⇒ String)(implicit F: Functor[F]): DescribedComputationT[F, A]

    Permalink
  23. def ~>(description: String)(implicit F: Functor[F]): DescribedComputationT[F, A]

    Permalink
  24. def ~>!(description: String)(implicit F: Functor[F]): DescribedComputationT[F, A]

    Permalink
  25. def ~>!(description: (A) ⇒ String)(implicit F: Functor[F]): DescribedComputationT[F, A]

    Permalink

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped