https://kotlinlang.org logo
#arrow-contributors
Title
# arrow-contributors
r

raulraja

02/18/2018, 12:40 AM
@prat What does the generated
EitherHashInstanceImplicits
look like?
p

prat

02/18/2018, 12:41 AM
one minute...looking
Copy code
object EitherHashInstanceImplicits {
  fun <L, R> instance(EQL: arrow.typeclasses.Eq<L>, HSL: arrow.typeclasses.Hash<L>, EQR: arrow.typeclasses.Eq<R>, HSR: arrow.typeclasses.Hash<R>): EitherHashInstance<L, R> =
    object : EitherHashInstance<L, R> {
      override fun EQL(): arrow.typeclasses.Eq<L> = EQL
      override fun HSL(): arrow.typeclasses.Hash<L> = HSL
      override fun EQR(): arrow.typeclasses.Eq<R> = EQR
      override fun HSR(): arrow.typeclasses.Hash<R> = HSR
    }
}


fun <L, R> arrow.core.Either.Companion.hash(EQL: arrow.typeclasses.Eq<L>, HSL: arrow.typeclasses.Hash<L>, EQR: arrow.typeclasses.Eq<R>, HSR: arrow.typeclasses.Hash<R>, @Suppress("UNUSED_PARAMETER") dummy: kotlin.Unit = kotlin.Unit): EitherHashInstance<L, R> =
  EitherHashInstanceImplicits.instance(EQL, HSL, EQR, HSR)



inline fun <reified L, reified R> arrow.core.Either.Companion.hash(EQL: arrow.typeclasses.Eq<L> = arrow.typeclasses.eq<L>(), HSL: arrow.typeclasses.Hash<L> = arrow.typeclasses.hash<L>(), EQR: arrow.typeclasses.Eq<R> = arrow.typeclasses.eq<R>(), HSR: arrow.typeclasses.Hash<R> = arrow.typeclasses.hash<R>()): EitherHashInstance<L, R> =
  EitherHashInstanceImplicits.instance(EQL, HSL, EQR, HSR)
r

raulraja

02/18/2018, 12:44 AM
Looks correct which denotes a problem applying the arguments in the instance resolution step.
p

prat

02/18/2018, 12:46 AM
i see. that makes sense
If you want to file an issue I can look into it when I get some time, unless you want to give it a shot at fixing it yourself
p

prat

02/18/2018, 12:48 AM
sounds good. i will look into it. if i can't figure, will file a ticket
👍 1
r

raulraja

02/18/2018, 12:48 AM
thanks!
For what is worth, what works best there is the debugger and look at the memory state of
values
etc.
That is the only part of Arrow that is dynamic and hopefully we can trash when Keep 87 sees the light
👍 2
p

prat

02/18/2018, 12:49 AM
awesome. thanks for the pointer
r

raulraja

02/18/2018, 12:49 AM
no problem, thanks for taking the time to look into it
👍 1
merged!
p

prat

02/18/2018, 9:32 PM
🆒