From af921a01e210fa1084236e63905d23acca3e7301 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 3 Jun 2024 18:55:38 +0200 Subject: Add a comment about the distribution of genRank --- test/Gen.hs | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3-70-g09d2