Skip to content

Commit d428993

Browse files
jakequadearianvp
authored andcommitted
add stack to tutorial docs (#1177)
* add stack to tutorial docs * adjusted stack install wording
1 parent db9b258 commit d428993

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

doc/tutorial/index.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ This is an introductory tutorial to **servant**. Whilst browsing is fine, it mak
66
Any comments, issues or feedback about the tutorial can be submitted
77
to `servant's issue tracker <http://github.com/haskell-servant/servant/issues>`_.
88

9-
In fact, the whole tutorial is a `cabal <https://cabal.readthedocs.io/en/latest/>`_
10-
project and can be built and played with locally as follows:
9+
cabal-install
10+
--------
11+
12+
The whole tutorial is a `cabal <https://cabal.readthedocs.io/en/latest/>`_
13+
project and can be built locally as follows:
1114

1215
.. code-block:: bash
1316
@@ -18,6 +21,20 @@ project and can be built and played with locally as follows:
1821
# load in ghci to play with it
1922
$ cabal new-repl tutorial
2023
24+
stack
25+
--------
26+
27+
The servant `stack <https://docs.haskellstack.org/en/stable/README/>`_ template includes the working tutorial. To initialize this template, run:
28+
29+
.. code-block:: bash
30+
31+
$ stack new myproj servant
32+
$ cd myproj
33+
# build
34+
$ stack build
35+
# start server
36+
$ stack exec myproj-exe
37+
2138
The code can be found in the `*.lhs` files under `doc/tutorial/` in the
2239
repository. Feel free to edit it while you're reading this documentation and
2340
see the effect of your changes.

0 commit comments

Comments
 (0)