Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

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

  1. iforMOf :: (Indexed i a (WrappedMonad m b) -> s -> WrappedMonad m t) -> s -> (i -> a -> m b) -> m t

    lens Control.Lens.Combinators

    Map each element of a structure targeted by a Lens to a monadic action, evaluate these actions from left to right, and collect the results, with access its position (and the arguments flipped).

    forMOf l a ≡ iforMOf l a . const
    iforMOfflip . imapMOf
    
    iforMOf :: Monad m => IndexedLens i s t a b      -> s -> (i -> a -> m b) -> m t
    iforMOf :: Monad m => IndexedTraversal i s t a b -> s -> (i -> a -> m b) -> m t
    

  2. iforMOf_ :: Monad m => IndexedGetting i (Sequenced r m) s a -> s -> (i -> a -> m r) -> m ()

    lens Control.Lens.Combinators

    Run monadic actions for each target of an IndexedFold or IndexedTraversal with access to the index, discarding the results (with the arguments flipped).

    iforMOf_flip . imapMOf_
    
    When you don't need access to the index then forMOf_ is more flexible in what it accepts.
    forMOf_ l a ≡ iforMOf l a . const
    
    iforMOf_ :: Monad m => IndexedGetter i s a     -> s -> (i -> a -> m r) -> m ()
    iforMOf_ :: Monad m => IndexedFold i s a       -> s -> (i -> a -> m r) -> m ()
    iforMOf_ :: Monad m => IndexedLens' i s a      -> s -> (i -> a -> m r) -> m ()
    iforMOf_ :: Monad m => IndexedTraversal' i s a -> s -> (i -> a -> m r) -> m ()
    

  3. iforM_ :: (FoldableWithIndex i t, Monad m) => t a -> (i -> a -> m b) -> m ()

    lens Control.Lens.Combinators

    Run monadic actions for each target of an IndexedFold or IndexedTraversal with access to the index, discarding the results (with the arguments flipped).

    iforM_flip imapM_
    
    When you don't need access to the index then forM_ is more flexible in what it accepts.
    forM_ a ≡ iforM a . const
    

  4. iforOf :: (Indexed i a (f b) -> s -> f t) -> s -> (i -> a -> f b) -> f t

    lens Control.Lens.Combinators

    Traverse with an index (and the arguments flipped).

    forOf l a ≡ iforOf l a . const
    iforOfflip . itraverseOf
    
    iforOf :: Functor f     => IndexedLens i s t a b       -> s -> (i -> a -> f b) -> f t
    iforOf :: Applicative f => IndexedTraversal i s t a b  -> s -> (i -> a -> f b) -> f t
    iforOf :: Apply f       => IndexedTraversal1 i s t a b -> s -> (i -> a -> f b) -> f t
    

  5. iforOf_ :: Functor f => IndexedGetting i (Traversed r f) s a -> s -> (i -> a -> f r) -> f ()

    lens Control.Lens.Combinators

    Traverse the targets of an IndexedFold or IndexedTraversal with access to the index, discarding the results (with the arguments flipped).

    iforOf_flip . itraverseOf_
    
    When you don't need access to the index then forOf_ is more flexible in what it accepts.
    forOf_ l a ≡ iforOf_ l a . const
    
    iforOf_ :: Functor f     => IndexedGetter i s a     -> s -> (i -> a -> f r) -> f ()
    iforOf_ :: Applicative f => IndexedFold i s a       -> s -> (i -> a -> f r) -> f ()
    iforOf_ :: Functor f     => IndexedLens' i s a      -> s -> (i -> a -> f r) -> f ()
    iforOf_ :: Applicative f => IndexedTraversal' i s a -> s -> (i -> a -> f r) -> f ()
    

  6. ifor_ :: (FoldableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f ()

    lens Control.Lens.Combinators

    Traverse elements with access to the index i, discarding the results (with the arguments flipped).

    ifor_flip itraverse_
    
    When you don't need access to the index then for_ is more flexible in what it accepts.
    for_ a ≡ ifor_ a . const
    

  7. lensRulesFor :: [(String, String)] -> LensRules

    lens Control.Lens.Combinators

    Construct a LensRules value for generating top-level definitions using the given map from field names to definition names.

  8. makeClassyFor :: String -> String -> [(String, String)] -> Name -> DecsQ

    lens Control.Lens.Combinators

    Derive lenses and traversals, using a named wrapper class, and specifying explicit pairings of (fieldName, traversalName). Example usage:

    makeClassyFor "HasFoo" "foo" [("_foo", "fooLens"), ("bar", "lbar")] ''Foo
    

  9. makeLensesFor :: [(String, String)] -> Name -> DecsQ

    lens Control.Lens.Combinators

    Derive lenses and traversals, specifying explicit pairings of (fieldName, lensName). If you map multiple names to the same label, and it is present in the same constructor then this will generate a Traversal. e.g.

    makeLensesFor [("_foo", "fooLens"), ("baz", "lbaz")] ''Foo
    makeLensesFor [("_barX", "bar"), ("_barY", "bar")] ''Bar
    

  10. transform :: Plated a => (a -> a) -> a -> a

    lens Control.Lens.Combinators

    Transform every element in the tree, in a bottom-up manner. For example, replacing negative literals with literals:

    negLits = transform $ \x -> case x of
    Neg (Lit i) -> Lit (negate i)
    _           -> x
    

Page 415 of many | Previous | Next