Install Dependencies
apt-get install libghc-gtk-dev libghc-svgcairo-dev libghc-cairo-dev \
libghc-transformers-dev libghc-text-dev libghc-fgl-dev \
libghc-mtl-dev libghc-polyparse-dev graphviz
Install ghc-vis
cabal update
cabal install ghc-vis --disable-library-profiling
To use ghc-vis you have to load its ghci file in GHCi. To do this automatically when GHCi is started run you have to run something like this, adapted to your GHC and ghc-vis versions:
echo ":script /home/def/.cabal/share/x86_64-linux-ghc-7.10.3/ghc-vis-0.8/ghci" >> ~/.ghci