Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

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

  1. (<%>) :: 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')]
    

  2. ( #%%= ) :: MonadState s m => ALens s s a b -> (a -> (r, b)) -> m r

    diagrams-lib Diagrams.Prelude

    A version of (%%=) that works on ALens.

  3. ( #%%~ ) :: Functor f => ALens s t a b -> (a -> f b) -> s -> f t

    diagrams-lib Diagrams.Prelude

    A version of (%%~) that works on ALens.

    >>> ("hello","world") & _2 #%%~ \x -> (length x, x ++ "!")
    (5,("hello","world!"))
    

  4. ( #%= ) :: MonadState s m => ALens s s a b -> (a -> b) -> m ()

    diagrams-lib Diagrams.Prelude

    A version of (%=) that works on ALens.

  5. ( #%~ ) :: ALens s t a b -> (a -> b) -> s -> t

    diagrams-lib Diagrams.Prelude

    A version of (%~) that works on ALens.

    >>> ("hello","world") & _2 #%~ length
    ("hello",5)
    

  6. (<#%=) :: MonadState s m => ALens s s a b -> (a -> b) -> m b

    diagrams-lib Diagrams.Prelude

    A version of (<%=) that works on ALens.

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

    diagrams-lib Diagrams.Prelude

    A version of (<%~) that works on ALens.

    >>> ("hello","world") & _2 <#%~ length
    (5,("hello",5))
    

  8. (<%=) :: MonadState s m => LensLike ((,) b) s s a b -> (a -> b) -> m b

    diagrams-lib Diagrams.Prelude

    Modify the target of a Lens into your Monad's state by a user supplied function and return the result. When applied to a Traversal, it this will return a monoidal summary of all of the intermediate results. 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
    

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

    diagrams-lib Diagrams.Prelude

    Adjust the target of an IndexedLens returning the intermediate result, or adjust all of the targets of an IndexedTraversal within the current state, and return a monoidal summary of the intermediate results.

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

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

    diagrams-lib Diagrams.Prelude

    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)
    

Page 30 of many | Previous | Next