Hoogle Search

Within LTS Haskell 24.65 (ghc-9.10.3)

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

  1. fromListMaybe :: [a] -> Maybe (List2 a)

    Agda Agda.Utils.List2

    Safe. O(1).

  2. boolToMaybe :: Bool -> a -> Maybe a

    Agda Agda.Utils.Maybe

    Retain object when tag is True.

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

    Agda Agda.Utils.Maybe

    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 d f = flip (maybe d) m f
    

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

    Agda Agda.Utils.Maybe

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

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

    Agda Agda.Utils.Maybe

    Filtering a singleton list.

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

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

    Agda Agda.Utils.Maybe

    Version of mapMaybe with different argument ordering.

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

    Agda Agda.Utils.Maybe

    Monadic version of fromMaybe.

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

    Agda Agda.Utils.Maybe

    Lift a maybe to an Alternative.

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

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

    Agda Agda.Utils.Maybe

    unionWith for collections of size <= 1.

Page 264 of many | Previous | Next