anchor.diff:      "--with-gcc=${gcc}/bin/gcc"
     ];
   
  -  preConfigure = "
  +  preConfigure = ''
       # still requires a hack for ncurses
  -    sed -i \"s|^\\\(ld-options.*$\\\)|\\\1 -L${ncurses}/lib|\" libraries/readline/readline.buildinfo.in
  -  ";
  +    sed -i "s|^\(ld-options.*$\)|\1 -L${ncurses}/lib|" libraries/readline/readline.buildinfo.in
  +    # build haddock docs
  +    echo "HADDOCK_DOCS = YES" >> mk/build.mk
  +  '';
  +
  +  installTargets = ["install" "install-docs"];
   
     inherit (stdenv) gcc;
     inherit readline gmp ncurses;
  
positive.code:     }
    ];
  
    buildInputs = [ghc readline perl m4 gmp];
  
    # The setup hook is executed by other packages building with ghc.
    # It then looks for package configurations that are available and
  
negative.code: {stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses, haddock}:
  
  stdenv.mkDerivation (rec {
    name = "ghc-6.8.3";
  