Hoogle Search
Within LTS Haskell 24.41 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
arbitrarySizedBoundedIntegral :: (Bounded a, Integral a) => Gen amassiv-test Test.Massiv.Utils 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 amassiv-test Test.Massiv.Utils A fast implementation of choose for bounded integral types.
shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a]massiv-test Test.Massiv.Utils 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 []
readIntegralBounded :: (Integral a, Bounded a, Typeable a, ParseField a) => ReadM aoptparse-generic Options.Generic No documentation available.
-
rhine FRP.Rhine.ResamplingBuffer.FIFO A bounded FIFO buffer that forgets the oldest values when the size is above a given threshold. If the buffer is empty, it will return Nothing.
-
rhine FRP.Rhine.ResamplingBuffer.FIFO An unbounded FIFO buffer. If the buffer is empty, it will return Nothing.
-
rhine FRP.Rhine.ResamplingBuffer.LIFO A bounded LIFO buffer that forgets the oldest values when the size is above a given threshold. If the buffer is empty, it will return Nothing.
-
rhine FRP.Rhine.ResamplingBuffer.LIFO An unbounded LIFO buffer. If the buffer is empty, it will return Nothing.
lowerBounded :: Int -> Pattern a -> Pattern [a]turtle Turtle.Pattern Apply the given pattern at least the given number of times, collecting the results
>>> match (lowerBounded 5 dot) "123" [] >>> match (lowerBounded 2 dot) "123" ["123"]
upperBounded :: Int -> Pattern a -> Pattern [a]turtle Turtle.Pattern Apply the given pattern 0 or more times, up to a given bound, collecting the results
>>> match (upperBounded 5 dot) "123" ["123"] >>> match (upperBounded 2 dot) "123" [] >>> match ((,) <$> upperBounded 2 dot <*> chars) "123" [("12","3"),("1","23")]