kitttn
01/07/2019, 3:23 PMraulraja
01/07/2019, 5:52 PMsimon.vergauwen
01/07/2019, 9:31 PMIO.run
if you use IO.raiseError
instead. You’re already import binding for io directly with import arrow.effects.extensions.io.monad.binding
🙂pakoito
01/13/2019, 12:16 PMEitherT<ForIO, MyError, A>
which is slower and boilerplatysnackycracky
01/22/2019, 8:59 AMherlevsen
01/22/2019, 11:29 PMraulraja
01/28/2019, 12:22 AMbjonnh
01/28/2019, 12:29 AMraulraja
01/28/2019, 12:30 AMval a = ioValue.bind()
You can now do
val (a) = ioValue
bjonnh
01/28/2019, 1:23 AMImran/Malic
01/30/2019, 10:08 AMhttps://www.youtube.com/watch?v=3y9KI7XWXSY▾
Imran/Malic
01/30/2019, 10:08 AMbjonnh
01/31/2019, 10:02 PMbjonnh
02/03/2019, 11:41 PMwhen (call.response.status.value) {
200 -> effect { call.response.readText() }
404 -> IO.raiseError<String>(NonExistentReference).bind()
else -> IO.raiseError<String>(UnManagedReturnCode(call.response.status.value)).bind()
}
bjonnh
02/04/2019, 12:05 AMkartoffelsup
02/08/2019, 1:03 PMstreetsofboston
02/08/2019, 1:53 PMsuspend
functions ‘functional’, possibly using Arrow-Fx. I threaded my question “How can I use suspend
functions in a functional way” right here:pakoito
02/10/2019, 12:49 PMfx
streetsofboston
02/11/2019, 7:34 PMstreetsofboston
02/11/2019, 9:09 PMKind<F, A>
(and its Monad<F>
as well), how do I pry out the value of type A
?
In other word, how would I implement this extension function?
fun <F,A> Kind<F,A>.evaluateKind(monad: Monad<F>): A {
// TODO Get and return the 'A' typed value from 'this' Kind<F,A>
}
streetsofboston
02/12/2019, 4:03 PMfx { ... }
calls themselves be blocking or suspending?
Looking at the Arrow code, the fx { ... }
calls return a returnedMonad
immediately (which could cause that #1295 bug). If this is fixed and its suspending lambda does not continue immediately, will the fx
call be blocking or suspending to get the correct monad to be returned by it?
I’m asking this especially for the fx
calls returning Either
, Try
, etc values.streetsofboston
02/12/2019, 8:24 PMsetOnClickListener { myCallback() }
. Least amount of typing, i think… 🙂simon.vergauwen
02/14/2019, 12:40 PMhandleErrorWith
which exists for this exact situation.kartoffelsup
02/14/2019, 5:29 PMException in thread "main" java.lang.NoClassDefFoundError: Could not initialize class arrow.core.Either$Left
at arrow.core.Either$Companion.left(Either.kt:173)
at arrow.core.EitherKt.Left(Either.kt:196)
at arrow.effects.IORunLoop.loop(IORunLoop.kt:182)
at arrow.effects.IORunLoop.startCancelable(IORunLoop.kt:27)
at <http://arrow.effects.IO|arrow.effects.IO>$Companion$asyncF$1.invoke(IO.kt:58)
at <http://arrow.effects.IO|arrow.effects.IO>$Companion$asyncF$1.invoke(IO.kt:26)
at arrow.effects.IORunLoop$suspendInAsync$1.invoke(IORunLoop.kt:145)
at arrow.effects.IORunLoop$suspendInAsync$1.invoke(IORunLoop.kt:17)
at arrow.effects.IORunLoop.loop(IORunLoop.kt:211)
at arrow.effects.IORunLoop.start(IORunLoop.kt:20)
at arrow.effects.IO.unsafeRunAsync(IO.kt:112)
at arrow.effects.internal.Platform.unsafeResync(Utils.kt:62)
at <http://arrow.effects.IO|arrow.effects.IO>$Async.unsafeRunTimedTotal$arrow_effects_data(IO.kt:183)
at arrow.effects.IO.unsafeRunTimed(IO.kt:135)
at arrow.effects.IO.unsafeRunSync(IO.kt:132)
at NoClassDefReproKt.main(NoClassDefRepro.kt:55)
Is this a bug or am I doing it wrong?pakoito
02/14/2019, 6:01 PMpakoito
02/14/2019, 6:22 PMkartoffelsup
02/16/2019, 12:11 PMIcaro Temponi
02/19/2019, 1:45 PMstarke
02/19/2019, 8:54 PMget(): A' is deprecated. This function is unsafe and will be removed in future versions of Arrow. Replace or import `arrow.syntax.unsafe.*` if you wish to continue using it in this way
how does one import arrow.syntax.unsafe.*
? I can’t find that anywhereTim Fennis
02/22/2019, 1:46 PMTim Fennis
02/22/2019, 1:46 PMjacob
02/22/2019, 10:09 PM