Skip to content

Commit 0b58a9a

Browse files
committed
Strict
1 parent 54c9ebd commit 0b58a9a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Control/Monad/Trans/RWS/Strict.hs

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

194-
instance (Monoid w, MonadPlus m) => Alternative (RWST r w s m) where
195-
empty = RWST $ \ _ _ -> mzero
194+
instance (Monoid w, Alternative m, Monad m) => Alternative (RWST r w s m) where
195+
empty = RWST $ \ _ _ -> empty
196196
{-# INLINE empty #-}
197-
RWST m <|> RWST n = RWST $ \ r s -> m r s `mplus` n r s
197+
RWST m <|> RWST n = RWST $ \ r s -> m r s <|> n r s
198198
{-# INLINE (<|>) #-}
199199

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

0 commit comments

Comments
 (0)