We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a9d6e5 commit 54c9ebdCopy full SHA for 54c9ebd
1 file changed
Control/Monad/Trans/RWS/Lazy.hs
@@ -187,10 +187,10 @@ instance (Monoid w, Monad m) => Applicative (RWST r w s m) where
187
return (f x, s'', w `mappend` w')
188
{-# INLINE (<*>) #-}
189
190
-instance (Monoid w, MonadPlus m) => Alternative (RWST r w s m) where
191
- empty = RWST $ \ _ _ -> mzero
+instance (Monoid w, Alternative m, Monad m) => Alternative (RWST r w s m) where
+ empty = RWST $ \ _ _ -> empty
192
{-# INLINE empty #-}
193
- 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
194
{-# INLINE (<|>) #-}
195
196
instance (Monoid w, Monad m) => Monad (RWST r w s m) where
0 commit comments