[Haskell-cafe] [ANNAUNCE] ghcjs-0.1.0 Haskell to Javascript compiler

Victor Nazarov asviraspossible at gmail.com
Wed Oct 20 19:01:14 EDT 2010

I've been working on this for some month and I think now I'm ready to
share the results.


Haskell to Javascript translator

Project aims to provide solution to

 * compile modern Haskell libraries to Javascript files and use
   them in Ajax applications or
 * develop entire Ajax application in Haskell language


Code builds as standard haskell package

    $ runghc Setup configure
    $ runghc Setup build
    $ runghc Setup install


To compile Haskell module to Javascript use `ghcjs` command.

    $ ghcjs Test.hs

This command is merely equivalent to the following

    $ ghc --make Test.hs

but it compiles to Javascript instead of native code.

See examples folder for an example of loading and running haskell code
from browser.


The code is in alpha stage. Feel free to experiment with it as you wish.


Compiler is implemented as [GHC](http://www.haskell.org/ghc/) backend
using GHC API. And been tested with GHC 6.12.1.

Victor Nazarov

More information about the Haskell-Cafe mailing list