Readme for Elm-0.1.1.6

Elm

This is the Elm compiler and server, allowing you to develop Elm applications that run in any modern browser.

Installation Process

Download the Haskell Platform. This will give you access to the Haskell compiler (needed to build Elm) and Haskell's package distribution system (to make installation of Elm easier). Once installed (even if it already was), you must update your listing of Haskell packages with:

cabal update

This will ensure that the elm package is available. Then install Elm with:

cabal install elm

Assuming everything goes correctly (potential problems are discussed later), this will build two executables on your machine:

To use these executables you need to add a new directory to your PATH. For me, the executables were placed in /home/evan/.cabal/bin which I appended to the end of my PATH variable in my .bashrc file. Cabal should tell you where your executables are located, so you can make a similar addition (see this tutorial if you are new to changing your PATH in Unix/Linux).

That is almost everything. Now, we will create a simple Elm project. The following commands will set-up a very basic project and start the Elm server.

mkdir helloElm
cd helloElm
wget https://raw.github.com/evancz/Elm/master/elm-mini.js
echo main = lift asText Mouse.position > main.elm
elm-server

The first two commands create a new directory and navigate into it. Then next command (wget) downloads the elm-mini.js file which is the Elm runtime system and must be in the root directory of your Elm project. If you do not have wget, just follow this link and download it directly. The echo command places a simple program into main.elm. The final command starts the Elm server at localhost, allowing you to navigate to main.elm and see your first program in action.

Potential problems and their solutions:

Areas for further work:

Error messages need work in general. Syntax and Parsing errors are reported, but the messages are not very helpful. Type errors currently go unreported. I hope to fix this as soon as possible.

If you are interested in making a large contribution, please contact me at info (at) elm-lang (dot) org so that we do not duplicate any work!