<https://github.com/arrow-kt/arrow/pull/649>
# arrow
r
g
Wow, impressive. DI that provides instances of HK looks really flexible. Should try to play with it. Arrow-dagger already published?
r
@gildor when this finishes https://travis-ci.org/arrow-kt/arrow/builds/337106947 there should be a
0.6.2-SNAPSHOT
in oss jfrog at https://oss.jfrog.org/oss-snapshot-local/io/arrow-kt/
j
Will this even work? Annotation processing works for source, not compiled code, so dagger modules from library cannot be used.
r
I was under the impresion you could export modules
Just tested that this work with the latest snapshot of
arrow-dagger
This code imports all the Arrow instances from the
arrow-dagger
dependency:
Copy code
import arrow.dagger.instances.ArrowInstances

@Component(modules = [ArrowInstances::class])
interface Runtime {
    fun composedOption(): Composition<OptionHK>
}
Despite some of its restrictions Dagger seems to be enabling implicits, even scoped, at compile time.
The killer feature would be being able to @Inject on functions.