[Haskell-cafe] Hoogle vs Hayoo
waldmann at imn.htwk-leipzig.de
Fri Aug 23 09:35:23 CEST 2013
Mateusz Kowalczyk <fuuzetsu <at> fuuzetsu.co.uk> writes:
> I always thought [hayoo] was just Hoogle with more indexed docs.
Wait - there's a semantic difference:
hoogle does understand type signatures
(e.g., it can specialize them, or flip arguments of functions)
while hayoo just treats signatures as strings (it seems).
Example: search for [a] -> [a]
hoogle: will also return Data.Text.transpose :: [Text] -> [Text]
(note: instantiated a to Text)
hayoo: will also return Data.List.isInfixOf :: [a] -> [a] -> Bool
(note: the type is [a] -> ([a] -> Bool),
so it does actually not contain the type from the query)
I much prefer hoogle's query semantics.
PS: but hoogle also returns inits :: [a] -> [[a]]
which is not an instance of the query. Why is this?
More information about the Haskell-Cafe