Sunday, May 18, 2008

Haskell on BEAMs

Recent developments showed that Haskell, via conversion from Yhc Core, can run on:
Ability to run Haskell on some runtime gives Haskell programmers access to some or all features provided by that runtime, while keeping the features provided by the language unchanged. So it may be worth trying more runtimes to run Haskell programs on.

BEAM is a virtual machine Erlang runs on. Erlang provides a distributed fault-tolerant concurrency-oriented computing platform, and its use keeps widening for various kinds of applications. BEAM is in plural in this blog post's title because a distributed Erlang program is running on multiple instances of BEAM, and so would a Haskell program in the same environment.

There are projects aimed at compilation of some programming languages to Erlang or Core Erlang:
So, why not add a compiler from Yhc Core to both collections?

For about a month I have been experimenting with a converter of Yhc Core to Core Erlang. The converter was in part based on the Javascript backend converter, and in part on Haskerl. The goal was set to run a Haskell program that utilizes some commonly used subset of Haskell Prelude, and is also able to deal with creation of Erlang processes, sending, and receiving messages. This program served as an example.

The goal was reached, so I would like to publish the results for everybody to see and criticize. Any feedback is appreciated.

Read on.