[racket-dev] Roogle?
On Fri, Aug 5, 2011 at 12:08 AM, Eli Barzilay <eli at barzilay.org> wrote:
> 6 minutes ago, Asumu Takikawa wrote:
>> A few of us in the lab today were discussing how the Haskell
>> community has this nice tool called Hoogle
>> (http://www.haskell.org/hoogle) that lets you search Haskell docs by
>> type.
>
> Are there any *practical* uses for that thing?
Hoogle is very popular among the Haskell community, and regularly used
by experienced programmers and as a resource neophytes are pointed to.
> (Not a flame, I tried it a few times, and it looked like i might be
> useful in a language where you use point-free style to compose
> functions -- so you might know the type that you need `(a -> b -> c)
> -> (b -> c -> a)' but not the `flip' name. But such serches don't
> see, to work. So from this shallow scan, it looks like one of these
> things that sound cool on paper, but are useless in practice.)
The correct type for flip would have yielded more useful results:
<http://www.haskell.org/hoogle/?hoogle=%28a+-%3E+b+-%3E+c%29+-%3E+%28b+-%3E+a+-%3E+c%29>
On the teaching side, how much use students get out of hoogle varies a
lot. Some students struggle to get to the point where they can
adequately formulate the types they want, leaving hoogle a rather
pointless exercise somewhat akin to the frustration of a child using a
dictionary to look up how to spell a word (e.g. how can I find it if I
can't spell it?). Other students who embrace the specification-side of
programming seem to use it in an exploratory manner as much as a name
lookup service (e.g. this type seems interesting, I wonder if it's a
thing...).
Anthony