A Haskell kernel for IPython.
Haskell Jupyter Notebook Other
Failed to load latest commit information.
demo Removing old demo notebooks Apr 23, 2015
ghc-parser Change ghc-parser build-type to Simple Sep 3, 2017
html Remove dependence on here, allow haskell-src-exts 1.17 Dec 8, 2015
ihaskell-display Bump resolvers to lts-9.5 Sep 18, 2017
images Adding documentation and removing Docker (for now) Mar 26, 2015
ipython-kernel Bump version in cabal file for upload Aug 19, 2017
main Include RTS flags in kernelspec when installing. Sep 23, 2017
notebooks update notebook for ghc 8.0.2 Mar 6, 2017
src Choose some default runtime options. Sep 23, 2017
.dockerignore Added and tested Dockerfile and instructions on how to use it Feb 1, 2016
.ghci Remove default flags; they break ghci Mar 13, 2017
.gitignore Add nix derivations Jul 24, 2017
.travis.yml Bump resolvers to lts-9.5 Sep 18, 2017
Dockerfile Added and tested Dockerfile and instructions on how to use it Feb 1, 2016
LICENSE updating LICENSE and minor formatting fixes Dec 12, 2013
README.md Add note about getting GHC 7.10 support Sep 6, 2017
Setup.hs Fix formatting with newer hindent Aug 25, 2015
build.sh Prevent re-use of ipython-package from hackage Nov 10, 2015
circle.yml extra libs Mar 12, 2017
ihaskell.cabal Enable `+RTS` options on the ihaskell executable. Sep 23, 2017
macos-install.sh adjust for changes in Caskroom Apr 14, 2016
release.nix Make rtsopts configurable through release.nix Sep 24, 2017
requirements.txt pip requirements file Mar 12, 2017
root-deps.sh Remove redundant use of 'tr' Apr 18, 2015
stack.yaml Bump resolvers to lts-9.5 Sep 18, 2017
ubuntu-install.sh ihaskell-widgets and singletons >= 2.0 Oct 16, 2015
verify_formatting.py Apply an untested fix for ghc-7.8 Oct 7, 2015


jupyter IHaskell Build Status


You can now try IHaskell directly in your browser at try.jupyter.org.

Alternatively, watch a talk and demo showing off IHaskell features.

IHaskell is a kernel for the Jupyter project, which allows you to use Haskell inside Jupyter frontends (including the console and notebook). It currently supports GHC 8. For GHC 7.10 support please use the GHC7 tag.

For a tour of some IHaskell features, check out the demo Notebook. More example notebooks are available on the wiki. The wiki also has more extensive documentation of IHaskell features.

IPython Console IPython Notebook

Interactive In-Browser Notebook

Note: IHaskell does not support Windows. To use on Windows, install Virtualbox, install Ubuntu or another Linux distribution, and proceed with the install instructions.



Some prerequisites; adapt to your distribution.

sudo apt-get install -y python3-pip git libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libmagic-dev libblas-dev liblapack-dev
pip3 install -r requirements.txt
curl -sSL https://get.haskellstack.org/ | sh
git clone https://github.com/gibiansky/IHaskell
cd IHaskell
stack install gtk2hs-buildtools
stack install --fast
ihaskell install --stack


You need to have Homebrew installed. If you do not have it yet run /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" in your terminal.

You also need the Xcode command line tools. You can install them by running xcode-select --install in the terminal and following the prompts.

brew install python3 zeromq libmagic cairo pkg-config haskell-stack pango
git clone https://github.com/gibiansky/IHaskell
cd IHaskell
stack install gtk2hs-buildtools
stack install --fast
ihaskell install --stack

Tested on macOS Sierra (10.12.6)


stack exec jupyter -- notebook


If you have the nix package manager installed, you can create an IHaskell notebook environment with one command. For example:

$ nix-build release.nix --arg packages "haskellPackages: [ haskellPackages.lens ]"
<result path>
$ <result path>/bin/ihaskell-notebook

It might take a while the first time, but subsequent builds will be much faster.

Where are my packages?

Stack manages separate environments for every package. By default your notebooks will only have access to a few packages that happen to be required for ihaskell. To make packages available add them to the stack.yaml in the ihaskell directory and run stack solver && stack install.

Packages should be added to the packages: section and can take the following form (reproduced here from the stack documentation). If you've already installed a package by stack install you can simply list its name even if it's local.

- package-name
- location: .
- location: dir1/dir2
- location: https://example.com/foo/bar/baz-0.0.2.tar.gz
- location: http://github.com/yesodweb/wai/archive/2f8a8e1b771829f4a8a77c0111352ce45a14c30f.zip
- location:
    git: git@github.com:commercialhaskell/stack.git
    commit: 6a86ee32e5b869a877151f74064572225e1a0398
- location:
    hg: https://example.com/hg/repo
    commit: da39a3ee5e6b4b0d3255bfef95601890afd80709