add stack to tutorial docs (#1177)

* add stack to tutorial docs

* adjusted stack install wording
This commit is contained in:
jake 2019-07-10 17:14:39 +10:00 committed by Arian van Putten
parent db9b258fdc
commit d4289931ad

View File

@ -6,8 +6,11 @@ This is an introductory tutorial to **servant**. Whilst browsing is fine, it mak
Any comments, issues or feedback about the tutorial can be submitted
to `servant's issue tracker <http://github.com/haskell-servant/servant/issues>`_.
In fact, the whole tutorial is a `cabal <https://cabal.readthedocs.io/en/latest/>`_
project and can be built and played with locally as follows:
cabal-install
--------
The whole tutorial is a `cabal <https://cabal.readthedocs.io/en/latest/>`_
project and can be built locally as follows:
.. code-block:: bash
@ -18,6 +21,20 @@ project and can be built and played with locally as follows:
# load in ghci to play with it
$ cabal new-repl tutorial
stack
--------
The servant `stack <https://docs.haskellstack.org/en/stable/README/>`_ template includes the working tutorial. To initialize this template, run:
.. code-block:: bash
$ stack new myproj servant
$ cd myproj
# build
$ stack build
# start server
$ stack exec myproj-exe
The code can be found in the `*.lhs` files under `doc/tutorial/` in the
repository. Feel free to edit it while you're reading this documentation and
see the effect of your changes.