5 ms·
Is hoogle a special search engine for Haskell code or was that an unintentional typo?
by xrstf 12y ago
Is hoogle a special search engine for Haskell code or was that an unintentional typo?
- rifung 12y agohttps://www.haskell.org/hoogle/ https://www.haskell.org/hoogle/
- deleted 12y ago[deleted]
- luchs 12y agoYes, it's a special search engine: https://www.haskell.org/hoogle/ 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.
- TJSomething 12y agoFPComplete's Hoogle is a bit more complete: https://www.fpcomplete.com/hoogle https://www.fpcomplete.com/hoogle
- michaelochurch 12y agoIt'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.
- thedufer 12y agoIt 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+-%3E+b%29+-%3E+%5Bb%5D 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.
- innguest 12y agoIt'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.