Help | Examples | About | API | Blog | Hackage | Haskell
Concurrently search more than 6250 packages and more than 585655 functions! (Index generated: Tue, 25 Mar 2014 16:41:17 UTC )
Found 160 functions, 0 packages and 44 completions.
Data.Ratio.(%):: a -> a -> Ratio a
base

Forms the ratio of two integral numbers.

Source
Data.Accessor.(%:):: T r a -> (a -> a) -> StateT r m ()
data-accessor

Infix variant of modify.

Source
Data.Accessor.(%=):: T r a -> a -> StateT r m ()
data-accessor

Infix variant of set.

Source
Control.Lens.Lens.(%%@=):: IndexedLensLike i ((,) r) s s a b -> (i -> a -> (r, b)) -> m r
lens

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

l %%@= f ≡ state (l %%@~ f)
 (%%@=) :: MonadState s m                 => IndexedLens i s s a b      -> (i -> a -> (r, b)) -> s -> m r
 (%%@=) :: (MonadState s m, Monoid r) => IndexedTraversal i s s a b -> (i -> a -> (r, b)) -> s -> m r
Source
Control.Lens.Lens.(%%@~):: IndexedLensLike i f s t a b -> (i -> a -> f b) -> s -> f t
lens

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

(%%@~) ≡ withIndex
 (%%@~) :: Functor f => IndexedLens i s t a b      -> (i -> a -> f b) -> s -> f t
 (%%@~) :: Applicative f => IndexedTraversal i s t a b -> (i -> a -> f b) -> s -> f t

In particular, it is often useful to think of this function as having one of these even more restricted type signatures:

 (%%@~) ::             IndexedLens i s t a b      -> (i -> a -> (r, b)) -> s -> (r, t)
 (%%@~) :: Monoid r => IndexedTraversal i s t a b -> (i -> a -> (r, b)) -> s -> (r, t)
Source
Control.Lens.Lens.(%%=):: Over p ((,) r) s s a b -> p a (r, b) -> m r
lens

Modify the target of a Lens in the current state returning some extra information of type r or modify all targets of a Traversal in the current state, extracting extra information of type r and return a monoidal summary of the changes.

>>> runState (_1 %%= \x -> (f x, g x)) (a,b)
(f a,(g a,b))
 (%%=) ≡ (state .)

It may be useful to think of (%%=), instead, as having either of the following more restricted type signatures:

 (%%=) :: MonadState s m             => Iso s s a b       -> (a -> (r, b)) -> m r
 (%%=) :: MonadState s m             => Lens s s a b      -> (a -> (r, b)) -> m r
 (%%=) :: (MonadState s m, Monoid r) => Traversal s s a b -> (a -> (r, b)) -> m r
Source
Control.Lens.Lens.(%%~):: Optical p q f s t a b -> p a (f b) -> q s (f t)
lens

(%%~) can be used in one of two scenarios:

When applied to a Lens, it can edit the target of the Lens in a structure, extracting a functorial result.

When applied to a Traversal, it can edit the targets of the traversals, extracting an applicative summary of its actions.

For all that the definition of this combinator is just:

 (%%~) ≡ id

It may be beneficial to think about it as if it had these even more restricted types, however:

 (%%~) :: Functor f =>     Iso s t a b       -> (a -> f b) -> s -> f t
 (%%~) :: Functor f =>     Lens s t a b      -> (a -> f b) -> s -> f t
 (%%~) :: Applicative f => Traversal s t a b -> (a -> f b) -> s -> f t

When applied to a Traversal, it can edit the targets of the traversals, extracting a supplemental monoidal summary of its actions, by choosing f = ((,) m)

 (%%~) ::             Iso s t a b       -> (a -> (r, b)) -> s -> (r, t)
 (%%~) ::             Lens s t a b      -> (a -> (r, b)) -> s -> (r, t)
 (%%~) :: Monoid m => Traversal s t a b -> (a -> (m, b)) -> s -> (m, t)
Source
Control.Lens.Operators.(%@=):: AnIndexedSetter i s s a b -> (i -> a -> b) -> m ()
lens

Adjust every target in the current state of an IndexedSetter, IndexedLens or IndexedTraversal with access to the index.

When you do not need access to the index then (%=) is more liberal in what it can accept.

 l %= f ≡ l %@= const f
 (%@=) :: MonadState s m => IndexedSetter i s s a b    -> (i -> a -> b) -> m ()
 (%@=) :: MonadState s m => IndexedLens i s s a b      -> (i -> a -> b) -> m ()
 (%@=) :: MonadState s m => IndexedTraversal i s t a b -> (i -> a -> b) -> m ()
Source
Control.Lens.Operators.(%@~):: AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t
lens

Adjust every target of an IndexedSetter, IndexedLens or IndexedTraversal with access to the index.

 (%@~) ≡ imapOf

When you do not need access to the index then (%@~) is more liberal in what it can accept.

 l %~ f ≡ l %@~ const f
 (%@~) :: IndexedSetter i s t a b    -> (i -> a -> b) -> s -> t
 (%@~) :: IndexedLens i s t a b      -> (i -> a -> b) -> s -> t
 (%@~) :: IndexedTraversal i s t a b -> (i -> a -> b) -> s -> t
Source
Control.Lens.Operators.(%=):: Setting p s s a b -> p a b -> m ()
lens

Map over the target of a Lens or all of the targets of a Setter or Traversal in our monadic state.

>>> execState (do _1 %= f;_2 %= g) (a,b)
(f a,g b)
>>> execState (do both %= f) (a,b)
(f a,f b)
 (%=) :: MonadState s m => Iso' s a       -> (a -> a) -> m ()
 (%=) :: MonadState s m => Lens' s a      -> (a -> a) -> m ()
 (%=) :: MonadState s m => Traversal' s a -> (a -> a) -> m ()
 (%=) :: MonadState s m => Setter' s a    -> (a -> a) -> m ()
 (%=) :: MonadState s m => ASetter s s a b -> (a -> b) -> m ()
Source
Powered by Haskell, HXT, Snap, and
Please send any feedback to hayoo@holumbus.org