hoogle

Using Hoogle to Search for Haskell Functions

An easy way to use Hoogle from bash to search for functions in Haskell.

What is Hoogle?

Hoogle is Google for searching of Haskell functions. You could ask it for function name or its signature.

There is available command hoogle, which could be installed using stack:

Using Hoogle From Command Line

To hoogle a function you could just pass it as parameter:

Or pass its signature:

But it shows only list of the signatures of the functions. Sometimes we want to see more information about a function. If you use option -i, then additional information will be shown:

Also, again it isn’t sufficient, in light of the fact that it shows just documentation of first capacity from the rundown. We need to move a counter to see documentation of additional capacities, e. g. to show information about third thing from the rundown:

Easier Hoogle Usage In Bash

It is bulky to check each time you need to peruse data about additional capacities, so I have arranged slam work which makes it simpler.

To search for function type:

Each function will have its counter at the beginning and just add its number at the end of command to show more information about specific function:

How to Install Hoog Command?

Command is available here. To use this command just add it to your ~/bashrc file.

Related Posts