quickcheck icon indicating copy to clipboard operation
quickcheck copied to clipboard

haddocks for Test.QuickCheck.Random

Open cdornan opened this issue 3 years ago • 5 comments

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.

cdornan avatar Aug 01 '22 10:08 cdornan

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!

MaximilianAlgehed avatar Mar 26 '24 13:03 MaximilianAlgehed

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?

UlfNorell avatar Mar 26 '24 14:03 UlfNorell

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.

phadej avatar Mar 26 '24 16:03 phadej

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).

MaximilianAlgehed avatar Mar 26 '24 16:03 MaximilianAlgehed

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.

nick8325 avatar Apr 25 '24 12:04 nick8325