Hoogle Search

Within LTS Haskell 24.62 (ghc-9.10.3)

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

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

    mono-traversable Data.Containers

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

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

    mono-traversable Data.Containers

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

  3. mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()

    mono-traversable Data.MonoTraversable.Unprefixed

    Synonym for omapM_

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

    mono-traversable Data.NonNull

    fmap over the underlying container in a NonNull.

  5. mapToDecoder :: (b -> a) -> Codec context any b -> Codec context Void a

    autodocodec Autodocodec

    Map a codec for decoding bs into a decoder for as. This is useful for building discriminatedUnionCodecs.

  6. mapToEncoder :: b -> Codec context b any -> Codec context a ()

    autodocodec Autodocodec

    Wrap up a value of type b with its codec to produce and encoder for as that ignores its input and instead encodes the value b. This is useful for building discriminatedUnionCodecs.

  7. mapCodec :: (Ord k, FromJSONKey k, ToJSONKey k) => JSONCodec v -> JSONCodec (Map k v)

    autodocodec Autodocodec.Codec

    Encode a Map, and decode any Map.

    API Note

    This is a forward-compatible version of MapCodec.
    mapCodec = MapCodec
    

  8. mapToDecoder :: (b -> a) -> Codec context any b -> Codec context Void a

    autodocodec Autodocodec.Codec

    Map a codec for decoding bs into a decoder for as. This is useful for building discriminatedUnionCodecs.

  9. mapToEncoder :: b -> Codec context b any -> Codec context a ()

    autodocodec Autodocodec.Codec

    Wrap up a value of type b with its codec to produce and encoder for as that ignores its input and instead encodes the value b. This is useful for building discriminatedUnionCodecs.

  10. mapBoth :: (a -> c) -> (b -> d) -> Either a b -> Either c d

    either Data.Either.Combinators

    The mapBoth function takes two functions and applies the first if iff the value takes the form Left _ and the second if the value takes the form Right _. Using Data.Bifunctor:

    mapBoth = bimap
    
    Using Control.Arrow:
    mapBoth = (+++)
    
    >>> mapBoth (*2) (*3) (Left 4)
    Left 8
    
    >>> mapBoth (*2) (*3) (Right 4)
    Right 12
    

Page 162 of many | Previous | Next