on master help sign in
Update README.md
4877290evancz
README.md+48−11
@@ -1,15 +1,33 @@
1Elm
1Elm
2===
2===
3
3
4−This is the Elm compiler and server, allowing you to develop Elm applications that run in any modern browser.
4+This is the Elm compiler and server, allowing you to develop Elm
5+applications that run in any modern browser.
5
6
7+If you intend to serve Elm code with a custom Haskell backend, be
6−If you intend to serve Elm code with a Haskell backend, be sure to read all the way to the "Installation for Haskell-Users" section.
8+sure to read all the way to the "Installation for Haskell-Users" section.
7
9
8
10
9Installation for General Use
11Installation for General Use
10----------------------------
12----------------------------
11
13
12−Download the [Haskell Platform 2012.2.0.0](http://hackage.haskell.org/platform/). This will give you access to the Haskell compiler (needed to build Elm) and Haskell's package distribution system (to make installation of Elm easier). Elm works best with version 7.4 of the Haskell compiler (i.e. GHC 7.4) which is bundled with version 2012.2.0.0 of the Haskell Platform.
14+Download the [Haskell Platform 2012.2.0.0](http://hackage.haskell.org/platform/).
15+This will give you access to the Haskell compiler (needed to build Elm) and Haskell's
16+package distribution system (to make installation of Elm easier). Elm definitely works with
17+version 7.4 of the Haskell compiler (i.e. GHC 7.4) which is bundled with
18+version 2012.2.0.0 of the Haskell Platform.
19+
20+If you are a Linux user and already have a copy of GHC installed and have
21+downloaded a bunch of packages, it may be worthwhile to create new user account
22+and just install Elm separately
23+[as described here](https://groups.google.com/forum/?fromgroups=#!topic/elm-discuss/cNNJ6YM77zs).
24+Dependency issues have been rampant lately with packages changing to support GHC 7.6.
25+
26+If you run into issues, check [the mailing list][list] for advice or go to the
27+[#Elm IRC channel][irc].
28+
29+ [list]: https://groups.google.com/forum/?fromgroups#!forum/elm-discuss "Mailing List"
30+ [irc]: http://webchat.freenode.net/?channels=elm "#elm channel"
13
31
14#### Installing the compiler and server
32#### Installing the compiler and server
15
33
@@ -21,30 +39,49 @@ This will ensure that the elm package is available. Then install Elm with:
21
39
22 cabal install elm
40 cabal install elm
23
41
42+Assuming everything goes correctly (potential problems are discussed later), this
43+will install the `elm` compiler on your machine. `elm` is a standard compiler that
44+takes `.elm` files and produces `.html` and/or `.js` files. You can then use these
24−Assuming everything goes correctly (potential problems are discussed later), this will install the `elm` compiler on your machine. `elm` is a standard compiler that takes `.elm` files and produces `.html` and/or `.js` files. You can then use these files with your favorite web-framework. Use `elm --help` for more directions on how to use it.
45+files with your favorite web-framework. Use `elm --help` for more directions on how to use it.
25
46
26−If you have this installed you can write and compile Elm locally, so if the next step fails for you, it is safe to proceed without it.
47+If you have this installed you can write and compile Elm locally,
48+so if the next step fails for you, it is safe to proceed without it.
27
49
28−You can also install `elm-server` which is both a compiler and server, allowing you to develop without designing and setting up a server yourself. Running `elm-server` starts a server in the current directory. It will compile and serve any `.elm` files in the current directory and its sub-directories. This is how I prefer to develop Elm programs. Install with:
50+You can also install `elm-server` which is both a compiler and server, allowing
51+you to develop without designing and setting up a server yourself. Running `elm-server`
52+starts a server in the current directory. It will compile and serve any `.elm` files in
53+the current directory and its sub-directories. This is how I prefer to develop
54+Elm programs. Install with:
29
55
30 cabal install elm-server
56 cabal install elm-server
31
57
58+Dependency issues have been cropping up with this step, so if you run into issues,
32−Dependency issues have been cropping up with this step, so if you run into issues, please report them so they can be fixed! Once installed, use the command `elm-server --help` to see some extra information.
59+please report them so they can be fixed! Once installed, use the command `elm-server --help`
60+to see some extra information.
33
61
34#### Using the Elm compiler and server
62#### Using the Elm compiler and server
35
63
64+To use these executables you need to add a new directory to your PATH. For me, the
65+executables were placed in `/home/evan/.cabal/bin` which I appended to the end of my
66+PATH variable in my .bashrc file. Cabal should tell you where your executables are
67+located upon successful installation, so you can make a similar addition (see this
36−To use these executables you need to add a new directory to your PATH. For me, the executables were placed in `/home/evan/.cabal/bin` which I appended to the end of my PATH variable in my .bashrc file. Cabal should tell you where your executables are located upon successful installation, so you can make a similar addition (see this tutorial if you are new to changing your PATH in [Unix/Linux](http://www.cyberciti.biz/faq/unix-linux-adding-path/)).
68+tutorial if you are new to changing your PATH in [Unix/Linux](http://www.cyberciti.biz/faq/unix-linux-adding-path/)).
37
69
38−You can use the commands `elm --help` and `elm-server --help` to get more information about using these tools.
70+You can use the commands `elm --help` and `elm-server --help`
71+to get more information about using these tools.
39
72
73+That is almost everything. Now, we will create a simple Elm project.
40−That is almost everything. Now, we will create a simple Elm project. The following commands will set-up a very basic project and start the Elm server.
74+The following commands will set-up a very basic project and start the Elm server.
41
75
42 mkdir helloElm
76 mkdir helloElm
43 cd helloElm
77 cd helloElm
44 echo main = lift asText Mouse.position > main.elm
78 echo main = lift asText Mouse.position > main.elm
45 elm-server
79 elm-server
46
80
81+The first two commands create a new directory and navigate into it. The `echo`
82+command places a simple program into `main.elm` (do this manually if you do not
47−The first two commands create a new directory and navigate into it. The `echo` command places a simple program into `main.elm` (do this manually if you do not have `echo`). The final command starts the Elm server at [localhost](http://localhost:8000/), allowing you to navigate to `main.elm` and see your first program in action.
83+have `echo`). The final command starts the Elm server at [localhost](http://localhost:8000/),
84+allowing you to navigate to `main.elm` and see your first program in action.
48
85
49
86
50Installation for Haskell-users
87Installation for Haskell-users