Created
September 1, 2011 03:59
-
-
Save simonmichael/1185421 to your computer and use it in GitHub Desktop.
Revisions
-
simonmichael revised this gist
Oct 10, 2011 . 1 changed file with 9 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,22 @@ # unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages. # ghc-pkg-clean -f cabal/dev/packages*.conf also works. function ghc-pkg-clean() { for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'` do echo unregistering $p; ghc-pkg $* unregister $p done } # remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place. # When all else fails, use this to get out of dependency hell and start over. function ghc-pkg-reset() { read -p 'erasing all your user ghc and cabal packages - are you sure (y/n) ? ' ans test x$ans == xy && ( \ echo 'erasing directories under ~/.ghc'; rm -rf `find ~/.ghc -maxdepth 1 -type d`; \ echo 'erasing ~/.cabal/lib'; rm -rf ~/.cabal/lib; \ # echo 'erasing ~/.cabal/packages'; rm -rf ~/.cabal/packages; \ # echo 'erasing ~/.cabal/share'; rm -rf ~/.cabal/share; \ ) } alias cabalupgrades="cabal list --installed | egrep -iv '(synopsis|homepage|license)'" -
simonmichael renamed this gist
Sep 15, 2011 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
simonmichael created this gist
Sep 1, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages. function ghc-pkg-clean() { for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'` do echo unregistering $p; ghc-pkg $* unregister $p done } # remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place. # When all else fails, use this to get out of dependency hell and start over. function ghc-pkg-reset() { read -p 'erasing all your user ghc and cabal packages - are you sure (y/n) ? ' ans test x$ans == xy && ( \ echo 'erasing directories under ~/.ghc'; rm -rf `find ~/.ghc -type d -depth 1`; \ echo 'erasing ~/.cabal/lib'; rm -rf ~/.cabal/lib; \ # echo 'erasing ~/.cabal/packages'; rm -rf ~/.cabal/packages; \ # echo 'erasing ~/.cabal/share'; rm -rf ~/.cabal/share; \ ) }