on 63243ca help sign in
elk/README.md
59 lines 2.3 kB history raw
1Learn about the Elm programming language at [elm-lang.org](http://elm-lang.org/).
4## Install
6**Arch Linux** — follow [these directions](https://github.com/evancz/Elm/wiki/Installing-Elm#arch-linux) and then
7jump to the [My First Project](#my-first-project) section.
8<br/>
9**OS X 10.9** &mdash; follow
10[these directions](http://justtesting.org/post/64947952690/the-glasgow-haskell-compiler-ghc-on-os-x-10-9)
11before continuing with the platform agnostic directions below.
13**Platform Agnostic** &mdash;
14download the [Haskell Platform 2012.2.0.0 or later](http://hackage.haskell.org/platform/).
15Once the Haskell Platform is installed:
17 cabal update
18 cabal install elm
19 cabal install elm-server
21## Use
23To use `elm` and `elm-server` you may need to add a new directory to your PATH.
25Cabal should tell you where your executables are located upon
26successful installation. It'll be something like `/home/evan/.cabal/bin`
27which you should append to your PATH variable.
28See this tutorial if you are new to changing your PATH in
29[Unix/Linux](http://www.cyberciti.biz/faq/unix-linux-adding-path/).
31## My First Project
33Now we will create a simple Elm project.
34The following commands will set-up a very basic project and start the Elm server.
36 mkdir helloElm
37 cd helloElm
38 printf "import Mouse\n\nmain = lift asText Mouse.position" > Main.elm
39 elm-server
41The first two commands create a new directory and navigate into it. The `printf`
42commands place a simple program into `Main.elm`. Do this manually if you do not
43have `printf`. The final command starts the Elm server at [localhost:8000](http://localhost:8000/),
44allowing you to navigate to `Main.elm` and see your first program in action.
46#### Final Notes
48The `elm` package provides
49[some utility functions](http://hackage.haskell.org/package/Elm) for
50working with Elm in Haskell. This can be useful for creating tooling
51for Elm, and has been useful for projects like
52[the website](http://elm-lang.org/) and
53[`elm-get`](https://github.com/evancz/elm-get). Email the list if you
54want to rely on these functions!
56If you are stuck, email
57[the list](https://groups.google.com/forum/?fromgroups#!forum/elm-discuss)
58or ask a question in the
59[#Elm IRC channel](http://webchat.freenode.net/?channels=elm).