Reputation: 3110
After I upload my package into hackages, it didn't generate haddock as others packages.
Anything I missed?
What I did is:
cabal dist
and a package generated under dist directory.Thank you.
Upvotes: 3
Views: 329
Reputation: 139890
It looks like the documentation is missing because your package didn't build correctly. I found this near the end of the build log:
src/Network/OAuth2/HTTP/HttpClient.hs:18:8:
Could not find module `Control.Monad.Trans.Resource'
It is a member of the hidden package `resourcet-0.3.2.1'.
Perhaps you need to add `resourcet' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
To avoid these sorts of problems, make sure your package builds locally with Cabal before uploading. Building with GHC directly will often mask these sorts of problems, since it will happily use whatever packages you have installed, regardless of whether you've mentioned them in your .cabal
file or not.
Upvotes: 0
Reputation: 16645
In addition to Thomas's answer, run cabal haddock
in your package directory and look for any errors.
Haddock is incredibly finicky in my experience, especially wrt. code blocks. If you get a parse error, just start deleting comments until docs can be generated. I usually use some extensively-documented package as a reference.
Upvotes: 1
Reputation: 64740
Docs take a little bit of time to generate. I believe they are ran at midnight GMT.
Upvotes: 6