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