haskell-python /

Filename Size Date modified Message
215 B
271 B
51 B
1.6 KB
2.4 KB
407 B


A Haskell Virtual Machine implemented in RPython.


This project aims to implement Haskell with the RPython translation toolchain from the PyPy project. The goal is to investigate if Haskell can benefit from just-in-time compilation techniques, and to show that PyPy is a suitable platform for purely functional and lazy languages (e.g. Haskell).

Our Haskell virtual machine is named pyhaskell.


pyhaskell currently support a small subset of the Haskell language.

Run the testsuite to better see what is currently supported.

Problems with GHC's external Core support is currently the biggest issue preventing us from completing this project at this time.

TODO: add a more detailed description of what is supported and not.


  1. PyPy source code
  2. Glasgow Haskell Compiler (tested with GHC 7.4.1)
  3. json
  4. extcore

Optional dependencies:


  1. Install dependencies listed above
  2. Add the PyPy repository folder to your PYTHONPATH env variable.
  3. Add the path to pyhaskell/ folder to your PYTHONPATH env variable.
  4. Compile core2js program by running make compile
  5. Run all tests with make testall (optional)
  6. Translate pyhaskell to C, run either:
    1. make translate to include the JIT
    2. make nojit


TODO: add a LICENSE file for the haskell-python project.



Haskell libraries

Haskell libraries are loaded from the folder 'pyhaskell/builtin', if a library does not exist there, it attempts to load it from 'pyhaskell/ghc_modules'.

We use RPython to implement some Haskell libraries, as this can be beneficial for testing as well as optimizations. The remaining libraries are generated from GHC's source code.

Currently the generated libraries have been removed, as they did not work and were generated from an outdated GHC version. They can be found at <>.