Conversation
Breaking change: Remove global cancellation support
| } | ||
| } | ||
| else -> throw IllegalArgumentException("Required first 2 args as directory paths in this order: <required: source> <required: destination> <optional: classpath entries, one per arg..>") | ||
| fun main(vararg args: String) = unsafe { |
There was a problem hiding this comment.
IIRC Kotlin now supports suspend main.
There was a problem hiding this comment.
Error: Could not find or load main class MainKt on Kotlin 1.3.31
| interface TryFx : arrow.typeclasses.suspended.monaderror.Fx<ForTry> { | ||
| override fun monadError(): MonadThrow<ForTry> = Try.monadThrow() | ||
| } | ||
| fun <A> Try.Companion.fx(c: suspend MonadContinuation<ForTry, *>.() -> A): Try<A> = |
There was a problem hiding this comment.
Cache the monad instance I'd say.
| override fun monad(): Monad<ForOption> = Option.monad() | ||
| } | ||
| fun <A> Option.Companion.fx(c: suspend MonadContinuation<ForOption, *>.() -> A): Option<A> = | ||
| Option.monad().fx.monad(c).fix() |
There was a problem hiding this comment.
Cache the monad instance I'd say.
modules/core/arrow-typeclasses/src/main/kotlin/arrow/typeclasses/Monad.kt
Show resolved
Hide resolved
modules/effects/arrow-effects-data/src/main/kotlin/arrow/effects/typeclasses/Async.kt
Show resolved
Hide resolved
| @Suppress("DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE") | ||
| open class MonadDeferCancellableContinuation<F, A>(val SC: MonadDefer<F>, override val context: CoroutineContext = EmptyCoroutineContext) : | ||
| MonadErrorContinuation<F, A>(SC), MonadDefer<F> by SC, BindSyntax<F> { | ||
| open class AsyncContinuation<F, A>(val SC: Async<F>, override val context: CoroutineContext = EmptyCoroutineContext) : |
There was a problem hiding this comment.
For another diff we should interface this, instead of passing the full class have a new interface that composes Async<F> by SC, BindSyntax<F> or whatever.
fun <A> async(c: suspend AsyncFxEnvironment<F>.() -> A): Kind<F, A>
This is triggered once a `val` is used inside a `@documented` interface.
| logW("Failed to generate kdoc file location: $kDocLocation", e) | ||
| } | ||
| } catch (e: Exception) { | ||
| logE(e.localizedMessage) |
There was a problem hiding this comment.
....can't we use Arrow for this?
There was a problem hiding this comment.
No Arrow on the processors because the processors are used to build Arrow and we never figured out the shadow biz.
|
@pakoito I am closing this PR in favor of New generated code in |
This PR will remove the current
Fxhierarchy in favor from merging them in the current typeclass hierarchy.The corresponding
fxwill be available on the corresponding typeclasses and will be available in the following manner.breaking changes
This PR will remove the currently deprecated
binding, and it'll be replaced withfxas a typeclass method. AdditionallybindingCancelableonMonadDeferwill be removed, andbindingonMonadDeferwill be moved toAsync.