on b00a8cb help sign in
elk/README.md
60 lines 2.4 kB history raw
1Learn about the Elm programming language at [elm-lang.org](http://elm-lang.org/).
3[![Build Status](https://travis-ci.org/evancz/Elm.png)](https://travis-ci.org/evancz/Elm)
5## Install
7**Arch Linux** — follow [these directions](https://github.com/evancz/Elm/wiki/Installing-Elm#arch-linux) and then
8jump to the [My First Project](#my-first-project) section.
9<br/>
10**OS X 10.9** &mdash; follow
11[these directions](http://justtesting.org/post/64947952690/the-glasgow-haskell-compiler-ghc-on-os-x-10-9)
12before continuing with the platform agnostic directions below.
14**Platform Agnostic** &mdash;
15download the [Haskell Platform 2012.2.0.0 or later](http://hackage.haskell.org/platform/).
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. It'll be something like `/home/evan/.cabal/bin`
28which you should append to your PATH variable.
29See this tutorial if you are new to changing your PATH in
30[Unix/Linux](http://www.cyberciti.biz/faq/unix-linux-adding-path/).
32## My First Project
34Now we will create a simple Elm project.
35The following commands will set-up a very basic project and start the Elm server.
37 mkdir helloElm
38 cd helloElm
39 printf "import Mouse\n\nmain = lift asText Mouse.position" > Main.elm
40 elm-server
42The first two commands create a new directory and navigate into it. The `printf`
43commands place a simple program into `Main.elm`. Do this manually if you do not
44have `printf`. The final command starts the Elm server at [localhost:8000](http://localhost:8000/),
45allowing you to navigate to `Main.elm` and see your first program in action.
47#### Final Notes
49The `elm` package provides
50[some utility functions](http://hackage.haskell.org/package/Elm) for
51working with Elm in Haskell. This can be useful for creating tooling
52for Elm, and has been useful for projects like
53[the website](http://elm-lang.org/) and
54[`elm-get`](https://github.com/evancz/elm-get). Email the list if you
55want to rely on these functions!
57If you are stuck, email
58[the list](https://groups.google.com/forum/?fromgroups#!forum/elm-discuss)
59or ask a question in the
60[#Elm IRC channel](http://webchat.freenode.net/?channels=elm).