Skip to content

Instantly share code, notes, and snippets.

@cartazio
Last active September 7, 2021 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cartazio/c4cab323997b10b3ca07196ac925cf9f to your computer and use it in GitHub Desktop.
Save cartazio/c4cab323997b10b3ca07196ac925cf9f to your computer and use it in GitHub Desktop.
how to grep all of hackage!

first decide where to place your local copy of stuff

cd $YOURPLACE

how to get the most recent version of everything

cabal list --simple | awk '{print ($1)}' | uniq | time xargs -P20 -n1 cabal get

then use grep/ ripgrep or whatever to find where code exists/is used/ is defined

then look at the matches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment