Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

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

  1. mapM_CE :: (Monad m, MonoFoldable mono) => (Element mono -> m ()) -> ConduitT mono o m ()

    classy-prelude-yesod ClassyPrelude.Yesod

    Apply the action to all elements in the chunked stream. Note: the same caveat as with mapM_C applies. If you don't want to consume the values, you can use iterM:

    iterM (omapM_ f)
    

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

    classy-prelude-yesod ClassyPrelude.Yesod

    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]
    

  3. mapNonNull :: (Functor f, MonoFoldable (f b)) => (a -> b) -> NonNull (f a) -> NonNull (f b)

    classy-prelude-yesod ClassyPrelude.Yesod

    fmap over the underlying container in a NonNull.

  4. mapOutput :: forall (m :: Type -> Type) o1 o2 i r . Monad m => (o1 -> o2) -> ConduitT i o1 m r -> ConduitT i o2 m r

    classy-prelude-yesod ClassyPrelude.Yesod

    Apply a function to all the output values of a ConduitT. This mimics the behavior of fmap for a Source and Conduit in pre-0.4 days. It can also be simulated by fusing with the map conduit from Data.Conduit.List. Since 0.4.1

  5. mapOutputMaybe :: forall (m :: Type -> Type) o1 o2 i r . Monad m => (o1 -> Maybe o2) -> ConduitT i o1 m r -> ConduitT i o2 m r

    classy-prelude-yesod ClassyPrelude.Yesod

    Same as mapOutput, but use a function that returns Maybe values. Since 0.5.0

  6. mapToJSON :: [(Text, PersistValue)] -> Text

    classy-prelude-yesod ClassyPrelude.Yesod

    Convert map (list of tuples) into textual representation of JSON object. This is a type-constrained synonym for toJsonText.

  7. mapToList :: IsMap map => map -> [(ContainerKey map, MapValue map)]

    classy-prelude-yesod ClassyPrelude.Yesod

    Convert a map to a list of key-value pairs.

  8. mapWhileC :: forall (m :: Type -> Type) a b . Monad m => (a -> Maybe b) -> ConduitT a b m ()

    classy-prelude-yesod ClassyPrelude.Yesod

    Map values as long as the result is Just.

  9. mapWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map) -> map -> map

    classy-prelude-yesod ClassyPrelude.Yesod

    Apply a function over every key-value pair of a map.

  10. mappend :: Monoid a => a -> a -> a

    classy-prelude-yesod ClassyPrelude.Yesod

    An associative operation NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.

Page 378 of many | Previous | Next