This section can be skipped if you are not interested in trying the code out.

For this analysis, I am using the default set of packages on my Ubuntu 14.10 machine: ghc version 7.6.3, the Haskell compiler, and cabal-install (at version 1.20.0), which is used for package management (e.g. is is something like pip ). Later versions should (hopefully) work, but earlier versions may not (the cabal sandbox command needs a cabal-install version of at least 1.18 and I don't know how well ghc version 7.4 or earlier are going to work).

With these installed, and having moved to a new directory, I set up a "sandbox" environment in which to install the Haskell packages (to avoid conflicting packages and to make it easy to remove or update changes for just this project), and enter

% cabal update % cabal sandbox init % cabal install integration chart-diagrams ihaskell ihaskell-blaze --dry-run Resolving dependencies... In order, the following would be installed (use -v for more details): Boolean-0.2.3 NumInstances-1.4 ... % cabal install integration chart-diagrams ihaskell ihaskell-blaze Resolving dependencies... Notice: installing into a sandbox located at /home/dburke/posts/cosmo/.cabal-sandbox Downloading Boolean-0.2.3... Downloading NumInstances-1.4... Downloading OneTuple-0.2.1... ... ... and wait quite a while ...

This will create (if it doesn't already) the directory ~/.cabal/ as well as .cabal-sandbox/ in the current directory.

At this point you should be able to say

% cabal repl GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> import Numeric.Integration.TanhSinh Prelude Numeric.Integration.TanhSinh> :quit Leaving GHCi.

which checks that things are set up correctly.

We now need to run IHaskell, which will then set up its own version of IPython (unless it can find one it is able to use), and store it in ~/.ihaskell/ .

% mkdir notebooks % cabal exec IHaskell -- notebook --serve=notebooks/ Did not detect IHaskell-installed or system IPython. IHaskell will now proceed to install IPython (locally for itself). Installing IPython in IHaskell's virtualenv in 10 seconds. Ctrl-C to cancel. ... ... this will install into ~/.ihaskell ... Successfully installed ipython-2.4.1 Creating IPython profile. ... ... normal ipython notebook output ... 2015-02-09 19:28:24.287 [NotebookApp] The IPython Notebook is running at: http://localhost:8778/ 2015-02-09 19:28:24.287 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

At this point you should be able to go the URL where the server is running and start a notebook to follow along. If you just want to try a few things out, then the Try Haskell! and FP Complete sites provide on-line environments for trying out Haskell.

For reference, the versions of the major packages used in this notebook are ( dimensional-tf is added in later):