I'm wondering if there is some way to make Haskell run on the JVM (compiled or interpreted)?
There exists JHaskell on Sourceforge but this one seems to be empty and dead.
GHC uses LLVM as compiler backend. Would it be a good idea or possible to compile LLVM to Java bytecode? Or maybe use a different compiler backend?
recur
). – QuincunxGOTO
, which can be used to implement TCO. Or you use trampolines. Or you don't use the JVM call stack at all and just implement your own. The reason why Clojure and Scala only provide limited TCO (basically, only tail recursion is optimized) is because they want to use the JVM call stack for interoperability and performance reasons. As Rich Hickey, Clojure's designer said: Interop, speed, TCO -- Pick two. – Fruit