Skip to content

Commit

Permalink
Merge pull request #570 from kevin-lee/prepare-to-release
Browse files Browse the repository at this point in the history
effectie v2.0.0-beta12
  • Loading branch information
kevin-lee authored Sep 9, 2023
2 parents 2db23f0 + 3a6471d commit 2a966fa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions changelogs/2.0.0-beta12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## [2.0.0-beta12](https://github.com/kevin-lee/effectie/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av2-m1+closed%3A2023-07-23..2023-09-09) - 2023-09-09

### New Features
* Add `CanRestart` for retrying `F[A]` (#566)
```scala
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` and `FxCtor` with `Sync` and `Async` (#568)

So it can be done like this with the `effectie.instances.ce2.f` and `effectie.instances.ce3.f` packages.
```scala
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)
```
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "2.0.0-SNAPSHOT"
ThisBuild / version := "2.0.0-beta12"

0 comments on commit 2a966fa

Please sign in to comment.