Home » Tutorial

The regex Tutorials

We have five tutorials, each of which is a literate Haskell program with interactive examples that can be tried out with ghci.

Loading the Tutorial with Cabal

First unpack the source distribution and change into the root folder

cabal unpack regex
cd regex-*

And load the tutorial into ghci with cabal:

cabal configure
cabal repl re-tutorial

Loading the Tutorial with Stack

To load the tutorial into ghc-8.0 with stack (from the unpacked root folder):

stack --stack-yaml stack-8.0.yaml exec ghci -- -ghci-script lib/ghci examples/re-tutorial.lhs