-- | Evaluate 'RWS.RWST' in the base monad
evalRWSC
  :: (Monad m, Monoid t1) =>
     r
     -> t
     -> ConduitM b o (RWS.RWST r t1 t m) ()
     -> ConduitM b o m ((), t1)
evalRWSC i s p = fmap f $ runRWSC i s p
  where f x = let (r, _, w) = x in (r, w)

evalRWSC
  :: (Monad m, Monoid t1) =>
     r
     -> t
     -> ConduitM b o (RWS.RWST r t1 t m) ()
     -> ConduitM b o m ((), t1)
evalRWSC i s p = fmap f $ runRWSC i s p
  where f x = let (r, _, w) = x in (r, w)

evalRWSC i s p = fmap f $ runRWSC i s p
  where f x = let (r, _, w) = x in (r, w)
