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

Fixes merge conflict between main and arrow-2 #2835

Merged
merged 12 commits into from
Oct 5, 2022
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import retrofit2.Converter
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.converter.moshi.MoshiConverterFactory
import java.net.ConnectException
import java.net.SocketException
import java.net.SocketTimeoutException

@ExperimentalSerializationApi
Expand Down Expand Up @@ -96,7 +96,7 @@ private fun networkEitherCallAdapterTests(

body.shouldBeInstanceOf<Left<*>>()
.value.shouldBeInstanceOf<IOError>()
.cause.shouldBeInstanceOf<ConnectException>()
.cause.shouldBeInstanceOf<SocketException>()
}

"should return IOError when no response" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1311,8 +1311,7 @@ public fun <B> Either<*, B>.orNull(): B? =
orNull()

/**
* Returns the value from this [Right] or allows clients to transform [Left] to [Right] while providing access to
* the value of [Left].
* Returns the value from this [Right] or allows clients to transform the value from [Left] with the [default] lambda.
*
* Example:
* ```kotlin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public typealias IorNel<A, B> = Ior<Nel<A>, B>
* [Ior]<`A`,`B`> is similar to [Either]<`A`,`B`>, except that it can represent the simultaneous presence of
* an `A` and a `B`. It is right-biased so methods such as `map` and `flatMap` operate on the
* `B` value. Some methods, like `flatMap`, handle the presence of two [Ior.Both] values using a
* `[Semigroup]<`A`>, while other methods, like [toEither], ignore the `A` value in a [Ior.Both Both].
* [Semigroup]<`A`>, while other methods, like [toEither], ignore the `A` value in a [Ior.Both Both].
*
* [Ior]<`A`,`B`> is isomorphic to [Either]<[Either]<`A`,`B`>, [Pair]<`A`,`B`>>, but provides methods biased toward `B`
* values, regardless of whether the `B` values appear in a [Ior.Right] or a [Ior.Both].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,9 @@ public class NonEmptyList<out A>(
@Deprecated(
"Use toNonEmptyListOrNull instead",
ReplaceWith(
"Option.fromNullable<NonEmptyList<A>>(l.toNonEmptyListOrNull())",
"l.toNonEmptyListOrNull().toOption()",
"import arrow.core.toNonEmptyListOrNull",
"import arrow.core.Option",
"import arrow.core.NonEmptyList"
"import arrow.core.toOption"
)
)
@JvmStatic
Expand Down
10 changes: 10 additions & 0 deletions arrow-libs/fx/arrow-fx-coroutines/api/arrow-fx-coroutines.api
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,28 @@ public final class arrow/fx/coroutines/CircuitBreaker$State$Closed : arrow/fx/co

public final class arrow/fx/coroutines/CircuitBreaker$State$HalfOpen : arrow/fx/coroutines/CircuitBreaker$State {
public fun <init> (D)V
public synthetic fun <init> (JLkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getResetTimeout-UwyO8pc ()J
public final fun getResetTimeoutNanos ()D
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class arrow/fx/coroutines/CircuitBreaker$State$Open : arrow/fx/coroutines/CircuitBreaker$State {
public fun <init> (JD)V
public synthetic fun <init> (JJLkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getExpiresAt ()J
public final fun getResetTimeout-UwyO8pc ()J
public final fun getResetTimeoutNanos ()D
public final fun getStartedAt ()J
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract class arrow/fx/coroutines/ExitCase {
public static final field Companion Larrow/fx/coroutines/ExitCase$Companion;
}

public final class arrow/fx/coroutines/ExitCase$Cancelled : arrow/fx/coroutines/ExitCase {
Expand All @@ -111,6 +116,10 @@ public final class arrow/fx/coroutines/ExitCase$Cancelled : arrow/fx/coroutines/
public fun toString ()Ljava/lang/String;
}

public final class arrow/fx/coroutines/ExitCase$Companion {
public final fun ExitCase (Ljava/lang/Throwable;)Larrow/fx/coroutines/ExitCase;
}

public final class arrow/fx/coroutines/ExitCase$Completed : arrow/fx/coroutines/ExitCase {
public static final field INSTANCE Larrow/fx/coroutines/ExitCase$Completed;
public fun toString ()Ljava/lang/String;
Expand Down Expand Up @@ -328,6 +337,7 @@ public final class arrow/fx/coroutines/ResourceExtensionsKt {
}

public final class arrow/fx/coroutines/ResourceKt {
public static final fun allocated (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun asFlow (Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static final fun resource (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;)Lkotlin/jvm/functions/Function2;
public static final fun resource (Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public sealed class ExitCase {

public data class Cancelled(val exception: CancellationException) : ExitCase()
public data class Failure(val failure: Throwable) : ExitCase()

public companion object {
public fun ExitCase(error: Throwable): ExitCase =
if (error is CancellationException) Cancelled(error) else Failure(error)
}
}

/**
Expand Down
Loading