Sometimes Hackage isn't available, in which case you can use one of the mirrors.

Usually you can just replace the remote-repo line in Cabal's config, which is located in:

  • ~/.cabal/config on Linux (and probably OS X)
  • %APPDATA%\cabal\config on Windows

Recommendations

If you need documentation, Stackage is your only option. Otherwise you might choose the mirror by speed. The speeds of these Hackage mirrors are as follows for various countries (tested by downloading the tarball for lens-4.9):

                         luite.com   reesd.com   fpcomplete.com  |  Hackage
                                                                 |
Netherlands, Amsterdam     144 ms     126 ms *      229 ms       |  200 ms
Belarus, Minsk             700 ms    1116 ms        667 ms *     |  270 ms
UK, Bristol                195 ms      75 ms *      277 ms       |  160 ms
UK, Edinburgh             1114 ms     837 ms        360 ms *     |  180 ms
USA, San Francisco        5373 ms    1455 ms        445 ms *     |  210 ms
USA, New York              822 ms     719 ms         77 ms *     |  165 ms

* = fastest for this location

So, you should probably choose FPComplete's mirror unless you live in Bristol, and if Hackage isn't down, stick to Hackage (because it's consistently fast).

edit description
or press Ctrl+Enter to savemarkdown supported
Summary edit summary

The remote-repo line is:

remote-repo: hdiff.luite.com:http://hdiff.luite.com/packages/archive
Summary quit editing summary
Prosedit prosquit editing pros
  • Lets you see diffs between various versions of packages.
    move trait up move trait down edit trait delete trait

press Ctrl+Enter or Enter to addmarkdown supportededit off
Consedit consquit editing cons
  • Can be slow.
    move trait up move trait down edit trait delete trait

press Ctrl+Enter or Enter to addmarkdown supportededit off
#
other
move item up move item down edit item info delete item
Summary edit summary

Not quite a mirror of Hackage (it hosts a vetted subset of packages), but comes with some benefits (such as documentation).

Summary quit editing summary
Prosedit prosquit editing pros
  • Has documentation for packages (even when it's unavailable on Hackage).
    move trait up move trait down edit trait delete trait
  • Provides Hoogle for the whole package set.
    move trait up move trait down edit trait delete trait

press Ctrl+Enter or Enter to addmarkdown supportededit off
Consedit consquit editing cons
  • Only hosts a subset of packages.
    move trait up move trait down edit trait delete trait

press Ctrl+Enter or Enter to addmarkdown supportededit off
Summary edit summary

The remote-repo line is:

remote-repo: hackage.reesd.com:http://hackage.reesd.com/
Summary quit editing summary
Prosedit prosquit editing pros

    press Ctrl+Enter or Enter to addmarkdown supportededit off
    Consedit consquit editing cons
    • Can be slow.
      move trait up move trait down edit trait delete trait

    press Ctrl+Enter or Enter to addmarkdown supportededit off
    Summary edit summary

    The remote-repo line is:

    remote-repo: hackage.fpcomplete.com:http://hackage.fpcomplete.com/
    Summary quit editing summary
    Prosedit prosquit editing pros
    • More-or-less consistently fast (thanks to being hosted on S3).
      move trait up move trait down edit trait delete trait

    press Ctrl+Enter or Enter to addmarkdown supportededit off
    Consedit consquit editing cons

      press Ctrl+Enter or Enter to addmarkdown supportededit off