I've been having some trouble with Setup.hs and could use some help. I'm using stack for building my project, and would like to auto-generate an HTML file as part of the build process. I'm able to specify hooks in Setup.hs to do this, but I'm running into problems.
1. I'm not sure what the "correct" or suitable paths are for publishing HTML documentation. The closest I could find was the doc dir on the install path (see below). Should the HTML be created in a built folder and later copied over to an install/dist dir? The semantics associated with each of these is not clear to me.
2. I played around with some hooks. I was able to generate the HTML file in the installation's doc dir, but it looks like that dir is only created as part of the install hook (naturally), whereas the install hook is never triggered by `stack build`. (The code below never executes if I use the instHook.) What is the right hook to use, and how?