Mickey Donaghy
01/15/2021, 2:49 AMMonad#fx.monad
is deprecated - apparently fx
will be directly on the concrete datatypes? What does this mean for custom monadic datatypes - do I need to do anything to let me write fx
blocks with my custom monad?stojan
01/15/2021, 8:05 AMMickey Donaghy
01/15/2021, 8:06 AMstojan
01/15/2021, 8:09 AMraulraja
01/15/2021, 10:09 AMMickey Donaghy
01/15/2021, 10:15 AMDatabaseAction
monad and I'm using it like:
val action = DatabaseAction.DatabaseActionMonad.fx.monad {
val entity = LoadAction(Foo::class, id).bind()
entity.foo = bah
SaveAction(entity).bind()
val otherEntity = LoadAction(..).bind()
...
}
but that .fx
is marked as deprecated. So just want to be able to code in a similar style.raulraja
01/15/2021, 10:18 AMraulraja
01/15/2021, 10:18 AMraulraja
01/15/2021, 10:19 AMMickey Donaghy
01/15/2021, 10:20 AMReader<MyConnection, ?>
but I want it to be opaque so that users can't just get the MyConnection
out. Previously I've done the same thing with a free monad and I might want to do it that way too.Mickey Donaghy
01/15/2021, 10:21 AMraulraja
01/15/2021, 10:22 AMMickey Donaghy
01/15/2021, 10:23 AMCarlos Fernandes
04/03/2021, 5:50 PM1.4.30
org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'suspended' into
public suspend fun <A> rxkoltin.Connection.db(f: suspend rxkoltin.DB<A>.() -> A, continuation: kotlin.coroutines.Continuation<rxkoltin.DBAction<A>>): kotlin.Any? defined in rxkoltin in file DbEffect.kt
raulraja
04/03/2021, 7:14 PMCarlos Fernandes
04/04/2021, 7:32 AMsuspend fun <A> Connection.db(f: suspend DB<*>.() -> A): DBAction<A> {
return Effect.Companion.suspended({
DB(it, this)
}, DBAction.Companion::pure, f)
}
Carlos Fernandes
04/09/2021, 6:09 PMUnion Types
? I'm wondering if those plans changed since Higher-Kind
types is now goneraulraja
04/09/2021, 6:12 PMval x : Union2<Int, String> = 1
we need proper support for compiler plugins in the Kotlin IDEA plugin, otherwise you have to write
val x = Union2<Int, String> = 1.first()
both compile but without IDE support the first one will be red lined as a type mismatch between int and Union2raulraja
04/09/2021, 6:13 PMraulraja
04/09/2021, 6:13 PMCarlos Fernandes
04/09/2021, 6:29 PMraulraja
04/09/2021, 11:58 PMCarlos Fernandes
04/10/2021, 7:40 AM