Hoogle

Hoogle search provides an invaluable resource for searching Haskell API’s.

It allows you to search by:

  • function signature
  • function name
  • type
  • type with name

Search Examples

Function Signature

(a -> b) -> f a -> f b This shows all the API results for “Map” functions.

Ord a => [a] -> [a] This shows all the API results for this function signature, but additionally applies a constraint on a that it is a instance of Ord

Function Name

map This shows all the API results where the function name has map in it e.g. map, concatMap, mapM

con map This shows all the API results where the function name has both con and map in it

Type

:: a This show all the API results where the function has type a in it

Type with Name

id :: a -> a This show all the API results where there is a function called id with a type of a -> a

[1]

Search Engine Support

You can install browser extensions to integrate Hoogle into the browsers search bar.

duckduckgo.com

The duckduckgo.com search engine has direct support for hoogle, just prefix you search with h! and the rest of the search will be passed directly to Hoogle search engine.

For example h! map will search for functions called map on hoogle.haskell.org

Browser Support

Chrome Browser

Add in an additional search engine.

Go to preferences -> search engine -> Manage search engine then add.

Then fill in the Add search engine dialog as below image.

../_images/Hoogle-chrome-add-search-engine.png

Then click Add.

Once this has beed added, typeing h map will b Hoogle

Browser Search Examples

h map

h fmap

h Functor

h Data.List