From a615989f940a7c8898cfa5672a907586aae9f0a2 Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Sat, 27 Oct 2018 00:27:19 +0530 Subject: [PATCH] Do not fully saturate the type synonyms If we define type Serial a = SerialT IO a, then we cannot use Serial where we need SerialT IO. --- src/Streamly/Streams/Ahead.hs | 2 +- src/Streamly/Streams/Async.hs | 4 ++-- src/Streamly/Streams/Parallel.hs | 2 +- src/Streamly/Streams/Serial.hs | 4 ++-- src/Streamly/Streams/Zip.hs | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Streamly/Streams/Ahead.hs b/src/Streamly/Streams/Ahead.hs index 0a6036980..e7d5fe409 100644 --- a/src/Streamly/Streams/Ahead.hs +++ b/src/Streamly/Streams/Ahead.hs @@ -625,7 +625,7 @@ newtype AheadT m a = AheadT {getAheadT :: Stream m a} -- 'AheadT' documentation for more details. -- -- @since 0.3.0 -type Ahead a = AheadT IO a +type Ahead = AheadT IO -- | Fix the type of a polymorphic stream as 'AheadT'. -- diff --git a/src/Streamly/Streams/Async.hs b/src/Streamly/Streams/Async.hs index d7c79fc5b..8577db96b 100644 --- a/src/Streamly/Streams/Async.hs +++ b/src/Streamly/Streams/Async.hs @@ -641,7 +641,7 @@ newtype AsyncT m a = AsyncT {getAsyncT :: Stream m a} -- type @a@. See 'AsyncT' documentation for more details. -- -- @since 0.2.0 -type Async a = AsyncT IO a +type Async = AsyncT IO -- | Fix the type of a polymorphic stream as 'AsyncT'. -- @@ -768,7 +768,7 @@ newtype WAsyncT m a = WAsyncT {getWAsyncT :: Stream m a} -- See 'WAsyncT' documentation for more details. -- -- @since 0.2.0 -type WAsync a = WAsyncT IO a +type WAsync = WAsyncT IO -- | Fix the type of a polymorphic stream as 'WAsyncT'. -- diff --git a/src/Streamly/Streams/Parallel.hs b/src/Streamly/Streams/Parallel.hs index 326d0d5c6..e99c3a4a6 100644 --- a/src/Streamly/Streams/Parallel.hs +++ b/src/Streamly/Streams/Parallel.hs @@ -331,7 +331,7 @@ newtype ParallelT m a = ParallelT {getParallelT :: Stream m a} -- See 'ParallelT' documentation for more details. -- -- @since 0.2.0 -type Parallel a = ParallelT IO a +type Parallel = ParallelT IO -- | Fix the type of a polymorphic stream as 'ParallelT'. -- diff --git a/src/Streamly/Streams/Serial.hs b/src/Streamly/Streams/Serial.hs index 1f6382dfb..ec7a5baa6 100644 --- a/src/Streamly/Streams/Serial.hs +++ b/src/Streamly/Streams/Serial.hs @@ -127,7 +127,7 @@ newtype SerialT m a = SerialT {getSerialT :: Stream m a} -- for more details. -- -- @since 0.2.0 -type Serial a = SerialT IO a +type Serial = SerialT IO -- | -- @since 0.1.0 @@ -247,7 +247,7 @@ newtype WSerialT m a = WSerialT {getWSerialT :: Stream m a} -- documentation for more details. -- -- @since 0.2.0 -type WSerial a = WSerialT IO a +type WSerial = WSerialT IO -- | -- @since 0.1.0 diff --git a/src/Streamly/Streams/Zip.hs b/src/Streamly/Streams/Zip.hs index b1e0d5b75..1e5ad7c7e 100644 --- a/src/Streamly/Streams/Zip.hs +++ b/src/Streamly/Streams/Zip.hs @@ -82,7 +82,7 @@ type ZipStream = ZipSerialM -- | An IO stream whose applicative instance zips streams serially. -- -- @since 0.2.0 -type ZipSerial a = ZipSerialM IO a +type ZipSerial = ZipSerialM IO -- | Fix the type of a polymorphic stream as 'ZipSerialM'. -- @@ -171,7 +171,7 @@ newtype ZipAsyncM m a = ZipAsyncM {getZipAsyncM :: Stream m a} -- | An IO stream whose applicative instance zips streams wAsyncly. -- -- @since 0.2.0 -type ZipAsync a = ZipAsyncM IO a +type ZipAsync = ZipAsyncM IO -- | Fix the type of a polymorphic stream as 'ZipAsyncM'. --