on master help sign in
deprecate SerialT and runSerialT

fixes #22

commit66045e65a1b6e5681ebf4941bd8cafcb01250ce7 authorHarendra Kumar <harendra.kumar@gmail.com> dateSun 15 Apr 2018, 13:04 (9 years ago) parent5c5b2b3
2 files changed+15
src/Streamly.hs+4 src/Streamly/Streams.hs+11
src/Streamly.hs+4
@@ -70,6 +70,10 @@ module Streamly
7070 , MonadPlus (..)
7171 , MonadIO (..)
7272 , MonadTrans (..)
73+
74+ -- * Deprecated
75+ , runStreamT
76+ , StreamT
7377 )
7478where
7579
src/Streamly/Streams.hs+11
@@ -46,6 +46,7 @@ module Streamly.Streams
4646
4747 -- * Stream Styles
4848 , SerialT
49+ , StreamT -- deprecated
4950 , InterleavedT
5051 , AsyncT
5152 , ParallelT
@@ -63,6 +64,7 @@ module Streamly.Streams
6364
6465 -- * Running Streams
6566 , runSerialT
67+ , runStreamT -- deprecated
6668 , runInterleavedT
6769 , runAsyncT
6870 , runParallelT
@@ -281,6 +283,10 @@ instance Streaming SerialT where
281283 toStream = getSerialT
282284 fromStream = SerialT
283285
286+-- | Same as SerialT.
287+{-# Deprecated StreamT "Please use SerialT instead." #-}
288+type StreamT = SerialT
289+
284290-- XXX The Functor/Applicative/Num instances for all the types are exactly the
285291-- same, how can we reduce this boilerplate (use TH)? We cannot derive them
286292-- from a single base type because they depend on the Monad instance which is
@@ -927,6 +933,11 @@ zippingAsync x = x
927933runSerialT :: Monad m => SerialT m a -> m ()
928934runSerialT = runStreaming
929935
936+-- | Same as @runSerialT@.
937+{-# Deprecated runStreamT "Please use runSerialT instead." #-}
938+runStreamT :: Monad m => SerialT m a -> m ()
939+runStreamT = runStreaming
940+
930941-- | Same as @runStreaming . interleaving@.
931942runInterleavedT :: Monad m => InterleavedT m a -> m ()
932943runInterleavedT = runStreaming