Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell on JVM?

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?

like image 520
jeha Avatar asked Aug 31 '11 17:08

jeha


People also ask

Does Haskell run on JVM?

Haskell works beautifully on the JVM. See Eta, a project that brings full GHC 7.10. 3 Haskell onto the JVM with type-safe Java interop.

Is Haskell a JVM language?

Frege is a Haskell for the JVM. Like any Haskell, it is purely functional, enjoys a strong static type system with global type inference and non-strict - also known as lazy - evaluation. Frege compiles to Java, runs on the JVM, and uses any Java library you want. It can be used inside any Java project.

What is Eta programming?

What is Eta? Eta is a pure, lazy, strongly typed functional programming language on the JVM. It brings two big ecosystems, the JVM and Haskell, together. This allows you to harness the best of both ecosystems to build your applications quickly and effectively.

Is Python JVM based?

Other JVM LanguagesJython is the Java platform implementation of Python which runs on the JVM.


1 Answers

You may want to investigate Frege. Quoting from that page:

"Frege is a non-strict, pure functional programming language in the spirit of Haskell."

"Frege programs are compiled to Java and run in a JVM."

Based on a brief perusal of the language specification, Frege looks to be nearly a Haskell clone. Perhaps the phrase "in the spirit of Haskell" is simpy intended to set the proper expectation.

like image 88
Daniel Pratt Avatar answered Sep 24 '22 11:09

Daniel Pratt