@@ -9,19 +9,29 @@ If you intend to serve Elm code with a Haskell backend, be sure to read all the
99Installation for General Use
1010----------------------------
1111
12−Download the [Haskell Platform](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). Once installed (even if it already was), you must update your listing of Haskell packages with:
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.
13+
14+#### Installing the compiler and server
15+
16+Once the Haskell Platform is installed (even if it already was), you must update your listing of packages with:
1317
1418 cabal update
1519
1620This will ensure that the elm package is available. Then install Elm with:
1721
18− cabal install elm-server
22+ cabal install elm
23+
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.
1925
20−Assuming everything goes correctly (potential problems are discussed later), this will build two executables on your machine:
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.
2127
22−* `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.
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:
2329
24−* `elm-server` 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. Use the command `elm-server --help` to see some extra information.
30+ cabal install elm-server
31+
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.
33+
34+#### Using the Elm compiler and server
2535
2636To 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/)).
2737
@@ -40,10 +50,6 @@ The first two commands create a new directory and navigate into it. The `echo` c
4050Installation for Haskell-users
4151------------------------------
4252
43−Elm as described in the previous section is actually split into two packages: `elm` which contains the guts of the compiler and `elm-server` which provides a simple HAppStack-based server to simplify development. Those of you planning to write your own server in Haskell only need the `elm` package:
44−
45− cabal install elm
46−
4753The `elm` package provides support for [compilation of Elm code directly in Haskell](http://hackage.haskell.org/packages/archive/Elm/0.1.2/doc/html/Language-Elm.html) and [QuasiQuoting](http://hackage.haskell.org/packages/archive/Elm/0.1.2/doc/html/Language-Elm-Quasi.html). See the [Examples/](https://github.com/evancz/Elm/tree/master/Examples) directory for information and examples on how to get started with Elm+Haskell.
4854
4955Yesod users should also install the `elm-yesod` package which provides functions for idiomatically embedding Elm in Yesod: