From 47b5b5c2b2c92ba091313c36489588edadceaa9d Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sat, 7 Mar 2015 20:42:21 +0100 Subject: 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 --- libraries/base/Control/Concurrent/Chan.hs | 5 ++--- libraries/base/Control/Concurrent/QSem.hs | 2 +- libraries/base/Control/Concurrent/QSemN.hs | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'libraries/base/Control/Concurrent') 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): -- -- cgit v1.2.1