Skip to content

Instantly share code, notes, and snippets.

@bitemyapp
Forked from blitzcode/gist:8123168
Created June 18, 2014 23:22
Show Gist options
  • Save bitemyapp/3e6a015760775e0679bf to your computer and use it in GitHub Desktop.
Save bitemyapp/3e6a015760775e0679bf to your computer and use it in GitHub Desktop.
# Install a local copy of Hoogle (OS X, HP)
# Download
cd
cabal unpack hoogle
cd hoogle-4.2.26/
# Build
cabal sandbox init
cabal install -j --dependencies-only
cabal build
cabal install
# In case there's an old link and it doesn't get changed automatically by Cabal
cd ~/Library/Haskell/bin/
rm hoogle
ln -s ~/hoogle-4.2.26/dist/build/Hoogle/hoogle hoogle
# Download everything from Hackage
# Also specify 'default' so we get an initial default.hoo and the package name database (package.hoo)
hoogle data all default
# Build a better default.hoo (optional)
# Start by combining databases for base/platform/selected hackage
cd ~/hoogle-4.2.26/
cd .cabal-sandbox/share/i386-osx-ghc-7.6.3/hoogle-4.2.26/databases/
# All of base
hoogle combine --outfile=all_of_base.hoo Cabal.hoo array.hoo base.hoo binary.hoo bytestring.hoo containers.hoo deepseq.hoo directory.hoo filepath.hoo haskell2010.hoo haskell98.hoo hoopl.hoo hpc.hoo old-locale.hoo old-time.hoo pretty.hoo process.hoo template-haskell.hoo time.hoo unix.hoo
# All of the Haskell Platform 2013.2.0.0
hoogle combine --outfile=all_of_hp.hoo GLURaw.hoo GLUT.hoo HTTP.hoo HUnit.hoo OpenGL.hoo OpenGLRaw.hoo QuickCheck.hoo async.hoo attoparsec.hoo case-insensitive.hoo cgi.hoo fgl.hoo hashable.hoo haskell-src.hoo html.hoo mtl.hoo network.hoo parallel.hoo parsec.hoo primitive.hoo random.hoo regex-base.hoo regex-compat.hoo regex-posix.hoo split.hoo stm.hoo syb.hoo text.hoo transformers.hoo unordered-containers.hoo vector.hoo xhtml.hoo zlib.hoo
# Stuff I use the most from Hackage
hoogle combine --outfile=selected_hackage.hoo GLFW-b.hoo JuicyPixels.hoo MonadCatchIO-transformers.hoo SafeSemaphore.hoo aeson.hoo ansi-terminal.hoo attoparsec-conduit.hoo authenticate-oauth.hoo binary.hoo bindings-GLFW.hoo blaze-builder.hoo bmp.hoo conduit.hoo data-default.hoo dlist.hoo ekg.hoo hashtables.hoo http-attoparsec.hoo http-conduit.hoo http-types.hoo lifted-base.hoo mmorph.hoo monad-control.hoo network-conduit.hoo repa.hoo repa-algorithms.hoo repa-io.hoo resourcet.hoo tagsoup.hoo th-lift.hoo tls.hoo linear.hoo lens.hoo criterion.hoo
# Combine all previous databases into the default.hoo, also add package name database
hoogle combine --outfile=default.hoo all_of_base.hoo all_of_hp.hoo selected_hackage.hoo package.hoo
# Start webserver (need root to bind to port <1024)
sudo hoogle server
@JulianBirch
Copy link

Actually, scrub that, that doesn't build either.

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