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

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

execRWSC i s p = fmap f $ runRWSC i s p
  where f x = let (_, s2, w2) = x in (s2, w2)
