Haskell -> Javascript converter, kind of

(I looked but didn't see any other references to this on LtU)

There is now a Haskell -> Javascript converter using the York Haskell Compiler's (YHC's) "core" format.

From the YHC Core page:

Yhc.Core is a simple core Haskell-like language, feature case statements, let statements, top level lambda's and data values. Much of the syntactic sugar present in Haskell has gone (list comprehensions, typeclasses, overloaded names, nested lambdas)

The strengths of Yhc.Core are:

* Simple representation of Haskell
* Relatively simple to relate Core to original Haskell
* Source locations are preseved
* Minimal name mangling
* Few syntactic forms

The weaknesses are:

* Yhc cannot compile Yhc Core files, format is write only (fix is being worked on)
* Types are not present (hard to fix, a lot of work)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

One more link

I think, it is appropriate to place the original announce link here just to clarify that this is a highly experimental thing and a work in progress yet.


haXe is also an highlevel programming language that can generate to Javascript.

More high level language -> JS converters

There is hop for scheme-like, PyPy backend for restricted python, pyjamas for python-like syntax and JS semantics, Google Web Toolkit for Java, just to name a few.

a few more

Many of these projects were

Many of these projects were dicussed here before. Obviously, the Haskell angle is the real reason why this is of interest to LtU...


Ok, sorry for spam than.

Not spam

The potential problem is that we end up discussing programs instead of programming languages. I could be wrong, but Ehud is just trying to steer the topic back to the PL angle.

Edit Note: This reminds me of the first story I posted on LtU. Even with only a handful of active people, Ehud was trying to keep us on topic. :)

IT's amusing to read this

IT's amusing to read this message (six years ago? Oh my!) These projects are actually all lan guage related, and worthy of discussion, but we should usually try to keep discussions focused, I think, since this adds to the quality of discussion (i.e., dpeth).

Syntactic sugar?

Typeclasses are syntactic sugar? No, come on, how can that be possible?

If you have no typing per se

If you have no typing per se to worry about then you can view them as sugar for eg a dictionary-passing translation.