Hoogle Search
Within LTS Haskell 24.32 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
getMaybeOf :: Get a -> Get (Maybe a)cereal Data.Serialize.Get Read in a Maybe in the following format: Word8 (0 for Nothing, anything else for Just) element (when Just)
putMaybeOf :: Putter a -> Putter (Maybe a)cereal Data.Serialize.Put No documentation available.
evalMaybe :: (MonadTest m, HasCallStack) => Maybe a -> m ahedgehog Hedgehog Fails the test if the Maybe is Nothing, otherwise returns the value in the Just.
evalMaybeM :: (MonadTest m, MonadCatch m, HasCallStack) => m (Maybe a) -> m ahedgehog Hedgehog Fails the test if the action throws an exception, or if the Maybe is Nothing, otherwise returns the value in the Just.
mapMaybe :: (MonadGen m, GenBase m ~ Identity) => (a -> Maybe b) -> m a -> m bhedgehog Hedgehog.Gen Generates a value which is the result of the given function returning a Just. The original generator's shrink tree will be retained, with values returning Nothing removed. Subsequent shrinks of those values will be retained. Compared to mapMaybeT, shrinking may be slower but will be optimal. It's possible that the function will never return Just, or will only do so a larger size than we're currently running at. To avoid looping forever, we limit the number of retries, and grow the size with each retry. If we retry too many times then the whole generator is discarded.
mapMaybeT :: MonadGen m => (a -> Maybe b) -> m a -> m bhedgehog Hedgehog.Gen Generates a value which is the result of the given function returning a Just. The original generator's shrink tree will be retained, with values returning Nothing removed. Subsequent shrinks of those values will be retained. Compared to mapMaybeT, shrinking may be slower but will be optimal. The type is also more general, because the shrink behavior from mapMaybe would force the entire shrink tree to be evaluated when applied to an impure tree. It's possible that the function will never return Just, or will only do so a larger size than we're currently running at. To avoid looping forever, we limit the number of retries, and grow the size with each retry. If we retry too many times then the whole generator is discarded.
fromTreeMaybeT :: MonadGen m => TreeT (MaybeT (GenBase m)) a -> m ahedgehog Hedgehog.Internal.Gen Lift a predefined shrink tree in to a generator, ignoring the seed and the size.
mapMaybe :: (MonadGen m, GenBase m ~ Identity) => (a -> Maybe b) -> m a -> m bhedgehog Hedgehog.Internal.Gen Generates a value which is the result of the given function returning a Just. The original generator's shrink tree will be retained, with values returning Nothing removed. Subsequent shrinks of those values will be retained. Compared to mapMaybeT, shrinking may be slower but will be optimal. It's possible that the function will never return Just, or will only do so a larger size than we're currently running at. To avoid looping forever, we limit the number of retries, and grow the size with each retry. If we retry too many times then the whole generator is discarded.
mapMaybeT :: MonadGen m => (a -> Maybe b) -> m a -> m bhedgehog Hedgehog.Internal.Gen Generates a value which is the result of the given function returning a Just. The original generator's shrink tree will be retained, with values returning Nothing removed. Subsequent shrinks of those values will be retained. Compared to mapMaybeT, shrinking may be slower but will be optimal. The type is also more general, because the shrink behavior from mapMaybe would force the entire shrink tree to be evaluated when applied to an impure tree. It's possible that the function will never return Just, or will only do so a larger size than we're currently running at. To avoid looping forever, we limit the number of retries, and grow the size with each retry. If we retry too many times then the whole generator is discarded.
toTreeMaybeT :: MonadGen m => m a -> m (TreeT (MaybeT (GenBase m)) a)hedgehog Hedgehog.Internal.Gen Lift a predefined shrink tree in to a generator, ignoring the seed and the size.