Haskell on the JVM?

I am wondering if there is a way to get Haskell to work on the JVM (compiled or interpreted)?

There is JHaskell on Sourceforge, but this one seems empty and dead.

GHC uses LLVM as a compiler. Would it be a good idea or is it possible to compile LLVM for Java bytecode? Or maybe use another compiler?

+75
jvm haskell frege jvm-languages
Aug 31 '11 at 17:38
source share
4 answers

You can learn Frege . Quote from this page:

"Frege is a non-strict, clean, functional Haskell-style programming language."

"Frege programs are compiled in Java and run in the JVM."

Based on a brief reading of the language specification, Frege seems almost a clone of Haskell. Perhaps the phrase "in the spirit of Haskell" is simple to establish the correct expectation.

+66
Sep 16 '11 at 19:49
source share

The only language I know that is close to haskell in the JVM is CAL. CAL is heavily dependent on haskell, but it does not have all haskell functions. The type system is similar to Haskell 98, and there is no syntactic sugar such as the do notation.

Here's a comparison of Haskell and CAL: CAL for Haskell programmers

The eclipse plugin is very polished and useful.

Note that CAL is part of the Open Quark framework.

+11
Sep 02 '11 at 13:11
source share

There are big but insurmountable obstacles to creating a GHC for the JVM:

http://www.haskell.org/haskellwiki/GHC:FAQ#Why_isn.27t_GHC_available_for_.NET_or_on_the_JVM.3F

(Do you have a spare year or two for this to happen?)

+9
Feb 20 2018-12-12T00:
source share

Haskell works great on the JVM. See Eta , a project that provides the complete GHC 7.10.3 Haskell on the JVM with secure Java interoperability.

+9
Jan 13 '17 at 13:32
source share



All Articles