Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a]

    QuickCheck Test.QuickCheck

    Shrink an element of a bounded enumeration.

    Example

    data MyEnum = E0 | E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9
    deriving (Bounded, Enum, Eq, Ord, Show)
    
    >>> shrinkBoundedEnum E9
    [E0,E5,E7,E8]
    
    >>> shrinkBoundedEnum E5
    [E0,E3,E4]
    
    >>> shrinkBoundedEnum E0
    []
    

  2. arbitraryBoundedEnum :: (Bounded a, Enum a) => Gen a

    QuickCheck Test.QuickCheck.Arbitrary

    Generates an element of a bounded enumeration.

  3. arbitraryBoundedIntegral :: (Bounded a, Integral a) => Gen a

    QuickCheck Test.QuickCheck.Arbitrary

    Generates an integral number. The number is chosen uniformly from the entire range of the type. You may want to use arbitrarySizedBoundedIntegral instead.

  4. arbitraryBoundedRandom :: (Bounded a, Random a) => Gen a

    QuickCheck Test.QuickCheck.Arbitrary

    Generates an element of a bounded type. The element is chosen from the entire range of the type.

  5. arbitrarySizedBoundedIntegral :: (Bounded a, Integral a) => Gen a

    QuickCheck Test.QuickCheck.Arbitrary

    Generates an integral number from a bounded domain. The number is chosen from the entire range of the type, but small numbers are generated more often than big numbers. Inspired by demands from Phil Wadler.

  6. shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a]

    QuickCheck Test.QuickCheck.Arbitrary

    Shrink an element of a bounded enumeration.

    Example

    data MyEnum = E0 | E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9
    deriving (Bounded, Enum, Eq, Ord, Show)
    
    >>> shrinkBoundedEnum E9
    [E0,E5,E7,E8]
    
    >>> shrinkBoundedEnum E5
    [E0,E3,E4]
    
    >>> shrinkBoundedEnum E0
    []
    

  7. functionBoundedEnum :: (Eq a, Bounded a, Enum a) => (a -> b) -> a :-> b

    QuickCheck Test.QuickCheck.Function

    Provides a Function instance for types with Bounded and Enum. Use only for small types (i.e. not integers): creates the list [minBound..maxBound]!

  8. chooseBoundedIntegral :: (Bounded a, Integral a) => (a, a) -> Gen a

    QuickCheck Test.QuickCheck.Gen

    A fast implementation of choose for bounded integral types.

  9. arbitraryBoundedEnum :: (Bounded a, Enum a) => Gen a

    tasty-quickcheck Test.Tasty.QuickCheck

    Generates an element of a bounded enumeration.

  10. arbitraryBoundedIntegral :: (Bounded a, Integral a) => Gen a

    tasty-quickcheck Test.Tasty.QuickCheck

    Generates an integral number. The number is chosen uniformly from the entire range of the type. You may want to use arbitrarySizedBoundedIntegral instead.

Page 18 of many | Previous | Next