Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the CLI of opening haddocks in the browser #2025

Open
mgsloan opened this issue Apr 12, 2016 · 2 comments
Open

Change the CLI of opening haddocks in the browser #2025

mgsloan opened this issue Apr 12, 2016 · 2 comments

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Apr 12, 2016

I think the behavior in #2015 is a bit surprising. What if instead:

having --open take a package identifier argument (version optional). This argument would implicitly get treated as a target, and we'd open the docs.

Then, we can also have stack haddock --open-index, which could work even when the build step has nothing to build.

One reason I like this is that latter is that later on we can further overload it with opening the docs for a particular module, like stack haddock --open Control.Lens. That said, I already plan to overload the target syntax for stack ghci with something similar. Might consider putting it under stack ghci --module Control.Lens or something, though.

@silky
Copy link
Contributor

silky commented Apr 12, 2016

opening via package identifiers sounds fantastic to me; it will be really amazing to get to the haddock docs for any installed package so quickly, especially, as mentioned in another thread, the doom that is the current hackage docs.

@mgsloan
Copy link
Contributor Author

mgsloan commented Apr 12, 2016

@silky Yup, it's pretty great! As of today, you can now do stack haddock --open pkg to open the docs for that package, but you have to specify just that single package as a target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants