Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
safe Safe No documentation available.
firstJustM :: Monad m => (a -> m (Maybe b)) -> [a] -> m (Maybe b)extra Control.Monad.Extra Like findM, but also allows you to compute some additional information in the predicate.
untilJustM :: Monad m => m (Maybe a) -> m aextra Control.Monad.Extra Keep running an operation until it becomes a Just, then return the value inside the Just as the result of the overall loop.
whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m ()extra Control.Monad.Extra Like whenJust, but where the test can be monadic.
whileJustM :: (Monad m, Monoid a) => m (Maybe a) -> m aextra Control.Monad.Extra Keep running an operation until it becomes a Nothing, accumulating the monoid results inside the Justs as the result of the overall loop.
firstJustM :: (Foldable f, Monad m) => (a -> m (Maybe b)) -> f a -> m (Maybe b)extra Data.Foldable.Extra A generalization of firstJustM to Foldable instances.
firstM :: Functor m => (a -> m a') -> (a, b) -> m (a', b)extra Data.Tuple.Extra Update the first component of a pair.
firstM (\x -> [x-1, x+1]) (1,"test") == [(0,"test"),(2,"test")]
firstJustM :: Monad m => (a -> m (Maybe b)) -> [a] -> m (Maybe b)extra Extra Like findM, but also allows you to compute some additional information in the predicate.
firstM :: Functor m => (a -> m a') -> (a, b) -> m (a', b)extra Extra Update the first component of a pair.
firstM (\x -> [x-1, x+1]) (1,"test") == [(0,"test"),(2,"test")]
untilJustM :: Monad m => m (Maybe a) -> m aextra Extra Keep running an operation until it becomes a Just, then return the value inside the Just as the result of the overall loop.