PureharmEffectsTypeDefinitions

Authors
Since

13 Jun 2019

class Object
trait Matchable
class Any

Type members

Types

type Attempt[+R] = Attempt[R]
type AttemptT[F[_], R] = AttemptT[F, R]

Used to block on an F[A], and ensure that all recovery and shifting back is always done.

Used to block on an F[A], and ensure that all recovery and shifting back is always done.

For instance, always ensure that any F[A] that talks to, say, amazon S3, is wrapped in such a

 blockingShifter.blockOn(S3Util.putSomething(...))

Libraries in the typelevel eco-system tend to already do this, so you don't need to be careful. For instance, doobie will always ensure that this is done to and from the EC that you provide specifically for accessing the DB. But you always need to double check, and be careful that you NEVER execute blocking IO on the same thread pool as the CPU bound one dedicated to your ContextShift[A]

Deprecated types

@deprecated("Use ApplicativeThrow instead", "0.1.0")
type ApplicativeAttempt[F[_]] = ApplicativeError[F, Throwable]

Useful since we don't have partial kind application by default Usage:

Useful since we don't have partial kind application by default Usage:

 def canFail[F[_]: ApplicativeAttempt, T](p1: T) : F[T] = ???
Deprecated
@deprecated("Use BracketThrow instead", "0.1.0")
type BracketAttempt[F[_]] = Bracket[F, Throwable]
Deprecated
@deprecated("Use MonadThrow instead", "0.1.0")
type MonadAttempt[F[_]] = MonadError[F, Throwable]

Useful since we don't have partial kind application by default Usage:

Useful since we don't have partial kind application by default Usage:

 def canFail[F[_]: MonadAttempt, T](p1: T) : F[T] = ???
Deprecated

Value members

Concrete fields

val AttemptT: EitherT