Ryan Benasutti
11/23/2019, 7:50 PM@Serializable
? Adding support for it from outside arrow is a massive pain because I have to go through this process: https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/custom_serializers.md#about-generic-serializers. (it's actually much easier to copy-paste the arrow classes I want to serialize and annotate them myself, but that's not exactly maintainable)raulraja
11/23/2019, 8:04 PMraulraja
11/23/2019, 8:05 PMRyan Benasutti
11/23/2019, 8:05 PMraulraja
11/23/2019, 8:11 PMOption
serializable.raulraja
11/23/2019, 8:11 PMraulraja
11/23/2019, 8:12 PMRyan Benasutti
11/23/2019, 8:13 PMNothing
for a reason I don't understand (getting an error inside the compiler plugin), but it should just be a matter of annotating the classes with @Serializable
.Ryan Benasutti
11/23/2019, 8:24 PM@Serializable
sealed class SerializableEither<out L, out R> {
@Serializable
data class Left<out L, out R>(val value: L) : SerializableEither<L, R>()
@Serializable
data class Right<out L, out R>(val value: R) : SerializableEither<L, R>()
fun toEither(): Either<L, R> = when (this) {
is Left -> Either.Left(value)
is Right -> Either.Right(value)
}
}
Ryan Benasutti
11/23/2019, 8:25 PMNothing
in there for Left
and Right
, but the compiler plugin can't handle it right now.raulraja
11/23/2019, 9:06 PMRyan Benasutti
11/23/2019, 9:15 PMraulraja
11/23/2019, 10:14 PMraulraja
11/23/2019, 10:15 PMRyan Benasutti
11/23/2019, 10:16 PMraulraja
11/23/2019, 10:16 PMRyan Benasutti
11/23/2019, 10:17 PMraulraja
11/23/2019, 10:18 PMNothing
in auto serialization then that is a deal breaker because that is needed for inferenceraulraja
11/23/2019, 10:18 PMRyan Benasutti
11/23/2019, 10:19 PMraulraja
11/23/2019, 10:28 PMRyan Benasutti
11/24/2019, 7:32 PMraulraja
11/26/2019, 4:55 PMNothing
. I think the issue here is that Nothing in type argument position is a valid bottom type for any higher kinded wrapped value because it denotes no inhabitants of the parametric type but not of the type.raulraja
11/26/2019, 4:56 PMraulraja
11/26/2019, 4:57 PMdephinera
10/08/2020, 9:03 PMNothing
hasn't been resolved yet. @raulraja are there any plans to add support for this in arrow or are you waiting for the issue to be fixed?raulraja
10/08/2020, 9:32 PM