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.

  1. handleJust_ :: (SomeException -> Maybe b) -> (b -> IO a) -> IO a -> IO a

    extra Extra

    Like catch_ but for handleJust

  2. tryJust_ :: (SomeException -> Maybe b) -> IO a -> IO (Either b a)

    extra Extra

    Like catch_ but for tryJust

  3. untilJustM :: Monad m => m (Maybe a) -> m a

    extra Extra

    Keep running an operation until it becomes a Just, then return the value inside the Just as the result of the overall loop.

  4. 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
    

  5. whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m ()

    extra Extra

    Like whenJust, but where the test can be monadic.

  6. whileJustM :: (Monad m, Monoid a) => m (Maybe a) -> m a

    extra Extra

    Keep running an operation until it becomes a Nothing, accumulating the monoid results inside the Justs as the result of the overall loop.

  7. breakJust :: (a -> Maybe b) -> [a] -> ([a], Maybe (b, [a]))

    utility-ht Data.List.HT

    forAllMaybeFn $ \f xs -> snd (breakJust f xs) == dropWhileNothing f xs
    

  8. 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')],"---")
    

  9. 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',"---")])
    

  10. spanJust :: (a -> Maybe b) -> [a] -> ([b], [a])

    utility-ht Data.List.HT

    No documentation available.

Page 33 of many | Previous | Next