Skip to content

Instantly share code, notes, and snippets.

View lndbrg's full-sized avatar
🤗
maybe

Olle Lundberg lndbrg

🤗
maybe
View GitHub Profile
@lndbrg
lndbrg / gist:1183911
Created August 31, 2011 16:10
cabal install Yi
cabal install Yi
@lndbrg
lndbrg / gist:1184201
Created August 31, 2011 17:55
cabal install errors.
src/Graphics/Vty.hs:30:18:
Could not find module `System.Console.Terminfo':
There are files missing in the `terminfo-0.3.1.3' package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
@lndbrg
lndbrg / gist:1184210
Created August 31, 2011 17:59
Error with simple-output
Resolving dependencies...
cabal: constraints conflict: top level constraint terminfo ==0.3.2.2 however
terminfo-0.3.2.2 was excluded because of the top level dependency terminfo
==0.3.1.3
@lndbrg
lndbrg / gist:1184246
Created August 31, 2011 18:10
Cabal install with --only-dependencies.
No packages to be installed.
All the requested packages are already installed.
If you want to reinstall anyway then use the --reinstall flag.
@lndbrg
lndbrg / gist:1184550
Created August 31, 2011 20:01
ghc-pkg, there are problems.
ghc-pkg check 2>&1 | grep 'There are problems'
or for the awker:
ghc-pkg check 2>&1 | awk '/There are problems/'
ghc-pkg check 2>&1 | grep 'There are problems' | cut -d' ' -f6
or
ghc-pkg check 2>&1 | awk '/There are problems/ { print $6 } '
@lndbrg
lndbrg / gist:1184673
Created August 31, 2011 20:46
uniq the packages
uniq <( for i in $(ghc-pkg check 2>&1 | grep 'There are problems' | cut -d' ' -f6 ); do echo ${i%-*}; done)
@lndbrg
lndbrg / gist:1184692
Created August 31, 2011 20:53
cabal install uniq packs
cabal install $(uniq <( for i in $(ghc-pkg check 2>&1 | grep 'There are problems' | cut -d' ' -f6 ); do echo ${i%-*}; done)) --reinstall
@lndbrg
lndbrg / gist:1184700
Created August 31, 2011 20:57
cabal install simple-output
cabal install $(ghc-pkg check --simple-output) --reinstall
@lndbrg
lndbrg / gist:1184717
Created August 31, 2011 21:05
ghc unregister
for i in $(ghc-pkg check --simple-output); do ghc-pkg unregister $i; done