trek-lens-0.0.1.0

Safe HaskellNone
LanguageHaskell2010

Trek.Lens

Synopsis

Documentation

selecting :: Monad m => Fold s a -> TrekT s m a Source #

Optical version of 'select'/'selectEach'. Iterates over all result(s) of the provided optic in the structure. Accepts a Getter, Traversal, Prism, Iso or Fold.

mounting :: Monad m => Fold t s -> TrekT s m a -> TrekT t m a Source #

Allows sequencing a tuple or list of Trek blocks into the values that they return. selectAll :: Monad m => Each x y (TrekT s m b) b => x -> TrekT s m y selectAll = sequenceAOf each

The optical version of 'mount'/'mountEach'. Runs a TrekT block over each focus of the provided optic. All state updates are discarded.

focusing :: forall s t m a. Monad m => Traversal' s t -> TrekT t m a -> TrekT s m a infixr 4 Source #

Run a TrekT block over a subset of your state. Unlike using, updates to the state are KEPT.

(%>) :: forall m s t a. Monad m => Traversal' s t -> TrekT t m a -> TrekT s m a infixr 4 Source #

Zoom a trek through a traversal