Hoogle Search

Within LTS Haskell 24.41 (ghc-9.10.3)

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

  1. mapMaybe :: (a -> Maybe b) -> [a] -> [b]

    incipit-base Incipit.Base

    The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

    Examples

    Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:
    >>> import GHC.Internal.Text.Read ( readMaybe )
    
    >>> let readMaybeInt = readMaybe :: String -> Maybe Int
    
    >>> mapMaybe readMaybeInt ["1", "Foo", "3"]
    [1,3]
    
    >>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
    [1,3]
    
    If we map the Just constructor, the entire list should be returned:
    >>> mapMaybe Just [1,2,3]
    [1,2,3]
    

  2. mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()

    incipit-base Incipit.Foldable

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.

  3. mapMaybeInput :: (Monoid s, Monoid s') => (s -> Maybe s') -> (s' -> Maybe s) -> Parser t s r -> Parser t s' r

    incremental-parser Text.ParserCombinators.Incremental

    Converts a parser accepting one input type to another, just like 'mapMaybeInput except the two argument functions can demand more input by returning Nothing. If 'mapMaybeInput is defined for the two input inputs, then

    mapInput f g == mapMaybeInput (Just . f) (Just . g)
    

  4. mapMaybeInput :: (Monoid s, Monoid s') => (s -> Maybe s') -> (s' -> Maybe s) -> Parser t s r -> Parser t s' r

    incremental-parser Text.ParserCombinators.Incremental.LeftBiasedLocal

    Converts a parser accepting one input type to another, just like 'mapMaybeInput except the two argument functions can demand more input by returning Nothing. If 'mapMaybeInput is defined for the two input inputs, then

    mapInput f g == mapMaybeInput (Just . f) (Just . g)
    

  5. mapMaybeInput :: (Monoid s, Monoid s') => (s -> Maybe s') -> (s' -> Maybe s) -> Parser t s r -> Parser t s' r

    incremental-parser Text.ParserCombinators.Incremental.Symmetric

    Converts a parser accepting one input type to another, just like 'mapMaybeInput except the two argument functions can demand more input by returning Nothing. If 'mapMaybeInput is defined for the two input inputs, then

    mapInput f g == mapMaybeInput (Just . f) (Just . g)
    

  6. mapMSEnv :: Monad m => (a -> m b) -> SEnv a -> m (SEnv b)

    liquid-fixpoint Language.Fixpoint.Types.Environments

    No documentation available.

  7. mapMExpr :: Monad m => (Expr -> m Expr) -> Expr -> m Expr

    liquid-fixpoint Language.Fixpoint.Types.Visitor

    No documentation available.

  8. mapMLocLHNames :: forall m a . (Data a, Monad m) => (Located LHName -> m (Located LHName)) -> a -> m a

    liquidhaskell-boot Language.Haskell.Liquid.Types.Names

    No documentation available.

  9. mapMeasureTy :: (ty0 -> ty1) -> MeasureV v ty0 ctor -> MeasureV v ty1 ctor

    liquidhaskell-boot Language.Haskell.Liquid.Types.Types

    No documentation available.

  10. mapMeasureV :: (v -> v') -> MeasureV v ty ctor -> MeasureV v' ty ctor

    liquidhaskell-boot Language.Haskell.Liquid.Types.Types

    No documentation available.

Page 47 of many | Previous | Next