Steven Sherry
03/08/2020, 6:44 PMMike
03/08/2020, 7:04 PMJannis
03/08/2020, 7:13 PMfold
functions the use of inline is quite rare isn't it? At least on arrow core most inline functions were functions that kapt extensions for functions optics generates and fold
. Arrow used to have a lot more inline functions quite a long time ago though. What version are you on? o.Ofix
is always inline
as well.Steven Sherry
03/08/2020, 7:19 PM<http://Validated.applicative.ma|Validated.applicative.ma>p().fix()
. I omitted the arguments for brevity’s sake.Jannis
03/08/2020, 7:23 PMfix
is really pervasive right now. It is just a typecast and thus probably better to have it inline. We hope to remove it with arrow-meta as soon as possible because it is literally just boilerplate to patch a compiler weakness...I’m on version 0.10.4 to answer one of your previous questionsThen it should really only be
fold
/ fix
and some function composition code with inline
(and @optics
generated code). A while ago much more of arrow was using inline
but that lead to a few weird things regarding our fx
blocksSteven Sherry
03/08/2020, 7:25 PMJannis
03/08/2020, 7:27 PMval x: Kind<ForOption, X> = Some(...)
when (x) {
is Some -> ...
is None -> ...
}
I mean that should work, but the compiler should hate it o.OSteven Sherry
03/08/2020, 7:28 PMJannis
03/08/2020, 7:30 PMval x: Kind<ForOption, X> = Some(...)
val y: Option<X> = x
Steven Sherry
03/08/2020, 7:34 PMfix()
, I was able to drastically improve my code coverage doing the following in my tasks block inside of my build.gradle.kts :
jacocoTestReport {
classDirectories.setFrom(
sourceSets.main.get()
.output.asFileTree.matching {
exclude("**/*inlined*.class")
}
)
}
Mike
03/09/2020, 2:19 AMSteven Sherry
03/09/2020, 2:28 AMMike
03/09/2020, 9:23 PM