nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
706 stars 119 forks source link

haddocks for Test.QuickCheck.Random #346

Open cdornan opened 1 year ago

cdornan commented 1 year ago

I need to produce a variant of generate which requires access to Test.QuickCheck.Random but it doesn't have any Haddocks — can we get the Haddocks for this and the other missing API modules be uploaded to Hackage?

I would be happy to help with this if assistance would be welcome.

MaximilianAlgehed commented 4 months ago

If you're willing to sit down and write the haddocks I promise I'll look at them and merge them when they're done!

UlfNorell commented 4 months ago

Test.QuickCheck.Random and a few other modules were explicitly hidden from haddock in 80bdfaae. @nick8325 do you want to weigh in on the motivation for this?

phadej commented 4 months ago

For the record, I consider hiding modules from haddock a bad practice. Either you should hide the module (i.e. put it in other-modules), but if there's a reason to have it exposed than non-providing haddocks is just hostile towards users.

There is OPTIONS_HADDOCK non-home if you don't want haddock links to point to these modules.

MaximilianAlgehed commented 4 months ago

I'm with @phadej on this one - just expose the damn haddocks as these modules really shouldn't be internal (you do sometimes really need them for legitimate use cases).

nick8325 commented 3 months ago

I think I did this to hide stuff which I thought should never be relevant for users (such as State). But this is clearly silly in retrospect - I'd prefer bringing the haddocks back but moving internal modules to Test.QuickCheck.Internal.Whatever.

Test.QuickCheck.Random should clearly be exposed (and not Internal), as QCGen appears in the public API. But also it should have an explicit export list added, so it doesn't export whatever random helper functions are used by the generator.