[Haskell-cafe] hayoo doesn't find the Kleisli arrow?

Brent Yorgey byorgey at seas.upenn.edu
Mon Jun 23 12:04:40 UTC 2014

On Sun, Jun 22, 2014 at 08:24:35PM -0700, Erik Rantapaa wrote:
> I just happen to notice that this query comes back empty in Hayoo:
> (a -> m b) -> (b -> m c) -> (a -> m c)
> Hoogle is able to find (>=>), and I'm wondering if its a bug or...?

Hayoo does text-based search only; it does not do true type searches.
If you remove the parentheses from the final arrow, i.e.

  (a -> m b) -> (b -> m c) -> a -> m c

then you will see that it does find (>=>).  The reason is that it does
not really know about types, it is just doing a textual matching so it
does not know that the parentheses are unimportant.  (Actually, it
seems Hayoo may have a bit of smarts beyond just plain text matching
when it comes to types; for example, searching for [b] -> b instead of
[a] -> a will still find 'head'.  I am not really familiar with the

Hoogle, on the other hand, truly understands the syntax and semantics
of types, so it is able to do things like find related, simplified, or
reordered versions of the search type, deal with alpha-equivalence, etc.


More information about the Haskell-Cafe mailing list