No description
Find a file
Evan Czaplicki d97c7d19d5 Merge pull request #163 from dharmatech/patch-1
Fix bug in "A Test project" section
2013-05-29 13:49:11 -07:00
compiler Get rid of ($)... 2013-05-28 17:03:48 -07:00
libraries Add the isEmpty function 2013-05-28 06:46:29 -07:00
runtime Fix the updater for plain images. 2013-05-28 16:07:43 -07:00
server Fix mistake in Graphics/Input.js library. 2013-05-22 03:05:44 +02:00
tests Rename elm/ directory to test/ 2013-05-22 10:49:53 +02:00
.gitignore Changed type signature of JSON.fromString; added multiplayer mario example 2013-02-02 19:37:05 -05:00
changelog.txt Finish moving the compiler down a directory. 2013-03-16 12:07:32 -07:00
Elm.cabal Fix issue 162: Let expressions would re-order its members such that functions always came after values. This meant that you could not use the functions to define any values within a let. 2013-05-28 07:06:14 -07:00
LICENSE Move the compiler down a directory, mostly. 2013-03-16 12:04:05 -07:00
README.md Fix bug in "A Test project" section 2013-05-29 14:57:43 -05:00
Setup.hs Revise elm-docs to copy the names of type variables in type annotations directly. 2013-05-04 18:19:54 -07:00

Learn about the Elm programming language at elm-lang.org.

Installing the Compiler

Download the Haskell Platform 2012.2.0.0. Elm definitely works with GHC 7.4, so newer versions of the Haskell Platform may work too.

Once the Haskell Platform is installed:

cabal update ; cabal install elm

Installing the Server

cabal install elm-server

Using the executables

To use elm and elm-server you need to add a new directory to your PATH.

Cabal should tell you where your executables are located upon successful installation.

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.

See this tutorial if you are new to changing your PATH in Unix/Linux.

A Test project

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
echo import Mouse > Main.elm
echo main = lift asText Mouse.position >> Main.elm
elm-server

The first two commands create a new directory and navigate into it. The echo commands place a simple program into Main.elm. Do this manually if you do not have echo. The final command starts the Elm server at localhost:8000, allowing you to navigate to Main.elm and see your first program in action.

Wrap up

The elm package provides support for compilation of Elm code directly in Haskell and QuasiQuoting. Check it out on Hackage if you are interested.

If you are stuck, email the list or ask a question in the #Elm IRC channel.