@@ -16,6 +16,34 @@
1616
1717{- |
1818
19+Type-level machinery to manipulate constraints on the monad
20+transformer stack.
21+
22+Out of the box it provides the following dispatch strategies:
23+
24+* 'tagAttach' to use functions defined using untagged monad classes
25+ as if they were defined using tagged ones.
26+
27+* 'tagReplace' to use functions defined using one tag
28+ as if they were defined using another one.
29+
30+> import qualified Control.Monad.State as T
31+> import Control.Ether.TH (ethereal)
32+> import Control.Monad.Ether.State (MonadState)
33+> import Control.Monad.Trans.Ether.Dispatch (tagAttach, tagDispatch)
34+>
35+> ethereal "Foo" "foo"
36+> ethereal "Bar" "bar"
37+>
38+> f :: T.MonadState Int m => m String
39+> f = fmap show T.get
40+>
41+> g :: MonadState Foo Int m => m String
42+> g = tagAttach foo f
43+>
44+> h :: MonadState Bar Int m => m String
45+> h = tagReplace foo bar g
46+
1947-}
2048
2149module Control.Monad.Trans.Ether.Dispatch
@@ -27,9 +55,6 @@ module Control.Monad.Trans.Ether.Dispatch
2755 , K_TagReplace(..)
2856 , tagAttach
2957 , tagReplace
30− -- * Newtype operations
31− , pack
32− , unpack
3358 ) where
3459
3560import Control.Applicative