Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions changelogs/2.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
## [2.3.0](https://github.com/kevin-lee/effectie/issues?q=is%3Aissue%20is%3Aclosed%20milestone%3Av2-m5) - 2025-12-14


## New Features

* Add `OnNonFatal[F[*]]` (#684)

`OnNonFatal[F[*]]` is to do something when `F[A]` actually contains an error.

e.g.)
```scala
val fa: F[A] = ...

OnNonFatal[F].onNonFatalWith(fa) {
case SomeError(ex) => effectOf(println("ERROR!"))
}

// It prints out `ERROR!` if fa contains an error.
// If not, it does nothing.
```

* Add `syntax` for `OnNonFatal[F[*]]` (#689)

```scala
import effectie.syntax.all._

val fa: F[A] = ...

fa.onNonFatalWith {
case SomeError(ex) => effectOf(println("ERROR!"))
}

// It prints out `ERROR!` if fa contains an error.
// If not, it does nothing.
```

## Changes

* Update `CanRestart` to take `F[A]` as a by-name parameter (#685)

From
```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]
}
```
To
```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]
}
```
Loading