File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ module Control.Monad.Cont.Trans where
5
5
import Prelude
6
6
7
7
import Control.Monad.Trans
8
+ import Control.Monad.Eff.Class
8
9
9
10
-- | The CPS monad transformer.
10
11
-- |
@@ -53,3 +54,6 @@ instance monadContT :: (Monad m) => Monad (ContT r m)
53
54
54
55
instance monadTransContT :: MonadTrans (ContT r ) where
55
56
lift m = ContT (\k -> m >>= k)
57
+
58
+ instance monadEffContT :: (Monad m , MonadEff eff m ) => MonadEff eff (ContT r m ) where
59
+ liftEff = lift <<< liftEff
Original file line number Diff line number Diff line change @@ -33,8 +33,9 @@ module Control.Monad.List.Trans
33
33
import Prelude
34
34
import Control.Alt (Alt )
35
35
import Control.Alternative (Alternative )
36
- import Control.Monad.Trans (MonadTrans )
36
+ import Control.Monad.Trans (MonadTrans , lift )
37
37
import Control.MonadPlus (MonadPlus )
38
+ import Control.Monad.Eff.Class
38
39
import Control.Plus (Plus )
39
40
import Data.Lazy (Lazy (), defer , force )
40
41
import Data.Maybe (Maybe (..), fromMaybe )
@@ -278,3 +279,6 @@ instance plusListT :: (Monad f) => Plus (ListT f) where
278
279
instance alternativeListT :: (Monad f ) => Alternative (ListT f )
279
280
280
281
instance monadPlusListT :: (Monad f ) => MonadPlus (ListT f )
282
+
283
+ instance monadEffListT :: (Monad m , MonadEff eff m ) => MonadEff eff (ListT m ) where
284
+ liftEff = lift <<< liftEff
You can’t perform that action at this time.
0 commit comments