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.
arbitraryBoundedRandom :: (Bounded a, Random a) => Gen atasty-quickcheck Test.Tasty.QuickCheck Generates an element of a bounded type. The element is chosen from the entire range of the type.
arbitrarySizedBoundedIntegral :: (Bounded a, Integral a) => Gen atasty-quickcheck Test.Tasty.QuickCheck 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.
chooseBoundedIntegral :: (Bounded a, Integral a) => (a, a) -> Gen atasty-quickcheck Test.Tasty.QuickCheck A fast implementation of choose for bounded integral types.
functionBoundedEnum :: (Eq a, Bounded a, Enum a) => (a -> b) -> a :-> btasty-quickcheck Test.Tasty.QuickCheck Provides a Function instance for types with Bounded and Enum. Use only for small types (i.e. not integers): creates the list [minBound..maxBound]!
shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a]tasty-quickcheck Test.Tasty.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 []
toBoundedInteger :: (Integral i, Bounded i) => Scientific -> Maybe iscientific Data.Scientific Convert a Scientific to a bounded integer. If the given Scientific doesn't fit in the target representation, it will return Nothing. This function also guards against computing huge Integer magnitudes (10^e) that could fill up all space and crash your program.
toBoundedRealFloat :: RealFloat a => Scientific -> Either a ascientific Data.Scientific Preciser version of toRealFloat. If the base10Exponent of the given Scientific is too big or too small to be represented in the target type, Infinity or 0 will be returned as Left.
-
optparse-applicative Options.Applicative.Help.Pretty Layouters should not introduce line breaks on their own.
-
conduit Conduit Same as linesUnbounded, but for ASCII/binary data.
-
conduit Conduit Convert a stream of arbitrarily-chunked textual data into a stream of data where each chunk represents a single line. Note that, if you have unknownuntrusted input, this function is unsafe/, since it would allow an attacker to form lines of massive length and exhaust memory.