From d4289931ad69f1233c9f75f230f7bb29650df433 Mon Sep 17 00:00:00 2001 From: jake <19259921+jakequade@users.noreply.github.com> Date: Wed, 10 Jul 2019 17:14:39 +1000 Subject: [PATCH] add stack to tutorial docs (#1177) * add stack to tutorial docs * adjusted stack install wording --- doc/tutorial/index.rst | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/tutorial/index.rst b/doc/tutorial/index.rst index c72b154d..c47bfd1d 100644 --- a/doc/tutorial/index.rst +++ b/doc/tutorial/index.rst @@ -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 `_. -In fact, the whole tutorial is a `cabal `_ -project and can be built and played with locally as follows: +cabal-install +-------- + +The whole tutorial is a `cabal `_ +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 `_ 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.