Can arrow be used without kapt? Just the monad imp...
# arrow
p
Can arrow be used without kapt? Just the monad implementations for option either etc?
g
Yes
p
Thanks. Do I need anything besides depending on arrow-core?
g
nothing, if u r not doing anything effectful
r
99% of the usage of arrow probably needs ArrowFx
Arrow core is just a fundation library for abstractions but idiomatic apps in Kotlin that do any work with suspend need Fx
p
I'm only working with pure code - separated all IO into different modules entirely. I'll eventually use fx but for now all I need are simply folds over a few monads and no effects. I would really like lenses as well but kapt doesn't play well with maven or idea yet so can't use it.
r
You can still write the lens DSL boilerplate manually
Shouldn't be hard
In which case what you need is just to depend on Optics
Let us know if we can help you with an example if you have a model
p
Can you point me to an example handwritten lens dsl boilerplate? I'll explore that if it is not too cumbersome.
r
I can automatically generated it for you for any ADT you have in mind or dig an example in a sec. An alternative is that you run Gradle as a step in maven to run kapt before maven builds
I was under the impression that kapt ran in maven just fine
But never tried it
The positive thing about you hand typing the DSL is that is gonna make you understand how all optics work
So it will be a fun exercise
p
one thing you can do is enable kapt, generate the instances, then copypaste them from the build folder into the src folder and commit them 😉
then remove kapt afterwards
p
that is a neat trick, can even do it standalone in a new project to just generate the instances.
👌🏼 1
p
now you do a script to automate it and you've become the build infra guy
😰 1