deprecate SerialT and runSerialT

fixes #22
This commit is contained in:
Harendra Kumar 2018-04-15 13:04:18 +05:30
parent 5c5b2b3ed8
commit 66045e65a1
2 changed files with 15 additions and 0 deletions

View File

@ -70,6 +70,10 @@ module Streamly
, MonadPlus (..)
, MonadIO (..)
, MonadTrans (..)
-- * Deprecated
, runStreamT
, StreamT
)
where

View File

@ -46,6 +46,7 @@ module Streamly.Streams
-- * Stream Styles
, SerialT
, StreamT -- deprecated
, InterleavedT
, AsyncT
, ParallelT
@ -63,6 +64,7 @@ module Streamly.Streams
-- * Running Streams
, runSerialT
, runStreamT -- deprecated
, runInterleavedT
, runAsyncT
, runParallelT
@ -281,6 +283,10 @@ instance Streaming SerialT where
toStream = getSerialT
fromStream = SerialT
-- | Same as SerialT.
{-# Deprecated StreamT "Please use SerialT instead." #-}
type StreamT = SerialT
-- XXX The Functor/Applicative/Num instances for all the types are exactly the
-- same, how can we reduce this boilerplate (use TH)? We cannot derive them
-- from a single base type because they depend on the Monad instance which is
@ -927,6 +933,11 @@ zippingAsync x = x
runSerialT :: Monad m => SerialT m a -> m ()
runSerialT = runStreaming
-- | Same as @runSerialT@.
{-# Deprecated runStreamT "Please use runSerialT instead." #-}
runStreamT :: Monad m => SerialT m a -> m ()
runStreamT = runStreaming
-- | Same as @runStreaming . interleaving@.
runInterleavedT :: Monad m => InterleavedT m a -> m ()
runInterleavedT = runStreaming