on ab53fac help sign in
elk/README.md
51 lines 1.9 kB history raw
1Learn about the Elm programming language at [elm-lang.org](http://elm-lang.org/).
4## Install
6**Note for OS X 10.9 Maverics:** you must follow
7[these directions](http://justtesting.org/post/64947952690/the-glasgow-haskell-compiler-ghc-on-os-x-10-9)
8before continuing!
10Download the [Haskell Platform 2012.2.0.0 or later](http://hackage.haskell.org/platform/).
11Once the Haskell Platform is installed:
13 cabal update
14 cabal install elm
15 cabal install elm-server
17## Use
19To use `elm` and `elm-server` you may need to add a new directory to your PATH.
21Cabal should tell you where your executables are located upon
22successful installation.
24For me, the executables were placed in `/home/evan/.cabal/bin` which I
25appended to the end of my PATH variable in my .bashrc file.
27See this tutorial if you are new to changing your PATH in
28[Unix/Linux](http://www.cyberciti.biz/faq/unix-linux-adding-path/).
30## My First Project
32Now we will create a simple Elm project.
33The following commands will set-up a very basic project and start the Elm server.
35 mkdir helloElm
36 cd helloElm
37 printf "import Mouse\n\nmain = lift asText Mouse.position" > Main.elm
38 elm-server
40The first two commands create a new directory and navigate into it. The `printf`
41commands place a simple program into `Main.elm`. Do this manually if you do not
42have `printf`. The final command starts the Elm server at [localhost:8000](http://localhost:8000/),
43allowing you to navigate to `Main.elm` and see your first program in action.
45#### Final Notes
47The `elm` package provides support for compilation of Elm code directly in Haskell.
48Check it out [on Hackage](http://hackage.haskell.org/package/Elm) if you are interested.
50If you are stuck, email [the list](https://groups.google.com/forum/?fromgroups#!forum/elm-discuss)
51or ask a question in the [#Elm IRC channel](http://webchat.freenode.net/?channels=elm).