This document explains how to install ghc-vis on a fresh installation of Windows 7. These instructions are for 64 bit, but should work similarly on 32 bit. Note that ghc-vis is easiest to use on Linux, setting it up on Windows is rather difficult. If someone knows of an easier way, let me know.

Install the Haskell Platform

Visit and install the Haskell Platform (64 bit).

Put m.dll in C:\Program Files\Haskell Platform\7.10.3\mingw\bin or similar (64bit: 64bit/m.dll, 32bit: 32bit/m.dll)

Install GTK and GraphViz

Download the current GraphViz ZIP archive from and extract it to C:\graphviz, so that it directly contains the directories bin, lib, share and so on.

Install msys2 by following the instructions at

pacman -S mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gtk3 wget unzip
echo 'export PATH=/c/graphviz/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Install ghc-vis

Run in the MinGW-w64 Win64 Shell (not the MSYS2 Shell):

cabal update
cabal install gtk2hs-buildtools
cd gtk2hs-master/glib && cabal install
cd ../cairo && cabal install --ghc-pkg-options="--force"
cd ../pango && cabal install --ghc-pkg-options="--force"
cd ../gtk && cabal install --ghc-pkg-options="--force"
cabal install --ghc-pkg-options="--force" ghc-vis

This can be simplified once these issues are resolved:

Follow the instructions printed by the last cabal install. They should tell you something like this:

To use ghc-vis you have to load its ghci file in GHCi. To do this
automatically when GHCi is started run:
echo :script C:\Users\def\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.3\ghc-vis-0.8\ghci >> %APPDATA%\ghc\ghci.conf

Now you can run ghci inside the MINGW64 shell and use :vis.