[Haskell-cafe] ECMA262 (Javascript) interpreter

Tobias Dammers tdammers at gmail.com
Sat Jan 3 21:21:04 UTC 2015

Hi again;

I took a short look, and I think this looks like a promising candidate.
The things I'd miss the most at this point would be: one, splitting the
project up into a library and a CLI interpreter, so that it can be
embedded into a Haskell host application without further ado; two,
putting it on hackage (minor concern right now, but if at any time I
choose to publish my project, I don't want to depend on anything that's
not readily available through cabal); and three, a tiny bit more
documentation, or even just a few usage examples.

I'd be willing to help out with either if you're interested.



On Sun, Dec 07, 2014 at 03:48:47PM +1000, Fabian Bergmark wrote:
> I have been implementing an ECMA-262 (Javascript) interpreter over the
> last few weeks. I have been following
> http://www.ecma-international.org/ecma-262/5.1 and tried to keep my
> implementation as close to the specification as possible.
> The code can be found here https://github.com/fabianbergmark/ECMA-262
> So far I have implemented the core language, but has yet to write all
> the specification functions (Array.splice, String.substring etc.).
> Before I do this and release it on hackage, I would appreciate
> feedback on my implementation.
> The issues I see at the time are:
> * The parser is slow for deeply nested code
> * Strict mode is not implemented
> * Interpret.hs is ~ 6k lines
> * SubType.hs uses IncoherentInstances, and a better implementation
> would be nice. At the moment it works but for one case.
> To test the code, install the cabal package and run ecma262 on a .js
> file. One host object, console.log is provided and prints to stdout.
> Fabian Bergmark
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list