Re:Idris 2 0.6.0 is now available for the JVM
by ghostwriter on Monday February 27, 2023 @06:25AM
(#34955213)
How does it interop with the existing Java libraries?
[ Parent
| on HN ]
Re:Idris 2 0.6.0 is now available for the JVM
by nerdponx on Monday February 27, 2023 @09:53AM
(#34957078)
I can't speak for the JVM backend specifically, but in general Idris 2 code can call arbitrary functions in the backend with the "%foreign" pragma. So hopefully that would be supported for Java, although I don't know how it would work with classes.
Re:Idris 2 0.6.0 is now available for the JVM
by mmhelloworld on Monday February 27, 2023 @08:25PM
(#34964534)
This file https://github.com/mmhelloworld/idris-jvm/blob/main/libs/bas... demonstrates how the interop looks like currently. The `%foreign` directive takes an FFI descriptor to talk to the respective backends. Here you can see few scheme and JVM descriptors starting with "scheme:" and "jvm:" respectively. The JVM descriptors there show constructor calls `<init>`, instance methods `.lock` and static methods `getThreadData`.