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. mapped :: Functor f => ASetter (f a) (f b) a b

    microlens Lens.Micro

    mapped is a setter for everything contained in a functor. You can use it to map over lists, Maybe, or even IO (which is something you can't do with traversed or each). Here mapped is used to turn a value to all non-Nothing values in a list:

    >>> [Just 3,Nothing,Just 5] & mapped.mapped .~ 0
    [Just 0,Nothing,Just 0]
    
    Keep in mind that while mapped is a more powerful setter than each, it can't be used as a getter! This won't work (and will fail with a type error):
    [(1,2),(3,4),(5,6)] ^.. mapped . both
    

  2. mapAsWord128 :: ByteArray bs => (Word128 -> Word128) -> bs -> bs

    memory Data.ByteArray.Mapping

    map blocks of 128 bits of a bytearray, creating a new bytestring of equivalent size where each blocks has been mapped through f no length checking is done. unsafe

  3. mapAsWord64 :: ByteArray bs => (Word64 -> Word64) -> bs -> bs

    memory Data.ByteArray.Mapping

    map blocks of 64 bits of a bytearray, creating a new bytestring of equivalent size where each blocks has been mapped through f no length checking is done. unsafe

  4. mapParseError :: Ord e' => (e -> e') -> ParseError s e -> ParseError s e'

    megaparsec Text.Megaparsec.Error

    Modify the custom data component in a parse error. This could be done via fmap if not for the Ord constraint.

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

    validity Data.Validity

    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.

  6. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]

    extra Control.Monad.Extra

    A version of mapMaybe that works with a monadic predicate.

  7. mapLeft :: (a -> c) -> Either a b -> Either c b

    extra Data.Either.Extra

    The mapLeft function takes a function and applies it to an Either value iff the value takes the form Left _.

    mapLeft show (Left 1) == Left "1"
    mapLeft show (Right True) == Right True
    

  8. mapRight :: (b -> c) -> Either a b -> Either a c

    extra Data.Either.Extra

    The mapRight function takes a function and applies it to an Either value iff the value takes the form Right _.

    mapRight show (Left 1) == Left 1
    mapRight show (Right True) == Right "True"
    

  9. mapLeft :: (a -> c) -> Either a b -> Either c b

    extra Extra

    The mapLeft function takes a function and applies it to an Either value iff the value takes the form Left _.

    mapLeft show (Left 1) == Left "1"
    mapLeft show (Right True) == Right True
    

  10. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]

    extra Extra

    A version of mapMaybe that works with a monadic predicate.

Page 83 of many | Previous | Next