Hoogle Search

Within LTS Haskell 24.26 (ghc-9.10.3)

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

  1. mapIndices :: (MArray a e m, Ix i, Ix j) => (i, i) -> (i -> j) -> a j e -> m (a i e)

    array Data.Array.MArray.Safe

    Constructs a new array derived from the original array by applying a function to each of the indices.

  2. mapMArrayM_ :: (MArray a e m, Ix i) => (e -> m b) -> a i e -> m ()

    array Data.Array.MArray.Safe

    Map elements to monadic actions, sequence them left-to-right, and discard the results.

  3. mapArray' :: (a -> b) -> Array a -> Array b

    primitive Data.Primitive.Array

    Strict map over the elements of the array.

  4. mapMaybePrimArray :: (Prim a, Prim b) => (a -> Maybe b) -> PrimArray a -> PrimArray b

    primitive Data.Primitive.PrimArray

    Map over a primitive array, optionally discarding some elements. This has the same behavior as Data.Maybe.mapMaybe.

  5. mapMaybePrimArrayA :: (Applicative f, Prim a, Prim b) => (a -> f (Maybe b)) -> PrimArray a -> f (PrimArray b)

    primitive Data.Primitive.PrimArray

    Map over the primitive array, keeping the elements for which the applicative predicate provides a Just.

  6. mapMaybePrimArrayP :: (PrimMonad m, Prim a, Prim b) => (a -> m (Maybe b)) -> PrimArray a -> m (PrimArray b)

    primitive Data.Primitive.PrimArray

    Map over the primitive array, keeping the elements for which the monadic predicate provides a Just.

  7. mapPrimArray :: (Prim a, Prim b) => (a -> b) -> PrimArray a -> PrimArray b

    primitive Data.Primitive.PrimArray

    Map over the elements of a primitive array.

  8. mapSmallArray' :: (a -> b) -> SmallArray a -> SmallArray b

    primitive Data.Primitive.SmallArray

    Strict map over the elements of the array.

  9. mappedException :: (Exception e, Exception e') => Setter s s e e'

    lens Control.Exception.Lens

    This Setter can be used to purely map over the Exceptions an arbitrary expression might throw; it is a variant of mapException in the same way that mapped is a variant of fmap.

    'mapException' ≡ 'over' 'mappedException'
    
    This view that every Haskell expression can be regarded as carrying a bag of Exceptions is detailed in “A Semantics for Imprecise Exceptions” by Peyton Jones & al. at PLDI ’99. The following maps failed assertions to arithmetic overflow:
    >>> handling _Overflow (\_ -> return "caught") $ assert False (return "uncaught") & mappedException %~ \ (AssertionFailed _) -> Overflow
    "caught"
    

  10. mappedException' :: Exception e' => Setter s s SomeException e'

    lens Control.Exception.Lens

    This is a type restricted version of mappedException, which avoids the type ambiguity in the input Exception when using set. The following maps any exception to arithmetic overflow:

    >>> handling _Overflow (\_ -> return "caught") $ assert False (return "uncaught") & mappedException' .~ Overflow
    "caught"
    

Page 72 of many | Previous | Next