on master help sign in
Make section titles more specific
201c07dHarendra Kumar
docs/User/Tutorials/setup-and-usage.md+12−8
@@ -6,10 +6,8 @@ SPDX-License-Identifer: BSD-3-Clause
6
6
7# Getting started with `Haskell Streamly`
7# Getting started with `Haskell Streamly`
8
8
9−This guide shows you how to write a simple program that uses
9+This guide shows you how to install Haskell and the `streamly` package,
10−[Streamly][].
10+and then use Streamly in a simple program.
11−
12−## Pre-requisites
13
11
14<!-- TODO: Add instructions for `stack` and `nix`.
12<!-- TODO: Add instructions for `stack` and `nix`.
15
13
@@ -22,14 +20,18 @@ running Windows&trade; then you may need to run a command-line shell
22under `msys` and some of the commands below may also need to be changed
20under `msys` and some of the commands below may also need to be changed
23in small ways to make them work.
21in small ways to make them work.
24
22
23+## Installing Haskell
24+
25+You can choose one of the following options.
26+
25−### Installing Haskell
27+### Installing the Haskell Toolchain
26
28
27To get started, you will need a fairly recent version (last three major
29To get started, you will need a fairly recent version (last three major
28versions will work) of the Haskell compiler `ghc` and the build tool
30versions will work) of the Haskell compiler `ghc` and the build tool
29`cabal` installed on your system. Please see the install instructions
31`cabal` installed on your system. Please see the install instructions
30at https://www.haskell.org/downloads/ .
32at https://www.haskell.org/downloads/ .
31
33
32−### Complete Development Environment
34+### Development Environment using Nix
33
35
34If you use the nix package manager, a nix shell for complete
36If you use the nix package manager, a nix shell for complete
35development environment - including a consistent set of latest streamly
37development environment - including a consistent set of latest streamly
@@ -103,6 +105,8 @@ Create a project directory for our example project.
103$ mkdir streamly-project
105$ mkdir streamly-project
104```
106```
105
107
108+### Add `streamly` as project dependency
109+
106Run `cabal init` in the project directory to create an initial set of
110Run `cabal init` in the project directory to create an initial set of
107project files:
111project files:
108
112
@@ -127,7 +131,7 @@ on `.cabal` files.
127This invocation also creates a skeletal `app/Main.hs` file which we
131This invocation also creates a skeletal `app/Main.hs` file which we
128will now use to write our streamly based program.
132will now use to write our streamly based program.
129
133
130−### Use `streamly` in the Project Code
134+### Import `streamly` modules in the project code
131
135
132Let us now turn the single-line stanza we used in the REPL into a
136Let us now turn the single-line stanza we used in the REPL into a
133standalone program.
137standalone program.
@@ -154,7 +158,7 @@ $ cabal run
1543
1583
155```
159```
156
160
157−### Running the project in GHCi REPL
161+### Running GHCi REPL for the project code
158
162
159To start up the GHCi REPL for your project, please use:
163To start up the GHCi REPL for your project, please use:
160
164