ndmitchell / hoogle

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

Question regarding 'generate' command #212

Closed anler closed 7 years ago

anler commented 7 years ago

Hello, I'm using hoogle version 5 and I noticed that even when running hoogle generate && hoogle server --local if I search for Data.Maybe for example, the links points to hackage, but if I run hoogle generate --local && hoogle server --local links point to localhost. Is this the expected behaviour?

Another thing, the readme says to use hoogle data but that command seems to be removed in favor of generate right?

Thanks!

ndmitchell commented 7 years ago

Regarding hoogle data - you are right, I've updated the README. That whole document really needs a lot of love, but at least it's not totally wrong now.

Regarding --local - yes, I think that's intentional. When you do generate --local you are saying use links to the HTML on your hard drive in the database rather than links to hackage. When you do server --local you are saying rewrite local hard drive links as localhost and mirror them as most browsers don't let you click links from localhost to the file system (to avoid privilege escalation). Did you expect something different?

anler commented 7 years ago

Thanks for the explanation Neil, it sounds ok, I couldn't understand the explanation shown by hoogle --help but that's all :)

ndmitchell commented 7 years ago

I've slightly tweaked the help docs so they might be more intelligible, although what it really needs is an example in the README showing how and why you might want to use them.