The hoogle package

[Tags:bsd3, library, program]

Hoogle is a Haskell API search engine, which allows you to search many standard Haskell libraries by either function name, or by approximate type signature.

[Skip to Readme]


Versions 3.1, 4.0,,,,, 4.0.6, 4.0.7, 4.1, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.2.10, 4.2.11, 4.2.12, 4.2.13, 4.2.14, 4.2.15, 4.2.16, 4.2.17, 4.2.18, 4.2.19, 4.2.20, 4.2.21, 4.2.22, 4.2.23, 4.2.24, 4.2.25, 4.2.26, 4.2.27, 4.2.28, 4.2.29, 4.2.30, 4.2.31, 4.2.32, 4.2.33, 4.2.34, 4.2.35, 4.2.36, 4.2.37, 4.2.38, 4.2.39, 4.2.40, 4.2.41, 4.2.42, 4.2.43
Change log CHANGES.txt
Dependencies aeson (>=0.6.1), array, base (>4 && <5), binary, blaze-builder (>=0.2), bytestring (>=0.9), Cabal (>=1.8), case-insensitive (>=0.2), cmdargs (>=0.7), conduit (>=0.2), containers, deepseq (>=1.1), directory, filepath, haskell-src-exts (>=1.16 && <1.18), http-types (>=0.7), old-locale, parsec (>=2.1), process, QuickCheck, random, resourcet, safe, shake (>=0.14), tagsoup (>=0.11), text (>=0.11), time, transformers (>=0.2), uniplate (>=1.6), unix, vector (>=0.9), vector-algorithms (>=0.6), wai (>=1.1), warp (>=2.1) [details]
License BSD3
Copyright Neil Mitchell 2004-2015
Author Neil Mitchell <>
Maintainer Neil Mitchell <>
Stability Unknown
Category Development
Home page
Bug tracker
Source repository head: git clone
Uploaded Thu Nov 19 13:32:38 UTC 2015 by NeilMitchell
Distributions Arch:4.2.43, Debian:4.2.43, FreeBSD:4.2.41, LTSHaskell:4.2.43, NixOS:4.2.43, Stackage:4.2.43
Downloads 38931 total (181 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for hoogle

Readme for hoogle-4.2.43

Hoogle Hackage version Build Status

NOTE: This code branch contains the code for the Hoogle v4 series. The master branch contains the code for the current Hoogle v5 series.

Hoogle is a Haskell API search engine, which allows you to search many standard Haskell libraries by either function name, or by approximate type signature. To experiment, visit the online version at

Hoogle Use

Hoogle can be used in several ways:



Here are some example searches:

  • map searches as text, finding map, concatMap, mapM
  • con map searches for the text "map" and "con" finding concatMap, but not map
  • a -> a searches by type, finding id :: a -> a
  • a searches for the text "a"
  • :: a searches for the type "a"
  • id :: a -> a searches for the text "id" and the type "a -> a"


By default, searches look at the Haskell Platform and Haskell keywords. However, all Hackage packages are available to search. As some examples:

  • mode +cmdargs searches only the "cmdargs" package
  • file -base searches the Haskell Platform, excluding the "base" package
  • mode +platform +cmdargs searches both the Haskell Platform and the "cmdargs" package
  • count +missingh searches only the "MissingH" package - all packages are written in lower-case

With the set of packages you are searching, you can also restrict the set of modules searched:

  • file -System excludes results from modules such as System.IO, System.FilePath.Windows and Distribution.System
  • fold +Data.Map finds results in the Data.Map module


Command Line Version

To invoke Hoogle type:

hoogle "[a] -> [b]"

Note the quotes, otherwise you will redirect the output to the file [b].

To ensure you have data files for the Hackage modules, you will first need to type:

hoogle data

Which will download and build Hoogle databases.

Chrome Integration

As a keyword search: With a keyword search you can type h map directly into the location bar to perform a Hoogle search. Go to the Hoogle website in Chrome, right-click in the Hoogle search field and select "Add as a search engine...". Give it a keyword such as "h".

Firefox Integration

From the search bar: Go to the Hoogle website in Firefox and click on the drop-down arrow at the left of the search bar, and select the "Add Hoogle" option. Click the arrow again to select Hoogle as your search engine.

As a keyword search: With a keyword search you can type h map directly into the location bar to perform a Hoogle search. Go to the Hoogle website in Firefox, right-click in the Hoogle search field and select "Add a Keyword for this Search...". Given it a keyword such as "h".

If you want to search for special symbols in Firefox keyword search, modify the keyword search URL to be: javascript:window.location.href="" + encodeURIComponent("%s")

Firefox Ubiquity Integration

Ubiquity provides a graphical command-line for Firefox. To install the Ubiquity Hoogle command, visit the this page and click "Subscribe..." when asked whether you want to install it. Further information is available here.


Hoogle work is licensed under the GPL version 2.0. Any patches are assumed to be dual licensed under the BSD license and the GPL, to allow re-licensing Hoogle under the BSD license in future, if that proves beneficial to the Haskell community. The work is intended to be helpful, open and free. If the license doesn't meet your needs then talk to me.

Theoretical Foundations

A lot of related work was done by Rittri [1] and Runciman [2] in the late 80's. Since then Di Cosmo [3] has produced a book on type isomorphisms. Unfortunately the implementations that accompanied the earlier works were for functional languages that have since become less popular.

  1. Mikael Rittri, Using Types as Search Keys in Function Libraries. Proceedings of the fourth international conference on Functional Programming languages and Computer Architecture: 174-183, June 1989.
  2. Colin Runciman and Ian Toyn, Retrieving reusable software components by polymorphic type. Journal of Functional Programming 1 (2): 191-211, April 1991.
  3. Roberto Di Cosmo, Isomorphisms of types: from lambda-calculus to information retrieval and language design. Birkhauser, 1995. ISBN-0-8176-3763-X

I have given several presentations on type searching all available from my home page.


The folders in the distribution, and their meaning are:

data - tools to generate a hoogle data file docs - documentation on hoogle misc - presentations, icons, emacs scripts, logos src - source code web - additional resources for the web front end (css, jpg etc.)

Similar Tools

I was unaware of any similar tools before starting development, and no other tool has really influenced this tool (except the first on this list). Some related tools are:

  • Google, the leader in online search
  • Hayoo, similar to Hoogle, but with less focus on type search
  • Krugle, search code, but no Haskell :(


All code is all © Neil Mitchell, 2004-present. The initial version was done over my summer holiday, and further work was done during my PhD. During Summer 2008 I was funded to full-time on Hoogle by Google Summer of Code with the mentoring organisation. Since then I have been working on Hoogle in my spare time. Various people have given lots of useful ideas, including my PhD supervisor Colin Runciman, and various members of the Plasma group. In addition, the following people have also contributed code or significant debugging work:

In previous versions, all the data was taken from Zvon's Haskell Guide. Thanks to their open and friendly policy of allowing the data to be reused, this project became possible. More recent versions use the Hierarchical Libraries as distributed with GHC, and databases generated by Haddock.