v2.0.0-beta12
2.0.0-beta12 - 2023-09-09
New Features
-
Add
CanRestart
for retryingF[A]
(#566)trait CanRestart[F[*]] { def restartWhile[A](fa: F[A])(p: A => Boolean): F[A] def restartUntil[A](fa: F[A])(p: A => Boolean): F[A] def restartOnError[A](fa: F[A])(maxRetries: Long): F[A] def restartOnErrorIfTrue[A](fa: F[A])(p: Throwable => Boolean): F[A] }
-
Add instances of
CanCatch
,CanHandleError
,CanRecover
,FromFuture
,Fx
andFxCtor
withSync
andAsync
(#568)So it can be done like this with the
effectie.instances.ce2.f
andeffectie.instances.ce3.f
packages.def foo[F[*]: Fx](n: Int): F[Int] = Fx[F].effectOf(n * 2) // Fx[F] can be satisfied with just Sync[F] like this. import effectie.instances.ce2.f.fx._ def bar[F[*]: Sync](n: Int): F[Int] = foo(n)