on master help sign in
Update README.md
commit4877290724bff1dab89fa62f5b1886ae618e2287 authorevancz <info@elm-lang.org> dateSun 4 Nov 2012, 01:26 (14 years ago) parentb902f37
1 file changed+48−11
README.md+48−11
README.md+48−11
@@ -1,15 +1,33 @@
11Elm
22===
33
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.
56
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.
7+If you intend to serve Elm code with a custom Haskell backend, be
8+sure to read all the way to the "Installation for Haskell-Users" section.
79
810
911Installation for General Use
1012----------------------------
1113
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"
1331
1432#### Installing the compiler and server
1533
@@ -21,30 +39,49 @@ This will ensure that the elm package is available. Then install Elm with:
2139
2240 cabal install elm
2341
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.
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
45+files with your favorite web-framework. Use `elm --help` for more directions on how to use it.
2546
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.
2749
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:
2955
3056 cabal install elm-server
3157
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.
58+Dependency issues have been cropping up with this step, so if you run into issues,
59+please report them so they can be fixed! Once installed, use the command `elm-server --help`
60+to see some extra information.
3361
3462#### Using the Elm compiler and server
3563
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/)).
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
68+tutorial if you are new to changing your PATH in [Unix/Linux](http://www.cyberciti.biz/faq/unix-linux-adding-path/)).
3769
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.
3972
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.
73+That is almost everything. Now, we will create a simple Elm project.
74+The following commands will set-up a very basic project and start the Elm server.
4175
4276 mkdir helloElm
4377 cd helloElm
4478 echo main = lift asText Mouse.position > main.elm
4579 elm-server
4680
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.
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
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.
4885
4986
5087Installation for Haskell-users