Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is hoogle a special search engine for Haskell code or was that an unintentional typo?


It is a special search engine for Haskell libraries. For example, if I want the `map` function but don't know what it's called (or what library it's in) I can search for its type signature, which must be something like `[a] -> (a -> b) -> [b]`. Hoogle finds exactly what I'm looking for: https://www.haskell.org/hoogle/?hoogle=%5Ba%5D+-%3E+%28a+-%3...

Note that this is true even though I reversed the argument order. It does fuzzy-matching of some sort. It will also help if you know the name of the function, since it searches those, too.


Yes, it's a special search engine: https://www.haskell.org/hoogle/

You don't search for words in the documentation etc., but enter the type of the function you want. This often works pretty well.


FPComplete's Hoogle is a bit more complete: https://www.fpcomplete.com/hoogle


It's good overall but sometimes the ranking is weird. For example, if you search for "ByteString", what you'd expect is only the #3 hit.

For beginners who are likely to be searching for core libraries, the other Hoogle might be more useful.



It's an idea that comes from Smalltalk, where for the longest time they've had a way to search for object methods given an input and an output, and it would search which object method did that.

So you can give it "blah" and "Blah" and it would find the method "capitalize" for instance.

Hoogle is like that but for Haskell, and instead of giving inputs and outputs you give it a few types and it looks for them in the function signatures.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: