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

Request Handling Documentation Gone? #118

Open
xanderdunn opened this issue Mar 14, 2017 · 7 comments
Open

Request Handling Documentation Gone? #118

xanderdunn opened this issue Mar 14, 2017 · 7 comments

Comments

@xanderdunn
Copy link

In an old version of spock on Hackage I can find a Request Handling section that includes information on param, params, jsonBody, etc. There isn't information for any of these functions in the Hackage documentation for the most recent version of Spock. Spock still exports these functions, why is the documentation missing?

@brynedwards
Copy link
Contributor

Hi, those functions were moved to a separate package, Spock-core. You can find the Request Handling section here. I know this could be more obvious, I'm trying to help with improving docs at the moment.

@agrafix
Copy link
Owner

agrafix commented Mar 15, 2017

Yeah, all these functions are now "hidden" behind module Web.Spock.Action. Maybe we should reexport all the individual functions for good documentation, but then when making changes to Web.Spock.Action one has to be real careful to update all the reexports, so not a big fan...

@brynedwards
Copy link
Contributor

brynedwards commented Mar 15, 2017

I've been looking into doing this "the right way", which IMO would be showing the entire contents of Web.Spock.Action in Web.Spock without having to manually reexport everything. This is described in the Haddock docs, specifically the hide Haddock option, but doesn't seem to work for me (there seem to be a number of issues with module reexports in Haddock, so it might be due to one of them). Unless/until there is a way to make this work, I suggest either:

  • Reexporting everything in Web.Spock.Action individually.
  • Including a sentence or two below the actions heading explaining that the documentation for actions is in Web.Spock.Action

@agrafix
Copy link
Owner

agrafix commented Mar 15, 2017

Alternatively we could introduce a dummy identifier and then use hiding when importing/reexporting it. That could work?

@brynedwards
Copy link
Contributor

I think that should work, but I tried using hiding myself and couldn't get it to work, I'm assuming it's another Haddock issue.

@agrafix
Copy link
Owner

agrafix commented Mar 16, 2017

Hm... Then maybe just highlighting a link to Spock-core is the way to go for now.

@brynedwards
Copy link
Contributor

Looking at this again, since Web.Spock and Web.Spock.Core are nearly identical, I think a nice layout would be to have Web.Spock reexport everything from Web.Spock.Core and have module Web.Spock.Core and module Web.Spock.Action at the top of Web.Spock followed by Web.Spock exports, like this module does.

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

3 participants