Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. liftMaybe :: Alternative f => Maybe a -> f a

    Agda Agda.Utils.Maybe

    Lift a maybe to an Alternative.

  2. spanMaybe :: (a -> Maybe b) -> [a] -> ([b], [a])

    Agda Agda.Utils.Maybe

    Like span, takes the prefix of a list satisfying a predicate. Returns the run of Justs until the first Nothing, and the tail of the list.

  3. unionMaybeWith :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a

    Agda Agda.Utils.Maybe

    unionWith for collections of size <= 1.

  4. unionsMaybeWith :: (a -> a -> a) -> [Maybe a] -> Maybe a

    Agda Agda.Utils.Maybe

    unionsWith for collections of size <= 1.

  5. unzipMaybe :: Maybe (a, b) -> (Maybe a, Maybe b)

    Agda Agda.Utils.Maybe

    Unzipping a list of length <= 1.

  6. caseMaybe :: Maybe a -> b -> (a -> b) -> b

    Agda Agda.Utils.Maybe.Strict

    Version of maybe with different argument ordering. Often, we want to case on a Maybe, do something interesting in the Just case, but only a default action in the Nothing case. Then, the argument ordering of caseMaybe is preferable.

    caseMaybe m err f = flip (maybe err) m f
    

  7. caseMaybeM :: Monad m => m (Maybe a) -> m b -> (a -> m b) -> m b

    Agda Agda.Utils.Maybe.Strict

    Monadic version of caseMaybe. That is, maybeM with a different argument ordering.

  8. filterMaybe :: (a -> Bool) -> a -> Maybe a

    Agda Agda.Utils.Maybe.Strict

    Filtering a singleton list.

    filterMaybe p a = listToMaybe (filter p [a])
    

  9. forMaybe :: [a] -> (a -> Maybe b) -> [b]

    Agda Agda.Utils.Maybe.Strict

    Version of mapMaybe with different argument ordering.

  10. fromMaybeM :: Monad m => m a -> m (Maybe a) -> m a

    Agda Agda.Utils.Maybe.Strict

    Monadic version of fromMaybe.

Page 260 of many | Previous | Next