No description
Find a file
Evan Czaplicki 6bffee3525 Merge pull request #218 from johnpmayer/topic/kbd_caper
fixed wierd keyboard stuff by factoring out keypress events
2013-08-18 13:27:23 -07:00
compiler Fix generation of JS code for pattern matching on literals 2013-08-16 12:41:30 -07:00
libraries toCode needs to use uppercase, since keyboard separates key and modifier 2013-08-15 06:09:13 +00:00
runtime Fix transparency issue in #210 2013-08-16 00:07:32 -07:00
server Give minum require ment for elm-server 2013-08-12 23:16:12 -07:00
tests Remove scripts that are not used anymore 2013-08-16 16:53:30 -07:00
.gitignore add the new data dir to ignore 2013-08-09 23:39:34 -07:00
changelog.txt add elm-server to changelog 2013-08-10 23:43:36 -07:00
Contributor Agreement.docx Add the contributor agreement. 2013-06-03 15:09:44 -07:00
Elm.cabal Clean up after testing 2013-08-16 03:26:51 -07:00
LICENSE Move the compiler down a directory, mostly. 2013-03-16 12:04:05 -07:00
README.md Pull the Mac installer until it is updated to 0.9 2013-08-09 23:21:42 -07:00
Setup.hs move the home of the data files out of dist/ (cabal complained) 2013-08-09 23:20:22 -07:00

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

Install

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
cabal install elm-server

Use

To use elm and elm-server you may 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.

My First 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
printf "import Mouse\n\nmain = lift asText Mouse.position" > Main.elm
elm-server

The first two commands create a new directory and navigate into it. The printf commands place a simple program into Main.elm. Do this manually if you do not have printf. 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.