Hoogle Search
Within LTS Haskell 24.20 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
handleJust_ :: (SomeException -> Maybe b) -> (b -> IO a) -> IO a -> IO aextra Extra Like catch_ but for handleJust
tryJust_ :: (SomeException -> Maybe b) -> IO a -> IO (Either b a)extra Extra 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.
whenJust :: Applicative m => Maybe a -> (a -> m ()) -> m ()extra Extra Perform some operation on Just, given the field inside the Just. This is a specialized for_.
whenJust Nothing print == pure () whenJust (Just 1) print == print 1
whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m ()extra Extra Like whenJust, but where the test can be monadic.
whileJustM :: (Monad m, Monoid a) => m (Maybe a) -> m aextra Extra Keep running an operation until it becomes a Nothing, accumulating the monoid results inside the Justs as the result of the overall loop.
breakJust :: (a -> Maybe b) -> [a] -> ([a], Maybe (b, [a]))utility-ht Data.List.HT forAllMaybeFn $ \f xs -> snd (breakJust f xs) == dropWhileNothing f xs
segmentAfterJust :: (a -> Maybe b) -> [a] -> ([([a], b)], [a])utility-ht Data.List.HT >>> segmentAfterJust (\c -> toMaybe (isLetter c) (toUpper c)) "123a5345b---" ([("123",'A'),("5345",'B')],"---")segmentBeforeJust :: (a -> Maybe b) -> [a] -> ([a], [(b, [a])])utility-ht Data.List.HT >>> segmentBeforeJust (\c -> toMaybe (isLetter c) (toUpper c)) "123a5345b---" ("123",[('A',"5345"),('B',"---")])spanJust :: (a -> Maybe b) -> [a] -> ([b], [a])utility-ht Data.List.HT No documentation available.