I am a Scala beginner and coming from Object Oriented Paradigm. While understanding Functional programming part of Scala, I was directed to Haskell – the pure Functional programming language.
Exploring SO question-answers, I found that Java – Haskell has interoperability.
I am curious to know that similarly does Scala-Haskell interoperability exist or not?
Can a function library written in Haskell be used in Scala application?
As per answer given by Don Stewart: It is possible.
Integration of Haskell Function Library in Scala application will be straight and easy or will require complicated tweaks?
With integrated Haskell Function Library, the Scala application will run on JVM or will require different arrangement?
Well given that interoperability is transitive, and given that
(hj_interop : Haskell <-> Java)and(js_interop : Java <-> Scala), we therefore conclude thatHaskell <-> Scala.If you want
Haskell -> Scala, then just takeHaskell -> Javafromhj_interop, andJava -> Scalafromjs_interop. If you wantScala -> Haskell, then just takeScala -> Javafromjs_interop, andJava -> Haskellfromhj_interop.This isn’t a very hand-holdy explanation of how to accomplish Haskell – Scala interoperability, but given existing interoperatilities, you just compose them in the obvious way. Scala does not provide any direct, convenient interoperability with Haskell that I am aware of, other than providing
scalazto add an extra Haskell-y feel to Scala. Haskell does not provide any direct, convenient interoperability with Scala that I am aware of.