@@ -9,23 +9,32 @@ title: 1. Getting Started
9
9
10
10
-----
11
11
12
- In order to go through this tutorial, you will need a Haskell development
13
- environment and we recommend installing the latest version of the
14
- [ Haskell Platform] ( http://www.haskell.org/platform/ ) if you've not done
15
- so already.
12
+ In order to go through this tutorial, you will need a working Haskell
13
+ environment. If you don't already have one follow the instructions
14
+ [ here] ( https://www.haskell.org/downloads ) to install the compiler and
15
+ then
16
+ [ go here] ( https://github.com/commercialhaskell/stack/wiki/Downloads )
17
+ to install ` stack ` , a popular build tool for Haskell projects.
16
18
17
- Once you're up and running, you'll want to get hold of the distributed-process
18
- library and a choice of network transport backend. This guide will use
19
- the network-transport-tcp backend, but other backends may be available
20
- on github.
19
+ Once you're up and running, you'll want to get hold of the
20
+ ` distributed-process ` library and a choice of network transport
21
+ backend. This guide will use the ` network-transport-tcp ` backend, but
22
+ other backends are available on [ Hackage] ( https://hackage.haskell.org )
23
+ and [ GitHub] ( https://github.com ) .
21
24
22
- ### Installing from source
25
+ ### Setting up the project
23
26
24
- If you're installing from source, the simplest method is to checkout the
25
- [ Umbrella Project] ( https://github.com/haskell-distributed/cloud-haskell ) and
26
- run ` make ` to obtain the complete set of source repositories for building
27
- Cloud Haskell. The additional makefiles bundled with the umbrella assume
28
- that you have a recent version of cabal (with support for sandboxes) installed.
27
+ Starting a new Cloud Haskell project using ` stack ` is as easy as
28
+
29
+ ```
30
+ $ stack new
31
+ ```
32
+
33
+ in a fresh new directory. This will populate the directory with
34
+ a number of files, chiefly ` stack.yaml ` and ` *.cabal ` metadata files
35
+ for the project. You'll want to add ` distributed-process ` and
36
+ ` network-transport-tcp ` to the ` build-depends ` stanza of the
37
+ executable section.
29
38
30
39
### Creating a node
31
40
@@ -37,7 +46,7 @@ from other nodes. We will look at inter-node communication later, for now
37
46
it will suffice to pass the default remote table, which defines the built-in
38
47
types that Cloud Haskell needs at a minimum in order to run.
39
48
40
- We start with our imports:
49
+ In ` app/Main.hs ` , we start with our imports:
41
50
42
51
{% highlight haskell %}
43
52
import Network.Transport.TCP (createTransport, defaultTCPParameters)
0 commit comments