We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 477fe02 commit e09ecc5Copy full SHA for e09ecc5
src/Control/Monad/Except/Trans.purs
@@ -6,6 +6,7 @@ import Prelude
6
import Control.Alt (Alt)
7
import Control.Alternative (Alternative)
8
import Control.Monad.Rec.Class (MonadRec, tailRecM)
9
+import Control.Monad.Eff.Class (MonadEff, liftEff)
10
import Control.Monad.Trans
11
import Control.MonadPlus (MonadPlus)
12
import Control.Plus (Plus)
@@ -82,6 +83,9 @@ instance monadTransExceptT :: MonadTrans (ExceptT e) where
82
83
a <- m
84
return $ Right a
85
86
+instance monadEffExceptT :: (Monad m, MonadEff eff m) => MonadEff eff (ExceptT e m) where
87
+ liftEff = lift <<< liftEff
88
+
89
-- | Throw an exception in an `ExceptT` computation.
90
throwE :: forall e m a. (Applicative m) => e -> ExceptT e m a
91
throwE = ExceptT <<< pure <<< Left
0 commit comments