hunt-framework / hayoo

Hackage search engine
56 stars 9 forks source link

Ability to just get unique packages containing module #40

Closed houshuang closed 9 years ago

houshuang commented 9 years ago

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?

alexbiehl commented 9 years ago

Hey,

I am working on a new indexer for Hayoo. I will include this info into the indexed packages, you will be able to query it like this:

type:package modules:X.Y.Z

You'll get only package results which export the module X.Y.Z. Is that what you need?

houshuang commented 9 years ago

It's exactly what I need. Thanks!

On Thu, Feb 26, 2015 at 5:38 AM, Alex Biehl notifications@github.com wrote:

Hey,

I am working on a new indexer for Hayoo. I will include this info into the indexed packages, you will be able to query it like this:

type:package modules:X.Y.Z

You'll get only package results which include the module X.Y.Z. Is that what you need?

— Reply to this email directly or view it on GitHub https://github.com/hunt-framework/hayoo/issues/40#issuecomment-76156493.

http://reganmian.net/blog -- Random Stuff that Matters

alexbiehl commented 9 years ago

Great! Please stay tuned, we will release a new Hayoo version soon.