/eta

A Haskell to JVM compiler that supports GHC Haskell.

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Eta - Modern Haskell on the JVM

Join the chat at https://gitter.im/rahulmutt/ghcvm Build Status

Eta is a dialect of Haskell which runs on the JVM and has the following goals:

  • accessibility for beginners from imperative languages, especially Java
  • compatibility with GHC 7.10.3's Haskell.

Getting Started

If you get stuck at any point in the installation, feel free to join us on Gitter. There are two ways to do installation - via Docker or through manual installation.

Method 1: Normal installation

Prerequisites

Make sure you have the following tools installed on your system:

Installation

Clone the repository and run the install script at the root of the repo:

$ git clone --recursive https://github.com/typelead/eta
$ cd eta
$ ./install.sh

Once the installation is done, you will now have access to the following command-line tools:

  • eta - The main compiler
  • epm - The package manager and build tool

If they are not working, ensure that your stack binary path is included in your PATH.

The following packages are available upon installation:

  • ghc-prim
  • integer
  • base

Updating

Eta updates pretty fast and we're incorporating new patches on a daily basis that you might want to get access to.

If you have Eta already installed, go to the root of this repository's clone on your system, and run the following commands:

$ git pull
$ git submodule update --recursive
$ ./cleaninstall.sh

This will do a fresh install, recompiling all the core libraries with the most recent compiler.

If you have existing Epm projects, make sure you run epm clean inside each project before proceeding with your normal development so that Epm recognizes the updated libraries. If you are experiencing errors even after that, you can try deleting ~/.epm and running epm update.

Method 2: Docker

  1. Install docker for your distribution
  2. docker run -it psibi/eta

The above command will give you a environment with eta and other related executables. But note that eta is a fast moving target because of it's development pace. So you may have to update eta. You can check if it's old by navigating to /eta and issuing a git log command.

Examples

For examples of using Eta, check out:

Libraries

To see the list of currently supported libraries, check out the eta-hackage repository.

License

Eta is available under the BSD 3-Clause License, see LICENSE for more information.

Gratitude

We would like to specifically thank the following groups/people:

  • GHC HQ for providing a solid API to access the GHC infrastructure for the first stage of code generation (Haskell -> STG).
  • Alois Cochard for his codec-jvm package that we use for code generation.
  • Christopher Wells for his JAR packaging utility.
  • Brian McKenna for his bug fixes in the codegen/runtime and implementation of basic IO facilities.
  • Sibi for helping out with porting packages and setting up Travis.
  • Anton Gushcha for giving detailed bug reports on the Java FFI.

Thank you guys!