lens-4.6: Lenses, Folds and Traversals

Copyright(C) 2012-2014 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell98

Control.Lens.Internal.Action

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.

Methods

effective :: m r -> f a Source

ineffective :: f a -> m r Source

Instances

Effective Identity r (Const r) 
Monad m => Effective m r (Effect m r) 
Effective m r f => Effective m r (AlongsideRight f b) 
Effective m r f => Effective m r (AlongsideLeft f b) 
Effective m r f => Effective m (Dual r) (Backwards f) 

newtype Effect m r a Source

Wrap a monadic effect with a phantom type argument.

Constructors

Effect 

Fields

getEffect :: m r
 

Instances

Monad m => Effective m r (Effect m r) 
Functor (Effect m r) 
(Monad m, Monoid r) => Applicative (Effect m r) 
Contravariant (Effect m r) 
(Apply m, Semigroup r) => Apply (Effect m r) 
(Monad m, Monoid r) => Monoid (Effect m r a) 
(Apply m, Semigroup r) => Semigroup (Effect m r a)