diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc0275ff7..4e7aa8777 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -80,5 +80,5 @@ haddock` or `stack haddock`. The external docs are served by ReadTheDocs at https://haskell-containers.readthedocs.io and live in the `docs/` directory. To -build the docs locally run `pip install sphinx sphinx-autobuild` to install the +build the docs locally run `pip install sphinx sphinx-autobuild sphinx_rtd_theme` to install the dependencies, `git submodule update --init`, and then `cd docs/ && make html`. diff --git a/containers/docs/sequence.rst b/containers/docs/sequence.rst index ec9bfd494..d054f2891 100644 --- a/containers/docs/sequence.rst +++ b/containers/docs/sequence.rst @@ -236,13 +236,15 @@ Let's do the same thing with sequences! -- Imports the patterns to match on. import Data.Sequence (Seq (Empty, (:<|), (:|>))) + import qualified Data.Sequence as Seq case Seq.fromList [1, 2, 3] of Empty -> "empty sequence" - x :<| xs -> "first:" ++ x ++ " rest:" ++ show xs + x :<| xs -> "first:" ++ show x ++ " rest:" ++ show xs > "first:1 rest:fromList [2,3]" -.. NOTE:: You can't copy/paste this into GHCi because it's multiple lines. +.. NOTE:: You can copy/paste this into GHCi using the syntax for multi-line input ``:{ ... :}`` or by enabling `multiline mode + `_ ``:set +m``. You can also take an element off the end::