Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

  1. mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> InsOrdHashMap k v1 -> InsOrdHashMap k v2

    insert-ordered-containers Data.HashMap.Strict.InsOrd

    No documentation available.

  2. mapWithKey :: (k -> v1 -> v2) -> InsOrdHashMap k v1 -> InsOrdHashMap k v2

    insert-ordered-containers Data.HashMap.Strict.InsOrd

    No documentation available.

  3. mapped :: (Monad m, Functor f) => (forall x . () => f x -> m (g x)) -> Stream f m r -> Stream g m r

    streaming Streaming

    Map layers of one functor to another with a transformation involving the base monad. This function is completely functor-general. It is often useful with the more concrete type

    mapped :: (forall x. Stream (Of a) IO x -> IO (Of b x)) -> Stream (Stream (Of a) IO) IO r -> Stream (Of b) IO r
    
    to process groups which have been demarcated in an effectful, IO-based stream by grouping functions like group, split or breaks. Summary functions like fold, foldM, mconcat or toList are often used to define the transformation argument. For example:
    >>> S.toList_ $ S.mapped S.toList $ S.split 'c' (S.each "abcde")
    ["ab","de"]
    
    maps and mapped obey these rules:
    maps id              = id
    mapped return        = id
    maps f . maps g      = maps (f . g)
    mapped f . mapped g  = mapped (f <=< g)
    maps f . mapped g    = mapped (fmap f . g)
    mapped f . maps g    = mapped (f <=< fmap g)
    
    maps is more fundamental than mapped, which is best understood as a convenience for effecting this frequent composition:
    mapped phi = decompose . maps (Compose . phi)
    

  4. mappedPost :: (Monad m, Functor g) => (forall x . () => f x -> m (g x)) -> Stream f m r -> Stream g m r

    streaming Streaming

    A version of mapped that imposes a Functor constraint on the target functor rather than the source functor. This version should be preferred if fmap on the target functor is cheaper.

  5. maps :: forall (m :: Type -> Type) f g r . (Monad m, Functor f) => (forall x . () => f x -> g x) -> Stream f m r -> Stream g m r

    streaming Streaming

    Map layers of one functor to another with a transformation. Compare hoist, which has a similar effect on the monadic parameter.

    maps id = id
    maps f . maps g = maps (f . g)
    

  6. mapsM :: (Monad m, Functor f) => (forall x . () => f x -> m (g x)) -> Stream f m r -> Stream g m r

    streaming Streaming

    Map layers of one functor to another with a transformation involving the base monad. maps is more fundamental than mapsM, which is best understood as a convenience for effecting this frequent composition:

    mapsM phi = decompose . maps (Compose . phi)
    
    The streaming prelude exports the same function under the better name mapped, which overlaps with the lens libraries.

  7. mapsMPost :: forall m f g r . (Monad m, Functor g) => (forall x . () => f x -> m (g x)) -> Stream f m r -> Stream g m r

    streaming Streaming

    Map layers of one functor to another with a transformation involving the base monad. mapsMPost is essentially the same as mapsM, but it imposes a Functor constraint on its target functor rather than its source functor. It should be preferred if fmap is cheaper for the target functor than for the source functor. mapsPost is more fundamental than mapsMPost, which is best understood as a convenience for effecting this frequent composition:

    mapsMPost phi = decompose . mapsPost (Compose . phi)
    
    The streaming prelude exports the same function under the better name mappedPost, which overlaps with the lens libraries.

  8. mapsM_ :: (Functor f, Monad m) => (forall x . () => f x -> m x) -> Stream f m r -> m r

    streaming Streaming

    Map each layer to an effect, and run them all.

  9. mapsPost :: forall (m :: Type -> Type) f g r . (Monad m, Functor g) => (forall x . () => f x -> g x) -> Stream f m r -> Stream g m r

    streaming Streaming

    Map layers of one functor to another with a transformation. Compare hoist, which has a similar effect on the monadic parameter.

    mapsPost id = id
    mapsPost f . mapsPost g = mapsPost (f . g)
    mapsPost f = maps f
    
    mapsPost is essentially the same as maps, but it imposes a Functor constraint on its target functor rather than its source functor. It should be preferred if fmap is cheaper for the target functor than for the source functor.

  10. maps :: forall (m :: Type -> Type) f g r . (Monad m, Functor f) => (forall x . () => f x -> g x) -> Stream f m r -> Stream g m r

    streaming Streaming.Internal

    Map layers of one functor to another with a transformation. Compare hoist, which has a similar effect on the monadic parameter.

    maps id = id
    maps f . maps g = maps (f . g)
    

Page 140 of many | Previous | Next