Home » Installation

Installing with Cabal

The regex package is tested with GHC 7.8.4, 7.10.3 and 8.0.1:

cabal update && cabal install regex

Installing with Stack

We maintain for stack configurations:

stack --stack-yaml stack-8.8.yaml install regex


stack --stack-yaml stack-8.6.yaml install regex


stack --stack-yaml stack-8.4.yaml install regex


stack --stack-yaml stack-8.2.yaml install regex

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

Running the tests with Cabal

To run the tests with cabal, change into the root folder and:

cabal test

Running the tests with Stack

To test with GHC-8.0 from the root folder:

stack test --stack-yaml stack-8.0.yaml