[Haskell] ANN YCR2JS, a Yhc Core to Javascript Converter

Dimitry Golubovsky golubovsky at gmail.com
Mon Nov 13 10:55:15 EST 2006


Ycr2js is a sub-project within the York Haskell Compiler (Yhc)
project. It is aimed to create a tool to convert an arbitrary Haskell
program into Javascript which in turn may be executed in any Web

I am pleased to announce that, with great amount of help from the Yhc
Team, the converter has been integrated into the Yhc project, and
initial stage of coding and development has been completed.

Interested members of the Haskell community are invited to experiment
with the Converter. It can be obtained with current Yhc snapshot from


At this point, it is possible to convert a Haskell program into
Javascript and create a XHTML page for viewing in a Web browser.

No framework is available to access DOM in type safe way, and/or
support for AJAX. Not all low-level primitives have been mapped to
Javascript or optimized for the Javascript environment. These are
tasks for next stages and will be worked on in near future.

It was by no means only my idea to generate Javascript from Haskell.
Several people expressed this idea earlier in blogs and mailing lists.
I was interested in this myself, and just decided to go ahead and
implement it.

Documentation (partially written) is available:


At the moment of this announce, there is one live demo:


also referred to from the Wiki page mentioned. Type any text in the
input field provided, and see it echoed right above after Enter is
pressed. Just for fun, type any decimal number and see it converted to
a Roman number, and vice versa. Roman numerals module (C) Malcolm
Wallace, originally from


On not so fast computers, the demo may show some delays (e. g. 3 - 5
seconds on a 375 MHz Intel Celeron, Netscape7, Linux) between the text
is typed and echoed (mostly due to Roman number conversion). This is
being worked on.

Ycr2js is work in progress. What is most needed is users feedback that
would help improve it. Any feedback will be greatly appreciated.

Thanks everyone who helped me in any way.

Feel free to contact me at golubovsky at gmail.com

Dimitry Golubovsky

Anywhere on the Web

More information about the Haskell mailing list