[racket-dev] Roogle?

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Aug 5 01:48:51 EDT 2011

8 minutes ago, Anthony Cowley wrote:
> On Fri, Aug 5, 2011 at 1:22 AM, Eli Barzilay <eli at barzilay.org> wrote:
> > That's not surprising -- the question is how much the
> > search-by-type feature is used vs the plain by-name searches.
> Search-by-type is the main useful feature. Another search engine,
> hayoo, often does better on name-based searches covering
> hackage. Some people run local instances of hoogle as it is
> relatively straightforward to hook into emacs and will index all the
> types and names from all the packages you have installed locally.

OK, that sounds closer to what I asked...  (And on the positive side.)

> > We already have that kind of exploratory searching, since "types"
> > in the contract system are real functions.
> >
> > I guess that this is another way to make the point: in Haskell and
> > other statically typed languages types are second-class, but in
> > Racket they're first class so looking for a type name will get you
> > information because it's also a binding.  (And the same goes for
> > TR, only those are not runtime values.)
> Searching by type names and aliases works fine:
> <http://www.haskell.org/hoogle/?hoogle=String>

Yes, what I'm saying is that in Haskell, if you have a tool that
searches for bound values, you won't get types, therefore you need to
have a specific tool (or extension of one) that can search types.  In
Racket, then "contract type" is `string?', which is something that you
can look for even without a special by-contract search.

> Hoogle really is quite good, don't sell it short!

I'm not -- the above point is in no way saying anything bad about it,
it's just an observation about the differences between the two
language worlds.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.