ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
753 stars 137 forks source link

Hoogle can't restrict number of output lines with cmdline --json flag #331

Closed monkoose closed 4 years ago

monkoose commented 5 years ago

Hello, i have a question. Any possible way to restrict number of generated json items from cmdline tool with --json flag, like with --count for default output? If no, is it planned for future releases?

ndmitchell commented 5 years ago

I believe count flag does it. Did you find it?

monkoose commented 5 years ago

I found workaround for my needs, just to process output as stream. But count doesn't work and you get all possible output with --json flag, and for some query it could be big like 10,000+ items.

ndmitchell commented 4 years ago

Sounds like a legitimate issue. Very happy to take a patch.

monkoose commented 4 years ago

I don't have one. Waiting for implementation.

ndmitchell commented 4 years ago

Pushed a fix. Can you test it from master and confirm it works the way you were hoping? If so, I'll make a release.

monkoose commented 4 years ago

Seems like works perfectly.

monkoose commented 4 years ago

Tested.

ndmitchell commented 4 years ago

Thanks, released as v5.0.17.13