lens-5.1.1: Lenses, Folds and Traversals
Copyright(C) 2012-2016 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Lens.Internal.Zoom

Contents

Description

 
Synopsis

Zoom

newtype Focusing m s a Source #

Used by Zoom to zoom into StateT.

Constructors

Focusing 

Fields

Instances

Instances details
Monad m => Functor (Focusing m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> Focusing m s a -> Focusing m s b #

(<$) :: a -> Focusing m s b -> Focusing m s a #

(Monad m, Monoid s) => Applicative (Focusing m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> Focusing m s a #

(<*>) :: Focusing m s (a -> b) -> Focusing m s a -> Focusing m s b #

liftA2 :: (a -> b -> c) -> Focusing m s a -> Focusing m s b -> Focusing m s c #

(*>) :: Focusing m s a -> Focusing m s b -> Focusing m s b #

(<*) :: Focusing m s a -> Focusing m s b -> Focusing m s a #

(Monad m, Semigroup s) => Apply (Focusing m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: Focusing m s (a -> b) -> Focusing m s a -> Focusing m s b #

(.>) :: Focusing m s a -> Focusing m s b -> Focusing m s b #

(<.) :: Focusing m s a -> Focusing m s b -> Focusing m s a #

liftF2 :: (a -> b -> c) -> Focusing m s a -> Focusing m s b -> Focusing m s c #

newtype FocusingWith w m s a Source #

Used by Zoom to zoom into RWST.

Constructors

FocusingWith 

Fields

Instances

Instances details
Monad m => Functor (FocusingWith w m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> FocusingWith w m s a -> FocusingWith w m s b #

(<$) :: a -> FocusingWith w m s b -> FocusingWith w m s a #

(Monad m, Monoid s, Monoid w) => Applicative (FocusingWith w m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> FocusingWith w m s a #

(<*>) :: FocusingWith w m s (a -> b) -> FocusingWith w m s a -> FocusingWith w m s b #

liftA2 :: (a -> b -> c) -> FocusingWith w m s a -> FocusingWith w m s b -> FocusingWith w m s c #

(*>) :: FocusingWith w m s a -> FocusingWith w m s b -> FocusingWith w m s b #

(<*) :: FocusingWith w m s a -> FocusingWith w m s b -> FocusingWith w m s a #

(Monad m, Semigroup s, Semigroup w) => Apply (FocusingWith w m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: FocusingWith w m s (a -> b) -> FocusingWith w m s a -> FocusingWith w m s b #

(.>) :: FocusingWith w m s a -> FocusingWith w m s b -> FocusingWith w m s b #

(<.) :: FocusingWith w m s a -> FocusingWith w m s b -> FocusingWith w m s a #

liftF2 :: (a -> b -> c) -> FocusingWith w m s a -> FocusingWith w m s b -> FocusingWith w m s c #

newtype FocusingPlus w k s a Source #

Used by Zoom to zoom into WriterT.

Constructors

FocusingPlus 

Fields

Instances

Instances details
Functor (k (s, w)) => Functor (FocusingPlus w k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> FocusingPlus w k s a -> FocusingPlus w k s b #

(<$) :: a -> FocusingPlus w k s b -> FocusingPlus w k s a #

Applicative (k (s, w)) => Applicative (FocusingPlus w k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> FocusingPlus w k s a #

(<*>) :: FocusingPlus w k s (a -> b) -> FocusingPlus w k s a -> FocusingPlus w k s b #

liftA2 :: (a -> b -> c) -> FocusingPlus w k s a -> FocusingPlus w k s b -> FocusingPlus w k s c #

(*>) :: FocusingPlus w k s a -> FocusingPlus w k s b -> FocusingPlus w k s b #

(<*) :: FocusingPlus w k s a -> FocusingPlus w k s b -> FocusingPlus w k s a #

Apply (k (s, w)) => Apply (FocusingPlus w k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: FocusingPlus w k s (a -> b) -> FocusingPlus w k s a -> FocusingPlus w k s b #

(.>) :: FocusingPlus w k s a -> FocusingPlus w k s b -> FocusingPlus w k s b #

(<.) :: FocusingPlus w k s a -> FocusingPlus w k s b -> FocusingPlus w k s a #

liftF2 :: (a -> b -> c) -> FocusingPlus w k s a -> FocusingPlus w k s b -> FocusingPlus w k s c #

newtype FocusingOn f k s a Source #

Used by Zoom to zoom into MaybeT or ListT.

Constructors

FocusingOn 

Fields

Instances

Instances details
Functor (k (f s)) => Functor (FocusingOn f k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> FocusingOn f k s a -> FocusingOn f k s b #

(<$) :: a -> FocusingOn f k s b -> FocusingOn f k s a #

Applicative (k (f s)) => Applicative (FocusingOn f k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> FocusingOn f k s a #

(<*>) :: FocusingOn f k s (a -> b) -> FocusingOn f k s a -> FocusingOn f k s b #

liftA2 :: (a -> b -> c) -> FocusingOn f k s a -> FocusingOn f k s b -> FocusingOn f k s c #

(*>) :: FocusingOn f k s a -> FocusingOn f k s b -> FocusingOn f k s b #

(<*) :: FocusingOn f k s a -> FocusingOn f k s b -> FocusingOn f k s a #

Apply (k (f s)) => Apply (FocusingOn f k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: FocusingOn f k s (a -> b) -> FocusingOn f k s a -> FocusingOn f k s b #

(.>) :: FocusingOn f k s a -> FocusingOn f k s b -> FocusingOn f k s b #

(<.) :: FocusingOn f k s a -> FocusingOn f k s b -> FocusingOn f k s a #

liftF2 :: (a -> b -> c) -> FocusingOn f k s a -> FocusingOn f k s b -> FocusingOn f k s c #

newtype FocusingMay k s a Source #

Used by Zoom to zoom into ErrorT.

Constructors

FocusingMay 

Fields

Instances

Instances details
Functor (k (May s)) => Functor (FocusingMay k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> FocusingMay k s a -> FocusingMay k s b #

(<$) :: a -> FocusingMay k s b -> FocusingMay k s a #

Applicative (k (May s)) => Applicative (FocusingMay k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> FocusingMay k s a #

(<*>) :: FocusingMay k s (a -> b) -> FocusingMay k s a -> FocusingMay k s b #

liftA2 :: (a -> b -> c) -> FocusingMay k s a -> FocusingMay k s b -> FocusingMay k s c #

(*>) :: FocusingMay k s a -> FocusingMay k s b -> FocusingMay k s b #

(<*) :: FocusingMay k s a -> FocusingMay k s b -> FocusingMay k s a #

Apply (k (May s)) => Apply (FocusingMay k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: FocusingMay k s (a -> b) -> FocusingMay k s a -> FocusingMay k s b #

(.>) :: FocusingMay k s a -> FocusingMay k s b -> FocusingMay k s b #

(<.) :: FocusingMay k s a -> FocusingMay k s b -> FocusingMay k s a #

liftF2 :: (a -> b -> c) -> FocusingMay k s a -> FocusingMay k s b -> FocusingMay k s c #

newtype May a Source #

Make a Monoid out of Maybe for error handling.

Constructors

May 

Fields

Instances

Instances details
Semigroup a => Semigroup (May a) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<>) :: May a -> May a -> May a #

sconcat :: NonEmpty (May a) -> May a #

stimes :: Integral b => b -> May a -> May a #

Monoid a => Monoid (May a) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

mempty :: May a #

mappend :: May a -> May a -> May a #

mconcat :: [May a] -> May a #

newtype FocusingErr e k s a Source #

Used by Zoom to zoom into ErrorT.

Constructors

FocusingErr 

Fields

Instances

Instances details
Functor (k (Err e s)) => Functor (FocusingErr e k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> FocusingErr e k s a -> FocusingErr e k s b #

(<$) :: a -> FocusingErr e k s b -> FocusingErr e k s a #

Applicative (k (Err e s)) => Applicative (FocusingErr e k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> FocusingErr e k s a #

(<*>) :: FocusingErr e k s (a -> b) -> FocusingErr e k s a -> FocusingErr e k s b #

liftA2 :: (a -> b -> c) -> FocusingErr e k s a -> FocusingErr e k s b -> FocusingErr e k s c #

(*>) :: FocusingErr e k s a -> FocusingErr e k s b -> FocusingErr e k s b #

(<*) :: FocusingErr e k s a -> FocusingErr e k s b -> FocusingErr e k s a #

Apply (k (Err e s)) => Apply (FocusingErr e k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: FocusingErr e k s (a -> b) -> FocusingErr e k s a -> FocusingErr e k s b #

(.>) :: FocusingErr e k s a -> FocusingErr e k s b -> FocusingErr e k s b #

(<.) :: FocusingErr e k s a -> FocusingErr e k s b -> FocusingErr e k s a #

liftF2 :: (a -> b -> c) -> FocusingErr e k s a -> FocusingErr e k s b -> FocusingErr e k s c #

newtype Err e a Source #

Make a Monoid out of Either for error handling.

Constructors

Err 

Fields

Instances

Instances details
Semigroup a => Semigroup (Err e a) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<>) :: Err e a -> Err e a -> Err e a #

sconcat :: NonEmpty (Err e a) -> Err e a #

stimes :: Integral b => b -> Err e a -> Err e a #

Monoid a => Monoid (Err e a) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

mempty :: Err e a #

mappend :: Err e a -> Err e a -> Err e a #

mconcat :: [Err e a] -> Err e a #

newtype FocusingFree f m k s a Source #

Used by Zoom to zoom into FreeT

Constructors

FocusingFree 

Fields

Instances

Instances details
Functor (k (Freed f m s)) => Functor (FocusingFree f m k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> FocusingFree f m k s a -> FocusingFree f m k s b #

(<$) :: a -> FocusingFree f m k s b -> FocusingFree f m k s a #

Applicative (k (Freed f m s)) => Applicative (FocusingFree f m k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> FocusingFree f m k s a #

(<*>) :: FocusingFree f m k s (a -> b) -> FocusingFree f m k s a -> FocusingFree f m k s b #

liftA2 :: (a -> b -> c) -> FocusingFree f m k s a -> FocusingFree f m k s b -> FocusingFree f m k s c #

(*>) :: FocusingFree f m k s a -> FocusingFree f m k s b -> FocusingFree f m k s b #

(<*) :: FocusingFree f m k s a -> FocusingFree f m k s b -> FocusingFree f m k s a #

Apply (k (Freed f m s)) => Apply (FocusingFree f m k s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: FocusingFree f m k s (a -> b) -> FocusingFree f m k s a -> FocusingFree f m k s b #

(.>) :: FocusingFree f m k s a -> FocusingFree f m k s b -> FocusingFree f m k s b #

(<.) :: FocusingFree f m k s a -> FocusingFree f m k s b -> FocusingFree f m k s a #

liftF2 :: (a -> b -> c) -> FocusingFree f m k s a -> FocusingFree f m k s b -> FocusingFree f m k s c #

newtype Freed f m a Source #

Make a Monoid out of FreeF for result collection.

Constructors

Freed 

Fields

Instances

Instances details
(Applicative f, Semigroup a, Monad m) => Semigroup (Freed f m a) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<>) :: Freed f m a -> Freed f m a -> Freed f m a #

sconcat :: NonEmpty (Freed f m a) -> Freed f m a #

stimes :: Integral b => b -> Freed f m a -> Freed f m a #

(Applicative f, Monoid a, Monad m) => Monoid (Freed f m a) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

mempty :: Freed f m a #

mappend :: Freed f m a -> Freed f m a -> Freed f m a #

mconcat :: [Freed f m a] -> Freed f m a #

Magnify

newtype Effect m r a Source #

Wrap a monadic effect with a phantom type argument.

Constructors

Effect 

Fields

Instances

Instances details
Functor (Effect m r) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> Effect m r a -> Effect m r b #

(<$) :: a -> Effect m r b -> Effect m r a #

(Monad m, Monoid r) => Applicative (Effect m r) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> Effect m r a #

(<*>) :: Effect m r (a -> b) -> Effect m r a -> Effect m r b #

liftA2 :: (a -> b -> c) -> Effect m r a -> Effect m r b -> Effect m r c #

(*>) :: Effect m r a -> Effect m r b -> Effect m r b #

(<*) :: Effect m r a -> Effect m r b -> Effect m r a #

Contravariant (Effect m r) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

contramap :: (a -> b) -> Effect m r b -> Effect m r a #

(>$) :: b -> Effect m r b -> Effect m r a #

(Apply m, Semigroup r) => Apply (Effect m r) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: Effect m r (a -> b) -> Effect m r a -> Effect m r b #

(.>) :: Effect m r a -> Effect m r b -> Effect m r b #

(<.) :: Effect m r a -> Effect m r b -> Effect m r a #

liftF2 :: (a -> b -> c) -> Effect m r a -> Effect m r b -> Effect m r c #

(Monad m, Semigroup r) => Semigroup (Effect m r a) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<>) :: Effect m r a -> Effect m r a -> Effect m r a #

sconcat :: NonEmpty (Effect m r a) -> Effect m r a #

stimes :: Integral b => b -> Effect m r a -> Effect m r a #

(Monad m, Monoid r) => Monoid (Effect m r a) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

mempty :: Effect m r a #

mappend :: Effect m r a -> Effect m r a -> Effect m r a #

mconcat :: [Effect m r a] -> Effect m r a #

newtype EffectRWS w st m s a Source #

Wrap a monadic effect with a phantom type argument. Used when magnifying RWST.

Constructors

EffectRWS 

Fields

Instances

Instances details
Functor (EffectRWS w st m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

fmap :: (a -> b) -> EffectRWS w st m s a -> EffectRWS w st m s b #

(<$) :: a -> EffectRWS w st m s b -> EffectRWS w st m s a #

(Monoid s, Monoid w, Monad m) => Applicative (EffectRWS w st m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

pure :: a -> EffectRWS w st m s a #

(<*>) :: EffectRWS w st m s (a -> b) -> EffectRWS w st m s a -> EffectRWS w st m s b #

liftA2 :: (a -> b -> c) -> EffectRWS w st m s a -> EffectRWS w st m s b -> EffectRWS w st m s c #

(*>) :: EffectRWS w st m s a -> EffectRWS w st m s b -> EffectRWS w st m s b #

(<*) :: EffectRWS w st m s a -> EffectRWS w st m s b -> EffectRWS w st m s a #

Contravariant (EffectRWS w st m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

contramap :: (a -> b) -> EffectRWS w st m s b -> EffectRWS w st m s a #

(>$) :: b -> EffectRWS w st m s b -> EffectRWS w st m s a #

(Semigroup s, Semigroup w, Bind m) => Apply (EffectRWS w st m s) Source # 
Instance details

Defined in Control.Lens.Internal.Zoom

Methods

(<.>) :: EffectRWS w st m s (a -> b) -> EffectRWS w st m s a -> EffectRWS w st m s b #

(.>) :: EffectRWS w st m s a -> EffectRWS w st m s b -> EffectRWS w st m s b #

(<.) :: EffectRWS w st m s a -> EffectRWS w st m s b -> EffectRWS w st m s a #

liftF2 :: (a -> b -> c) -> EffectRWS w st m s a -> EffectRWS w st m s b -> EffectRWS w st m s c #