{-# LANGUAGE TypeApplications #-}
module Test.QuickCheck.Extra
( reasonablySized
) where
import Prelude
import Test.QuickCheck
( Gen, scale )
reasonablySized :: Gen a -> Gen a
reasonablySized :: Gen a -> Gen a
reasonablySized = (Int -> Int) -> Gen a -> Gen a
forall a. (Int -> Int) -> Gen a -> Gen a
scale (Double -> Int
forall a b. (RealFrac a, Integral b) => a -> b
ceiling (Double -> Int) -> (Int -> Double) -> Int -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Floating Double => Double -> Double
forall a. Floating a => a -> a
sqrt @Double (Double -> Double) -> (Int -> Double) -> Int -> Double
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Double
forall a b. (Integral a, Num b) => a -> b
fromIntegral)