File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ import GHC.Conc (STM)
54
54
import qualified Control.Monad.Trans.RWS.Strict as S
55
55
import qualified Control.Monad.Trans.State.Strict as S
56
56
import qualified Control.Monad.Trans.Writer.Strict as S
57
+ import Control.Monad.Trans.Except (ExceptT )
58
+ import qualified Control.Monad.Trans.Except
57
59
58
60
-- | Selective applicative functors. You can think of 'select' as a selective
59
61
-- function application: when given a value of type 'Left' @a@, you __must apply__
@@ -509,6 +511,9 @@ instance Selective (ST s) where select = selectM
509
511
instance Selective STM where select = selectM
510
512
511
513
instance Selective (ContT r m ) where select = selectM
514
+ -- | Note that there is an instance for an isomorphic functor 'Control.Selective.Trans.Except'
515
+ -- which does not need the 'Monad m' constraint.
516
+ instance Monad m => Selective (ExceptT e m ) where select = selectM
512
517
instance Monad m => Selective (MaybeT m ) where select = selectM
513
518
instance (Monoid w , Monad m ) => Selective (RWST r w s m ) where select = selectM
514
519
instance (Monoid w , Monad m ) => Selective (S. RWST r w s m ) where select = selectM
You can’t perform that action at this time.
0 commit comments