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
On Thu, Apr 25, 2013 at 12:29 AM, capn.fre...@gmail.com
capn.fre...@gmail.com wrote:
-db
- Forwarded message -
From: Captain Freako capn.fre...@gmail.com
Date: Tue, Apr 23, 2013 9:21 pm
Subject: How to do automatic reinstall of all dependencies?
To: haskell-cafe@haskell.org
Hi all,
Does anyone know why the following is not working, as an automatic way of
reinstalling all dependencies?:
dbanas@dbanas-lap:~/prj/AMI-Tool$ cabal install --only-dependencies
--reinstall --force-reinstalls parsec
Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.
dbanas@dbanas-lap:~/prj/AMI-Tool$
Thanks,
-db
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe