on c19ccfe help sign in
elk/README.md
56 lines 2.0 kB history raw
1Learn about the Elm programming language at [elm-lang.org](http://elm-lang.org/).
4## Install
6#### On Mac OSX
8Use [the installer](https://dl.dropboxusercontent.com/u/5850974/Elm/Elm.pkg) and you are done.
9Let us know on [the list](https://groups.google.com/forum/?fromgroups#!forum/elm-discuss)
10if you have any trouble.
12#### On any platform
14Download the [Haskell Platform 2012.2.0.0](http://hackage.haskell.org/platform/).
15Elm definitely works with GHC 7.4, so newer versions of the Haskell Platform may work too.
16Once the Haskell Platform is installed:
18 cabal update
19 cabal install elm
20 cabal install elm-server
22## Use
24To use `elm` and `elm-server` you may need to add a new directory to your PATH.
26Cabal should tell you where your executables are located upon
27successful installation.
29For me, the executables were placed in `/home/evan/.cabal/bin` which I
30appended to the end of my PATH variable in my .bashrc file.
32See this tutorial if you are new to changing your PATH in
33[Unix/Linux](http://www.cyberciti.biz/faq/unix-linux-adding-path/).
35## My First Project
37Now we will create a simple Elm project.
38The following commands will set-up a very basic project and start the Elm server.
40 mkdir helloElm
41 cd helloElm
42 printf "import Mouse\n\nmain = lift asText Mouse.position" > Main.elm
43 elm-server
45The first two commands create a new directory and navigate into it. The `printf`
46commands place a simple program into `Main.elm`. Do this manually if you do not
47have `printf`. The final command starts the Elm server at [localhost:8000](http://localhost:8000/),
48allowing you to navigate to `Main.elm` and see your first program in action.
50#### Wrap up
52The `elm` package provides support for compilation of Elm code directly in Haskell and QuasiQuoting.
53Check it out on Hackage if you are interested.
55If you are stuck, email [the list](https://groups.google.com/forum/?fromgroups#!forum/elm-discuss)
56or ask a question in the [#Elm IRC channel](http://webchat.freenode.net/?channels=elm).