We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54c9ebd commit 0b58a9aCopy full SHA for 0b58a9a
1 file changed
Control/Monad/Trans/RWS/Strict.hs
@@ -191,10 +191,10 @@ instance (Monoid w, Monad m) => Applicative (RWST r w s m) where
191
return (f x, s'', w `mappend` w')
192
{-# INLINE (<*>) #-}
193
194
-instance (Monoid w, MonadPlus m) => Alternative (RWST r w s m) where
195
- empty = RWST $ \ _ _ -> mzero
+instance (Monoid w, Alternative m, Monad m) => Alternative (RWST r w s m) where
+ empty = RWST $ \ _ _ -> empty
196
{-# INLINE empty #-}
197
- RWST m <|> RWST n = RWST $ \ r s -> m r s `mplus` n r s
+ RWST m <|> RWST n = RWST $ \ r s -> m r s <|> n r s
198
{-# INLINE (<|>) #-}
199
200
instance (Monoid w, Monad m) => Monad (RWST r w s m) where
0 commit comments