agrafix / Spock

Another Haskell web framework for rapid development
https://www.spock.li
678 stars 56 forks source link

Request Handling Documentation Gone? #118

Open xanderdunn opened 7 years ago

xanderdunn commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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:

agrafix commented 7 years ago

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

brynedwards commented 7 years ago

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 commented 7 years ago

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

brynedwards commented 7 years ago

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.