Copyright | (C) 2012-2014 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | non-portable |
Safe Haskell | Trustworthy |
Language | Haskell98 |
- class (Monad m, Functor f, Contravariant 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, 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.
effective :: m r -> f a Source
ineffective :: f a -> m r Source
Wrap a monadic effect with a phantom type argument.