Hoogle
A Haskell API search engine, written by NeilMitchell. It allows you to search by either name, or by approximate type signature. An article is being written for TheMonadReader, which will include some technical details.
How to use Hoogle
-
The web interface: http://haskell.org/hoogle
-
The LambdaBot plugin, @hoogle and @hoogle+
-
Download the source with CVS: http://sourceforge.net/cvs/?group_id=143787
-
Download a command line version (yet to be released, but get the source and compile it yourself)
-
A Mac OS X version (unreleased yet, but it does exist)
Examples
If you wanted to search for the standard prelude function map, you could type into the search any one of:
map (a -> b) -> [a] -> [b] (a -> a) -> [a] -> [a] (Int -> Bool) -> [Int] -> [Bool] [a] -> (a -> b) -> [b]
Todo
Admin
-
Write a website build script
-
get XHoogle in the repo
Short Term
i.e. before Hoogle3 goes public
-
Fix all parse errors, prove with a test
-
-> a
-
Monad m => Monad m => (a -> m r -> m r) -> r -> [a] -> m r
-
Regression tests for hoogle
-
You cannot search for certain keywords, i.e. @, because it is not a recognised lex symbol
-
Add comment characters, --, {- and -} to the list of symbols.
-
Add links to this wiki from hoogle.
-
Add a contact address - maybe: copyright Neil Mitchell - source code - wiki page - report bad search - contact me
-
Case sensitive search - if searching Map, then Map should come before map.
-
Put back more detailed information about the Prelude functions.
Medium Term
-
Parameterise out by package, i.e. split off OpenGL
-
Compile with Yhc and distribute
-
Write GTK front end
-
Firefox/Mozilla plugin
-
Multiword search? power set
-
Dehack the Score program
-
Multiparameter type classes
Long Term
-
Integration with Cabal
-
Integration with http://darcs.augustsson.net/Darcs/Djinn
-
Integration with lambdabot @where and @fact
Hoogle Suggest
-
People often type to, instead of ->
-
Numeric literals
-
Concepts? tuple, random, monads etc.
Bad Searches
-
(a -> b) -> ([a] -> [b]) -- should find map
-
@hoogle Data.?IntMap.?IntMap a -> [a] -- badly kills the module names
Higher Kinds
The following searches are all wrong because Hoogle doesn't understand higher kinds, i.e. Monad's.
-
Functor f => (a -> b) -> f a -> f b -- should find fmap
-
Monad m => [m a] -> m [a] -- should find sequence
-
(Monad m) => m (m a) -> m a -- should find join