hunt-framework / hayoo Goto Github PK
View Code? Open in Web Editor NEWHackage search engine
Hackage search engine
Searching for the join
function, I typed in m (m a) -> m a
http://hayoo.fh-wedel.de/?query=m+%28m+a%29+-%3E+m+a
but got no results. I'm pretty sure this should work, since that is precisely the signature of join
.
http://hayoo.fh-wedel.de/?query=name%3A%21map+package%3Abase
Prelude.map and Data.List.map should be merged into one document
du könntest noch auto submit machen, wenn man nen surchvorschlag anklickt, bzw, wenn man auch per Tastatur was auswählt by @charendt
I love hayoo and use it very intensively. How about launching search by pressing enter key while still focusing text field? I would safe seconds - you don't need to leave keyboard and find your mouse.
A suggestion for linking to docs on Hackage...
Currently Hayoo is linking to the "latest version" of a package on Hackage via a url which does not include a version id, e.g.:
http://hackage.haskell.org/package/persistent/docs/Database-Persist-Sql.html#v:runSqlConn
(You can search for runSql
in Hayoo to have this link show up in the results.)
However, the docs for more and more recent uploads to Hackage are not getting generated - in fact, they are not even being attempted. For instance, the link above goes to a "Not Found" page because the docs for the latest version of persistent don't exist and as of now the status is still "Docs pending" - meaning that no attempts to build the docs have been made.
A solution to this problem is to have Hayoo use version specific links when linking to Hackage. The version specific link should always work because the Hoogle index file and the Haddocks pages are generated at the same time. Thus, a Hoogle index file for a specific version implies that the Haddocks for that version also exist. Moreover, Hayoo would be sending users to accurate documentation - docs which are guaranteed to match what is presented in the Hayoo search results.
For some reason more and more recently uploaded packages on Hackage do not have docs even though previous versions of the same package do have docs. The problem seems to have started around the end of November 2015.
I've created a report which provides data on the problem:
http://erantapaa.github.io/doc-status-2016-07-08/report.html
Each row represents a recent package upload for which Haddock generation has not been attempted.
If you click on the number on the left most column it will pop up an English explanation of what the data in that row means. Good examples are rows 41-45 are similar ones.
Starting with a search for Int -> [a] -> Maybe a
, I get two responses: getI :: Int -> [a] -> Maybe a
and el :: Int -> [a] -> Maybe a
. Good so far, but the first result mentions !!
, the second mentions tryIndex
, and both links produce Internal Error: (line 1, column 49): unexpected "S" expecting digit
The query being executed is:
((name:!'!!' package:!base module:!'Data.List')^SC {unScore = 100.0}) OR ((name:!'!!' package:!base)^SC {unScore = 10.0}) OR name:!'!!'
The complaint seems to be about (...)^SC
The search "syntactic :$" or "syntactic :+:" (without quotes) both cause a connection error:
Connection Error: StatusCodeException (Status {statusCode = 404, statusMessage = "Not Found"}) [("Transfer-Encoding","chunked"),("Date","Tue, 30 Sep 2014 13:10:21 GMT"),("Server","Warp/3.0.0.3"),("Content-Type","application/json"),("X-Response-Body-Start","{\n \"msg\": \"mentioned context(s) do not exist: [\\\"syntactic\\\"]\",\n \"code\": 404\n}")] (CJ {expose = []})
Search for "[a] -> Maybe a" and then press "Next Page". It briefly flashes "Loading..." but then goes back to be the "Next Page" button. However, nothing else changes, i.e., no new results are displayed.
remove the search bar out of the hamburger menu
When nothing is found, hayoo displays just the button "Next Page".
Better: display a message that nothing matched the query.
name:base type:package should find base
Try searching for markdown. I think javascript code from the hackage is being injected. This could be a serious security risk.
The next (page) button shows some weird behavior. Try e.g. foldl stringmap
, this gives a single result,
pressing the next button appends this single result a 2. time.
For a query with more results, e.g. abc
the effect is somewhat similar, pressing next appends
all already shown result and a few more.
Rather than expanding to the whole function docstring, it removes any function description, leaving only the type signature.
Observed on Chrome Version 51.0.2704.84 (64-bit), OSX 10.9.5
HTML in documentation is not properly escaped, which is an injection issue. You can see this by searching for textarea.
old hayoo finds the function. Not sure if this is a hayoo or hunt issue.
I would find it incredibly helpful if there were a firefox search plugin for Hayoo, perhaps along the lines of the search plugin for Hoogle. Are there any plans for this to happen?
I've been experimenting with different ways of presenting the doc section for returned matches.
Here are some ideas -- feedback is very welcome.
Demo 1 - Adding a More/Less link
In this demo a More/Less link is added to those documentation sections which are too long or multi-line.
Note that in on the max
page not all results have a More/Less link - it's only added when needed.
I'm still experimenting with alternative ways of implementing the More/Less control. Perhaps use an icon (like ►) in the left margin of the doc section.
Demo 2 - Trim lines using CSS
This demo just uses CSS to trim the first line of the doc section to the page width. Subsequent paragraphs and pre blocks are hidden. I haven't implemented a toggle control, but I'm sure one could be added.
There are some entries (on the max
page) which have more docs to display, e.g. glGetBooleanv
) but there is no visual indication that there is more.
<_sebastian_> @hayoo test
<lambdabot> Unknown command, try @list
but would it be possible to change the lexical syntax to match Haskell's syntax? I.e. any valid Haskell identifier is also a valid search query.
Some recent updates made Hayoo searching very inconvenient, since now it often outputs anything but the expected results. For instance, searching for evalState
does not even include the obviously expected result from the "transformers" package in the first page.
Querying for Lens' a b
http://hayoo.fh-wedel.de/?query=Lens%27+a+b
fails with error
Internal Error: (line 1, column 5): unexpected '\'' expecting "\\", "^", space, white space, "++", "NEAR", "FOLLOW", "AND", "OR" or end of input
Any query yields the following error message:
Connection Error: StatusCodeException (Status {statusCode = 500, statusMessage = "Internal Server Error"})
[ ("Transfer-Encoding","chunked")
, ("Date","Fri, 04 Sep 2015 05:47:07 GMT")
, ("Server","Warp/3.0.13.1")
, ("Content-Type","text/plain; charset=utf-8")
, ("X-Response-Body-Start","hunt.log: commitBuffer: resource exhausted (No space left on device)")
, ("X-Request-URL","POST http://localhost:3000/eval")
] (CJ {expose = []})
"Maybe I'm just unclear about what Yahoo indexed. 'Maybe String -> String' doesn't have "fromJust" in the first page of hits, but "Maybe a -> a" is just fine."
we don't need to put this into the index, but the query generator could normalize this to Maybe a -> a
Parses, but no results: MonadState s m => m s
http://hayoo.fh-wedel.de/?query=MonadState+s+m+%3D%3E+m+s
Fails to parse: MonadState s m => s -> m ()
http://hayoo.fh-wedel.de/?query=MonadState+s+m+%3D%3E+s+-%3E+m+%28%29
On this page:
http://hayoo.fh-wedel.de/?query=delete
the delete
for IntMaps has links for both Data.IntMap.Lazy and Data.IntMap.Strict.
However the href for these modules both point to the Lazy doc page.
Same happens for the pairs: Data.Map.Lazy / Strict, Data.HashMap.Lazy / Strict, etc.
"just searcing for 'map' doesn't show the map function from the Prelude?"
Don't do that, please
This package is completely missing from the index.
I'm thinking of trying to build some functionality into IHaskell which automatically suggests packages to install when trying to import a module that doesn't exist (for example by copying and pasting example code). I was thinking of using the Hayoo JSON API to do the lookup, however if I search for for example Prelude, which I know is offered by a number of Hackage packages, I get the first 20 hits full of functions from base Prelude... Is there currently a way to just show all the packages that provide a certain module? If not, could we add it? I could do a pull request if it was something you might be willing to add. Or do you know of any other programmatic/API way of getting this information currently, apart from Hayoo?
namespace/package seperators since 4.8.1.0 should be replaced
"-" by ".", e.g.:
"GHC-Base" to "GHC.Base"
https://hackage.haskell.org/package/base-4.8.0.0/docs/src/GHC-Base.html
https://hackage.haskell.org/package/base-4.8.1.0/docs/src/GHC.Base.html
http://hayoo.fh-wedel.de/?query=join -> source leads to
http://hackage.haskell.org/package/base/docs/src/GHC-Base.html#join
the url contains
´´´
^SC {unScore = 100.0}
´´´
Search query: zipM
Displayed result: zipMono :: a -> a -> a) -> v -> v -> v
Expected result: zipMono :: Proxy c -> (forall a. c a => a -> a -> a) -> v -> v -> v
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.