
I have a question about the ranking algorithm of Hoogle 3.1: The top match of hoogle "(a -> b) -> b" is the inexact match Control.Monad.State.Class.gets :: MonadState s m => (s -> a) -> m a (which cannot be made to unify with (a -> b) -> b) instead of Control.Monad.Cont.runCont (undefined :: Cont r a) :: (a -> r) -> r which does. I would have thought all exact matches would come first (after considering all partial applications), especially as the increase in complexity is at most a small constant factor (~ 2 or 3) for considering all possible partial applications (type tails) of known library functions. Dan Neil Mitchell wrote:
Hi,
I am pleased to announce Hoogle 3.1. Hoogle is a search engine for Haskell functions, that allows the user to search by name or approximate type signature. Hoogle can be used without installing anything, by simply visiting the online interface, or can be installed locally.
* Online interface: http://www.haskell.org/hoogle/ * Cabal release: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hoogle-3.1
The Cabal release contains a command line version of the Hoogle tool, which you can install with the standard Cabal commands.
Hoogle 3.1 has a number of new features.
Command line version:
* A proper cabal release, including proper installing of the search database. * cabal-install compatible * No longer requires haskell-source-extensions (trhsx) to be installed
Web interface:
* Better entity escaping in some bits of the web interface * Keyword links work again * Lambdabot suggestions work * Update to the most recent version of base * Security fixes, specifically possible code injection bugs (http://en.wikipedia.org/wiki/Code_injection) - none of which were ever exploited, or could have been exploited (as far as I can tell)
I intend to write a more detailed account of the security fixes in a blog post, which will be available from http://planet.haskell.org/ . Running a custom version of the web interface is not really supported, but if you are, please upgrade to the latest darcs version.
There are still several known bugs in the Hoogle 3.1 release, but these are more difficult to fix, and will probably be solved in a forthcoming Hoogle 4.0.
Thanks
Neil _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Hi
The top match of hoogle "(a -> b) -> b" is the inexact match
Control.Monad.State.Class.gets :: MonadState s m => (s -> a) -> m a
(which cannot be made to unify with (a -> b) -> b) instead of
Control.Monad.Cont.runCont (undefined :: Cont r a) :: (a -> r) -> r
which does.
What if the type of gets was :: (s -> a) -> m a? Would you then think it was the right choice of ordering? In runCont you are effectively deleting an argument to get equality, in gets you are simply unifying "a" and "m a". Since m a is just wrapped in a container (monad in this case), its entirely feasible the person wanted the monadic version. The reason Hoogle sees gets without the type class is because MonadState is a multi-parameter type class, and hence not Haskell 98. Hoogle simply ignores all MPTC's while doing matching. This will be fixed in Hoogle 4. Thanks Neil

Neil, Would you consider adding auto-complete feature on Hoogle in the forth coming release? http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter

Hi Steve,
Would you consider adding auto-complete feature on Hoogle in the forth coming release?
http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter
I am slightly hoping that I'll be able to remove the Search button entirely, and just have results as you type. Whether that becomes feasible depends on how quickly the Hoogle search works, at the moment its way too slow, but the next version has clever data structures etc. which should make it fast enough, at least for text searches. Thanks Neil

You can try aggressive caching and indexing (which google uses often)
based on 20-80 rule.
http://en.wikipedia.org/wiki/Pareto_principle
On Thu, Feb 28, 2008 at 7:49 PM, Neil Mitchell
Hi Steve,
Would you consider adding auto-complete feature on Hoogle in the forth coming release?
http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter
I am slightly hoping that I'll be able to remove the Search button entirely, and just have results as you type. Whether that becomes feasible depends on how quickly the Hoogle search works, at the moment its way too slow, but the next version has clever data structures etc. which should make it fast enough, at least for text searches.
Thanks
Neil

Hi
You can try aggressive caching and indexing (which google uses often) based on 20-80 rule.
The Hoogle logs suggest this wouldn't be that useful. The most commonly invoked searches are the three listed on the front page. After that, the most common search is actually for "where", at under 1%. However, there are other ways I think I can get the necessary speed, and autocomplete would be very useful. Thanks Neil

Interesting to know people are looking for \"where\". As a fairly new
Haskeller, I bumped into frequent indentation issues (if-then-else,
case, where, let, do, etc) and sometimes not sure where to place
\"where\" properly. Maybe beginners are having problem with syntax
more than other things and they are asking Hoogle to get some
suggestions...
Or they are using Hoogle as Ask.com. Where is this? Where can I find that?
On 2/29/08, Neil Mitchell
The Hoogle logs suggest this wouldn\'t be that useful. The most commonly invoked searches are the three listed on the front page. After that, the most common search is actually for \"where\", at under 1%. However, there are other ways I think I can get the necessary speed, and autocomplete would be very useful.
Thanks
Neil

Hi
Interesting to know people are looking for \"where\". As a fairly new Haskeller, I bumped into frequent indentation issues (if-then-else, case, where, let, do, etc) and sometimes not sure where to place \"where\" properly. Maybe beginners are having problem with syntax more than other things and they are asking Hoogle to get some suggestions...
Or they are using Hoogle as Ask.com. Where is this? Where can I find that?
No, they are just searching for "where" on its own. I'm not entirely sure why - if a new user who actually did it would let me know, I'd be very interested. Originally, Hoogle did not search for keywords - as a result of real users actually searching for them it got modified to include them. Because they are a new addition, they got tacked on lightly, which is why keywords actually have a module in Hoogle :-) Thanks Neil

On 2008-02-29, Neil Mitchell
Hi
Interesting to know people are looking for \"where\". As a fairly new Haskeller, I bumped into frequent indentation issues (if-then-else, case, where, let, do, etc) and sometimes not sure where to place \"where\" properly. Maybe beginners are having problem with syntax more than other things and they are asking Hoogle to get some suggestions...
Or they are using Hoogle as Ask.com. Where is this? Where can I find that?
No, they are just searching for "where" on its own. I'm not entirely sure why - if a new user who actually did it would let me know, I'd be very interested. Originally, Hoogle did not search for keywords - as a result of real users actually searching for them it got modified to include them. Because they are a new addition, they got tacked on lightly, which is why keywords actually have a module in Hoogle :-)
How's about modifying hoogle to put up a message asking them before the normal response? -- Aaron Denney -><-

On Fri, 29 Feb 2008, Neil Mitchell wrote:
Hi Steve,
Would you consider adding auto-complete feature on Hoogle in the forth coming release?
http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter
I am slightly hoping that I'll be able to remove the Search button entirely, and just have results as you type.
For the WWW version of Hoogle this means that data must be transmitted constantly and I think that rises a privacy problem. I don't want that my typing behaviour can be observed and analysed somewhere. Such technique would also require JavaScript which is disabled in browsers of security oriented people.

Hi Henning,
For the WWW version of Hoogle this means that data must be transmitted constantly and I think that rises a privacy problem. I don't want that my typing behaviour can be observed and analysed somewhere. Such technique would also require JavaScript which is disabled in browsers of security oriented people.
The current version of Hoogle already uses Javascript to do a few things (setting focus, adding quick search) - but if javascript is disabled it still works perfectly well. I will stick to this design principle. I haven't thought too much about the front end, as the front end is comparatively easy compared to the back end stuff. Once I have thought about it, I'll release something for feedback, and will be happy to incorporate anyones suggestions. AJAX'y and auto-complete would save me time when using Hoogle, so I would like to add it, but of course will take privacy very seriously. Thanks Neil
participants (5)
-
Aaron Denney
-
Dan Weston
-
Henning Thielemann
-
Neil Mitchell
-
Steve Lihn