Skip to content

Commit 54c9ebd

Browse files
committed
Lazy
1 parent 4a9d6e5 commit 54c9ebd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Control/Monad/Trans/RWS/Lazy.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ instance (Monoid w, Monad m) => Applicative (RWST r w s m) where
187187
return (f x, s'', w `mappend` w')
188188
{-# INLINE (<*>) #-}
189189

190-
instance (Monoid w, MonadPlus m) => Alternative (RWST r w s m) where
191-
empty = RWST $ \ _ _ -> mzero
190+
instance (Monoid w, Alternative m, Monad m) => Alternative (RWST r w s m) where
191+
empty = RWST $ \ _ _ -> empty
192192
{-# INLINE empty #-}
193-
RWST m <|> RWST n = RWST $ \ r s -> m r s `mplus` n r s
193+
RWST m <|> RWST n = RWST $ \ r s -> m r s <|> n r s
194194
{-# INLINE (<|>) #-}
195195

196196
instance (Monoid w, Monad m) => Monad (RWST r w s m) where

0 commit comments

Comments
 (0)