diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-06-03 18:55:38 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-06-03 19:24:48 +0200 |
commit | af921a01e210fa1084236e63905d23acca3e7301 (patch) | |
tree | b9121d5019f9aa75bf826aababb57ea9bc768f28 | |
parent | 30d5f7a84c5bf516785a95de51cd0176367df450 (diff) |
Add a comment about the distribution of genRank
-rw-r--r-- | test/Gen.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Gen.hs b/test/Gen.hs index 19c50c8..29dffb2 100644 --- a/test/Gen.hs +++ b/test/Gen.hs @@ -33,6 +33,8 @@ import System.Random qualified as Random import Util +-- | Generates zero with small probability, because there's typically only one +-- interesting case for 0 anyway. genRank :: Monad m => (forall n. SNat n -> PropertyT m ()) -> PropertyT m () genRank k = do rank <- forAll $ Gen.frequency [(1, return 0) |