on e3c3d21 help sign in
elk/README.md
47 lines 1.7 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 or later](http://hackage.haskell.org/platform/).
7Once the Haskell Platform is installed:
9 cabal update
10 cabal install elm
11 cabal install elm-server
13## Use
15To use `elm` and `elm-server` you may need to add a new directory to your PATH.
17Cabal should tell you where your executables are located upon
18successful installation.
20For me, the executables were placed in `/home/evan/.cabal/bin` which I
21appended to the end of my PATH variable in my .bashrc file.
23See this tutorial if you are new to changing your PATH in
24[Unix/Linux](http://www.cyberciti.biz/faq/unix-linux-adding-path/).
26## My First Project
28Now we will create a simple Elm project.
29The following commands will set-up a very basic project and start the Elm server.
31 mkdir helloElm
32 cd helloElm
33 printf "import Mouse\n\nmain = lift asText Mouse.position" > Main.elm
34 elm-server
36The first two commands create a new directory and navigate into it. The `printf`
37commands place a simple program into `Main.elm`. Do this manually if you do not
38have `printf`. The final command starts the Elm server at [localhost:8000](http://localhost:8000/),
39allowing you to navigate to `Main.elm` and see your first program in action.
41#### Final Notes
43The `elm` package provides support for compilation of Elm code directly in Haskell.
44Check it out [on Hackage](http://hackage.haskell.org/package/Elm) if you are interested.
46If you are stuck, email [the list](https://groups.google.com/forum/?fromgroups#!forum/elm-discuss)
47or ask a question in the [#Elm IRC channel](http://webchat.freenode.net/?channels=elm).