This is not what you asked for, but reinstalling all dependencies probably isn't such a good idea, because ultimately some dependencies are shipped with GHC and you might not be able to reinstall them.
Here is a useful formula I developed to avoid cabal-hell and always upgrade dependencies whenever a new package is installed.
$ cabal install --upgrade-dependencies `eval echo $(ghc-global-constraints )` <package-name>
What this does is fix the version of all global packages. These are by default the ones that are shipped with ghc, so the above command explicitly excludes those from being upgraded.
The ghc-global-constraints function is something I have in my .bashrc file, and it looks like this:
function ghc-global-constraints() {
ghc-pkg list --global | tail -n+2 | head -n-1 | grep -v '(' | while read a; do
VER=${a##*-}
PKG=${a%-*}
echo -n "--constraint='$PKG==$VER' "
done
}
This technique depends on actually fixing broken package dependencies, but today that's usually just a github fork away, and often easier than dealing with multiple cabal-dev installations IMO.
Alexander