lens-3.8.7.3: Lenses, Folds and Traversals

Portability | non-portable
Stability | provisional
Maintainer | Edward Kmett <ekmett@gmail.com>
Safe Haskell | Trustworthy

Control.Lens.Internal.Action

Contents

- Actions

Description

Synopsis

- class (Monad m, Gettable f) => Effective m r f | f -> m r where
  - effective :: m r -> f a
  - ineffective :: f a -> m r
- newtype Effect m r a = Effect {
  - getEffect :: m r
  }

## Actions

class (Monad m, Gettable f) => Effective m r f | f -> m r where

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

ineffective :: f a -> m r

Instances

Effective Identity r (Accessor r) |
Monad m => Effective m r (Effect m r) |
Effective m r f => Effective m (Dual r) (Backwards f) |

newtype Effect m r a

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) |
(Apply m, Semigroup r) => Apply (Effect m r) |
Gettable (Effect m r) |
(Monad m, Monoid r) => Monoid (Effect m r a) |
(Apply m, Semigroup r) => Semigroup (Effect m r a) |