Safe Haskell | None |
---|---|
Language | Haskell2010 |
Annotating monads with tags to turn untagged constraints into tagged ones.
import qualified Control.Monad.State as T import Control.Ether.TH (ethereal) import Control.Monad.Ether.State (MonadState) import Control.Ether.Wrapped (ethered) ethereal "Foo" "foo" f :: T.MonadState Int m => m String f = fmap show T.get g :: MonadState Foo Int m => m String g = ethered foo f
- newtype WrappedEther tag m a = WrapEther {
- unwrapEther :: m a
- ethered :: proxy tag -> WrappedEther tag m a -> m a
Documentation
newtype WrappedEther tag m a Source
Wrap a monad to attach a tag to it.
WrapEther | |
|
ethered :: proxy tag -> WrappedEther tag m a -> m a Source
Annotate a polymorphic monadic computation with a tag.