Control.Lens.Action.Internal

Contents

Description

Synopsis

## Actions

class (Monad m, Functor f, Contravariant f) => Effective m r f | f -> m r where Source #

An Effective Functor ignores its argument and is isomorphic to a Monad wrapped around a value.

That said, the Monad is possibly rather unrelated to any Applicative structure.

Minimal complete definition

Methods

effective :: m r -> f a Source #

ineffective :: f a -> m r Source #

Instances

 Monad m => Effective m r (Effect m r) Source # Methodseffective :: m r -> Effect m r a Source #ineffective :: Effect m r a -> m r Source # Effective m r f => Effective m r (AlongsideRight f b) Source # Methodseffective :: m r -> AlongsideRight f b a Source #ineffective :: AlongsideRight f b a -> m r Source # Effective m r f => Effective m r (AlongsideLeft f b) Source # Methodseffective :: m r -> AlongsideLeft f b a Source #ineffective :: AlongsideLeft f b a -> m r Source # Source # Methodseffective :: Identity r -> Const * r a Source #ineffective :: Const * r a -> Identity r Source # Effective m r f => Effective m (Dual r) (Backwards * f) Source # Methodseffective :: m (Dual r) -> Backwards * f a Source #ineffective :: Backwards * f a -> m (Dual r) Source #

newtype Effect m r a Source #

Wrap a monadic effect with a phantom type argument.

Constructors

 Effect FieldsgetEffect :: m r

Instances

 Monad m => Effective m r (Effect m r) Source # Methodseffective :: m r -> Effect m r a Source #ineffective :: Effect m r a -> m r Source # Functor (Effect m r) Source # Methodsfmap :: (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 # Methodspure :: 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 # Methodscontramap :: (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 # 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 # (Apply m, Semigroup r) => Semigroup (Effect m r a) Source # 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 # (Apply m, Monad m, Monoid r) => Monoid (Effect m r a) Source # Methodsmempty :: 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 #