summaryrefslogtreecommitdiff
path: root/libraries/base/Control/Concurrent
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-03-07 20:42:21 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2015-03-07 20:45:44 +0100
commit47b5b5c2b2c92ba091313c36489588edadceaa9d (patch)
treedbfae91089f8812d537bb75a48cb08e518274990 /libraries/base/Control/Concurrent
parent68d4f47212633d101c5f4963dbfccf0fb9a8580f (diff)
downloadhaskell-47b5b5c2b2c92ba091313c36489588edadceaa9d.tar.gz
base: drop redundant Typeable derivings
Thanks to #9858 `Typeable` doesn't need to be explicitly derived anymore. This also makes `AutoDeriveTypeable` redundant, as well as some imports of `Typeable` (removal of whose may be beneficial to #9707). This commit removes several such now redundant use-sites in `base`. Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D712
Diffstat (limited to 'libraries/base/Control/Concurrent')
-rw-r--r--libraries/base/Control/Concurrent/Chan.hs5
-rw-r--r--libraries/base/Control/Concurrent/QSem.hs2
-rw-r--r--libraries/base/Control/Concurrent/QSemN.hs4
3 files changed, 4 insertions, 7 deletions
diff --git a/libraries/base/Control/Concurrent/Chan.hs b/libraries/base/Control/Concurrent/Chan.hs
index 487187503d..f5785f5a65 100644
--- a/libraries/base/Control/Concurrent/Chan.hs
+++ b/libraries/base/Control/Concurrent/Chan.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
-{-# LANGUAGE AutoDeriveTypeable, StandaloneDeriving #-}
+{-# LANGUAGE StandaloneDeriving #-}
-----------------------------------------------------------------------------
-- |
@@ -37,7 +37,6 @@ module Control.Concurrent.Chan
import System.IO.Unsafe ( unsafeInterleaveIO )
import Control.Concurrent.MVar
import Control.Exception (mask_)
-import Data.Typeable
#define _UPK_(x) {-# UNPACK #-} !(x)
@@ -49,7 +48,7 @@ import Data.Typeable
data Chan a
= Chan _UPK_(MVar (Stream a))
_UPK_(MVar (Stream a)) -- Invariant: the Stream a is always an empty MVar
- deriving (Eq,Typeable)
+ deriving (Eq)
type Stream a = MVar (ChItem a)
diff --git a/libraries/base/Control/Concurrent/QSem.hs b/libraries/base/Control/Concurrent/QSem.hs
index e20c737fdb..51624e4777 100644
--- a/libraries/base/Control/Concurrent/QSem.hs
+++ b/libraries/base/Control/Concurrent/QSem.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE Safe #-}
-{-# LANGUAGE AutoDeriveTypeable, BangPatterns #-}
+{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/Control/Concurrent/QSemN.hs b/libraries/base/Control/Concurrent/QSemN.hs
index bd520cf40d..7686d3f327 100644
--- a/libraries/base/Control/Concurrent/QSemN.hs
+++ b/libraries/base/Control/Concurrent/QSemN.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE Safe #-}
-{-# LANGUAGE AutoDeriveTypeable, BangPatterns #-}
+{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-----------------------------------------------------------------------------
@@ -28,7 +28,6 @@ module Control.Concurrent.QSemN
import Control.Concurrent.MVar ( MVar, newEmptyMVar, takeMVar, tryTakeMVar
, putMVar, newMVar
, tryPutMVar, isEmptyMVar)
-import Data.Typeable
import Control.Exception
import Data.Maybe
@@ -43,7 +42,6 @@ import Data.Maybe
-- is safe; it never loses any of the resource.
--
data QSemN = QSemN !(MVar (Int, [(Int, MVar ())], [(Int, MVar ())]))
- deriving Typeable
-- The semaphore state (i, xs, ys):
--