Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inline modifier in handleErrorWith function #3550

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion arrow-libs/core/arrow-core/api/arrow-core.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,6 @@ final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (
final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/padZip(kotlin.collections/Map<#A, #C>, kotlin/Function3<#A, #B?, #C?, #D>): kotlin.collections/Map<#A, #D> // arrow.core/padZip|[email protected]<0:0,0:1>(kotlin.collections.Map<0:0,0:2>;kotlin.Function3<0:0,0:1?,0:2?,0:3>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>;3§<kotlin.Any?>}[0]
final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin.sequences/Sequence<#A>).arrow.core/zip(kotlin.sequences/Sequence<#B>, kotlin.sequences/Sequence<#C>, kotlin/Function3<#A, #B, #C, #D>): kotlin.sequences/Sequence<#D> // arrow.core/zip|[email protected]<0:0>(kotlin.sequences.Sequence<0:1>;kotlin.sequences.Sequence<0:2>;kotlin.Function3<0:0,0:1,0:2,0:3>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>;3§<kotlin.Any?>}[0]
final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?, #D: kotlin/Any?> (kotlin/Triple<#A, #B, #C>).arrow.core/plus(#D): arrow.core/Tuple4<#A, #B, #C, #D> // arrow.core/plus|[email protected]<0:0,0:1,0:2>(0:3){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>;3§<kotlin.Any?>}[0]
final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core/Either<#A, #B>).arrow.core/handleErrorWith(kotlin/Function1<#A, arrow.core/Either<#C, #B>>): arrow.core/Either<#C, #B> // arrow.core/handleErrorWith|[email protected]<0:0,0:1>(kotlin.Function1<0:0,arrow.core.Either<0:2,0:1>>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Iterable<#A>).arrow.core/crosswalkMap(kotlin/Function1<#A, kotlin.collections/Map<#B, #C>>): kotlin.collections/Map<#B, kotlin.collections/List<#C>> // arrow.core/crosswalkMap|[email protected]<0:0>(kotlin.Function1<0:0,kotlin.collections.Map<0:1,0:2>>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/align(kotlin.collections/Map<#A, #C>): kotlin.collections/Map<#A, arrow.core/Ior<#B, #C>> // arrow.core/align|[email protected]<0:0,0:1>(kotlin.collections.Map<0:0,0:2>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (kotlin.collections/Map<#A, #B>).arrow.core/flatMapValues(kotlin/Function1<kotlin.collections/Map.Entry<#A, #B>, kotlin.collections/Map<#A, #C>>): kotlin.collections/Map<#A, #C> // arrow.core/flatMapValues|[email protected]<0:0,0:1>(kotlin.Function1<kotlin.collections.Map.Entry<0:0,0:1>,kotlin.collections.Map<0:0,0:2>>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
Expand Down Expand Up @@ -920,6 +919,7 @@ final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core
final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core.raise/Raise<arrow.core/NonEmptyList<#A>>).arrow.core.raise/mapOrAccumulate(kotlin.collections/Iterable<#B>, kotlin/Function2<arrow.core.raise/RaiseAccumulate<#A>, #B, #C>): kotlin.collections/List<#C> // arrow.core.raise/mapOrAccumulate|[email protected]<arrow.core.NonEmptyList<0:0>>(kotlin.collections.Iterable<0:1>;kotlin.Function2<arrow.core.raise.RaiseAccumulate<0:0>,0:1,0:2>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core.raise/Raise<arrow.core/NonEmptyList<#A>>).arrow.core.raise/mapOrAccumulate(kotlin.sequences/Sequence<#B>, kotlin/Function2<arrow.core.raise/RaiseAccumulate<#A>, #B, #C>): kotlin.collections/List<#C> // arrow.core.raise/mapOrAccumulate|[email protected]<arrow.core.NonEmptyList<0:0>>(kotlin.sequences.Sequence<0:1>;kotlin.Function2<arrow.core.raise.RaiseAccumulate<0:0>,0:1,0:2>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core/Either<#A, #B>).arrow.core/flatMap(kotlin/Function1<#B, arrow.core/Either<#A, #C>>): arrow.core/Either<#A, #C> // arrow.core/flatMap|[email protected]<0:0,0:1>(kotlin.Function1<0:1,arrow.core.Either<0:0,0:2>>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core/Either<#A, #B>).arrow.core/handleErrorWith(kotlin/Function1<#A, arrow.core/Either<#C, #B>>): arrow.core/Either<#C, #B> // arrow.core/handleErrorWith|[email protected]<0:0,0:1>(kotlin.Function1<0:0,arrow.core.Either<0:2,0:1>>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core/Either<#A, #C>).arrow.core/recover(kotlin/Function2<arrow.core.raise/Raise<#B>, #A, #C>): arrow.core/Either<#B, #C> // arrow.core/recover|[email protected]<0:0,0:2>(kotlin.Function2<arrow.core.raise.Raise<0:1>,0:0,0:2>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core/Ior<#A, #B>).arrow.core/flatMap(kotlin/Function2<#A, #A, #A>, kotlin/Function1<#B, arrow.core/Ior<#A, #C>>): arrow.core/Ior<#A, #C> // arrow.core/flatMap|[email protected]<0:0,0:1>(kotlin.Function2<0:0,0:0,0:0>;kotlin.Function1<0:1,arrow.core.Ior<0:0,0:2>>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
final inline fun <#A: kotlin/Any?, #B: kotlin/Any?, #C: kotlin/Any?> (arrow.core/Ior<#A, #B>).arrow.core/handleErrorWith(kotlin/Function2<#B, #B, #B>, kotlin/Function1<#A, arrow.core/Ior<#C, #B>>): arrow.core/Ior<#C, #B> // arrow.core/handleErrorWith|[email protected]<0:0,0:1>(kotlin.Function2<0:1,0:1,0:1>;kotlin.Function1<0:0,arrow.core.Ior<0:2,0:1>>){0§<kotlin.Any?>;1§<kotlin.Any?>;2§<kotlin.Any?>}[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ public inline fun <A, B, C> Either<A, B>.flatMap(f: (right: B) -> Either<A, C>):
*
* @param f The function to bind across [Left].
*/
public fun <A, B, C> Either<A, B>.handleErrorWith(f: (A) -> Either<C, B>): Either<C, B> {
public inline fun <A, B, C> Either<A, B>.handleErrorWith(f: (A) -> Either<C, B>): Either<C, B> {
contract { callsInPlace(f, InvocationKind.AT_MOST_ONCE) }
return when (this) {
is Left -> f(this.value)
Expand Down Expand Up @@ -1338,7 +1338,7 @@ public fun <A, B> Either<A, Either<A, B>>.flatten(): Either<A, B> =
*/
public inline infix fun <A, B> Either<A, B>.getOrElse(default: (A) -> B): B {
contract { callsInPlace(default, InvocationKind.AT_MOST_ONCE) }
return when(this) {
return when (this) {
is Left -> default(this.value)
is Right -> this.value
}
Expand Down
Loading