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. (<%@~) :: Over (Indexed i) ((,) b) s t a b -> (i -> a -> b) -> s -> (b, t)

    lens Control.Lens.Operators

    Adjust the target of an IndexedLens returning the intermediate result, or adjust all of the targets of an IndexedTraversal and return a monoidal summary along with the answer.

    l <%~ f ≡ l <%@~ const f
    
    When you do not need access to the index then (<%~) is more liberal in what it can accept. If you do not need the intermediate result, you can use (%@~) or even (%~).
    (<%@~) ::             IndexedLens i s t a b      -> (i -> a -> b) -> s -> (b, t)
    (<%@~) :: Monoid b => IndexedTraversal i s t a b -> (i -> a -> b) -> s -> (b, t)
    

  2. (<%~) :: LensLike ((,) b) s t a b -> (a -> b) -> s -> (b, t)

    lens Control.Lens.Operators

    Modify the target of a Lens and return the result. When you do not need the result of the operation, (%~) is more flexible.

    (<%~) ::             Lens s t a b      -> (a -> b) -> s -> (b, t)
    (<%~) ::             Iso s t a b       -> (a -> b) -> s -> (b, t)
    (<%~) :: Monoid b => Traversal s t a b -> (a -> b) -> s -> (b, t)
    

  3. (<<%=) :: (Strong p, MonadState s m) => Over p ((,) a) s s a b -> p a b -> m a

    lens Control.Lens.Operators

    Modify the target of a Lens into your Monad's state by a user supplied function and return the old value that was replaced. When applied to a Traversal, this will return a monoidal summary of all of the old values present. When you do not need the result of the operation, (%=) is more flexible.

    (<<%=) :: MonadState s m             => Lens' s a      -> (a -> a) -> m a
    (<<%=) :: MonadState s m             => Iso' s a       -> (a -> a) -> m a
    (<<%=) :: (MonadState s m, Monoid a) => Traversal' s a -> (a -> a) -> m a
    
    (<<%=) :: MonadState s m => LensLike ((,)a) s s a b -> (a -> b) -> m a
    

  4. (<<%@=) :: MonadState s m => Over (Indexed i) ((,) a) s s a b -> (i -> a -> b) -> m a

    lens Control.Lens.Operators

    Adjust the target of an IndexedLens returning the old value, or adjust all of the targets of an IndexedTraversal within the current state, and return a monoidal summary of the old values.

    (<<%@=) :: MonadState s m                 => IndexedLens i s s a b      -> (i -> a -> b) -> m a
    (<<%@=) :: (MonadState s m, Monoid b) => IndexedTraversal i s s a b -> (i -> a -> b) -> m a
    

  5. (<<%@~) :: Over (Indexed i) ((,) a) s t a b -> (i -> a -> b) -> s -> (a, t)

    lens Control.Lens.Operators

    Adjust the target of an IndexedLens returning the old value, or adjust all of the targets of an IndexedTraversal and return a monoidal summary of the old values along with the answer.

    (<<%@~) ::             IndexedLens i s t a b      -> (i -> a -> b) -> s -> (a, t)
    (<<%@~) :: Monoid a => IndexedTraversal i s t a b -> (i -> a -> b) -> s -> (a, t)
    

  6. (<<%~) :: LensLike ((,) a) s t a b -> (a -> b) -> s -> (a, t)

    lens Control.Lens.Operators

    Modify the target of a Lens, but return the old value. When you do not need the old value, (%~) is more flexible.

    (<<%~) ::             Lens s t a b      -> (a -> b) -> s -> (a, t)
    (<<%~) ::             Iso s t a b       -> (a -> b) -> s -> (a, t)
    (<<%~) :: Monoid a => Traversal s t a b -> (a -> b) -> s -> (a, t)
    

  7. (<%~) :: LensLike ((,) b) s t a b -> (a -> b) -> s -> (b, t)

    microlens Lens.Micro

    This is a version of (%~) which modifies the structure and returns it along with the new value:

    >>> (1, 2) & _1 <%~ negate
    (-1, (-1, 2))
    
    Simpler type signatures:
    (<%~) ::             Lens s t a b      -> (a -> b) -> s -> (b, t)
    (<%~) :: Monoid b => Traversal s t a b -> (a -> b) -> s -> (b, t)
    
    Since it does getting in addition to setting, you can't use it with ASetter (but you can use it with lens and traversals).

  8. (<<%~) :: LensLike ((,) a) s t a b -> (a -> b) -> s -> (a, t)

    microlens Lens.Micro

    This is a version of (%~) which modifies the structure and returns it along with the old value:

    >>> (1, 2) & _1 <<%~ negate
    (1, (-1, 2))
    
    Simpler type signatures:
    (<<%~) ::             Lens s t a b      -> (a -> b) -> s -> (a, t)
    (<<%~) :: Monoid a => Traversal s t a b -> (a -> b) -> s -> (a, t)
    

  9. (<%) :: forall k l m u v a b (js :: IxList) (is :: IxList) s t . (JoinKinds k l m, IxOptic l u v a b, NonEmptyIndices js) => Optic k is s t u v -> Optic l js u v a b -> Optic m is s t a b

    optics-core Optics.Indexed.Core

    Compose two indexed optics and drop indices of the right one. (If you want to compose an indexed and a non-indexed optic, you can just use (%).)

    >>> itoListOf (ifolded <% ifolded) ["foo", "bar"]
    [(0,'f'),(0,'o'),(0,'o'),(1,'b'),(1,'a'),(1,'r')]
    

  10. (<%>) :: forall k l m s t a b (is :: IxList) i (js :: IxList) j u v . (JoinKinds k l m, IxOptic m s t a b, HasSingleIndex is i, HasSingleIndex js j) => Optic k is s t u v -> Optic l js u v a b -> Optic m (WithIx (i, j)) s t a b

    optics-core Optics.Indexed.Core

    Compose two indexed optics. Their indices are composed as a pair.

    >>> itoListOf (ifolded <%> ifolded) ["foo", "bar"]
    [((0,0),'f'),((0,1),'o'),((0,2),'o'),((1,0),'b'),((1,1),'a'),((1,2),'r')]
    

Page 29 of many | Previous | Next