[commit: packages/Cabal] ghc-head: Remove Distribution.Client.Compat.Exception (877ef34)
git at git.haskell.org
git
Fri Oct 11 20:33:07 UTC 2013
Repository : ssh://git at git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/packages/Cabal.git/commitdiff/877ef34712255d7c99b36eea4b9c3adfaada6b52
>---------------------------------------------------------------
commit 877ef34712255d7c99b36eea4b9c3adfaada6b52
Author: Ben Millwood <thebenmachine+git at gmail.com>
Date: Sun Sep 15 22:40:38 2013 +0100
Remove Distribution.Client.Compat.Exception
Since GHC 6.12.3 is no longer supported, it's no longer necessary.
(cherry picked from commit 9db7db03bfeda5ceb746300aa41af2b08ac1da65)
>---------------------------------------------------------------
877ef34712255d7c99b36eea4b9c3adfaada6b52
.../Distribution/Client/Compat/Exception.hs | 26 --------------------
.../Distribution/Client/Compat/Semaphore.hs | 4 +--
cabal-install/Distribution/Client/JobControl.hs | 3 +--
cabal-install/cabal-install.cabal | 1 -
4 files changed, 2 insertions(+), 32 deletions(-)
diff --git a/cabal-install/Distribution/Client/Compat/Exception.hs b/cabal-install/Distribution/Client/Compat/Exception.hs
deleted file mode 100644
index 86b271d..0000000
--- a/cabal-install/Distribution/Client/Compat/Exception.hs
+++ /dev/null
@@ -1,26 +0,0 @@
-{-# LANGUAGE CPP #-}
-module Distribution.Client.Compat.Exception (
- mask,
- mask_
- ) where
-
--- We can't move these functions to Distribution.Compat.Exception because the
--- usage of the MIN_VERSION_base macro breaks bootstrapping.
-
-#if MIN_VERSION_base(4,3,0)
--- it's much less of a headache if we re-export the "real" mask and mask_
--- so there's never more than one definition to conflict
-import Control.Exception (mask, mask_)
-#else
-import Control.Exception (block, unblock)
-#endif
-
-#if !MIN_VERSION_base(4,3,0)
--- note: less polymorphic than 'real' mask, to avoid RankNTypes
--- we don't need the full generality where we use it
-mask :: ((IO a -> IO a) -> IO b) -> IO b
-mask handler = block (handler unblock)
-
-mask_ :: IO a -> IO a
-mask_ = block
-#endif
diff --git a/cabal-install/Distribution/Client/Compat/Semaphore.hs b/cabal-install/Distribution/Client/Compat/Semaphore.hs
index 71e4c81..ca0edbe 100644
--- a/cabal-install/Distribution/Client/Compat/Semaphore.hs
+++ b/cabal-install/Distribution/Client/Compat/Semaphore.hs
@@ -9,12 +9,10 @@ module Distribution.Client.Compat.Semaphore
import Control.Concurrent.STM (TVar, atomically, newTVar, readTVar, retry,
writeTVar)
-import Control.Exception (onException)
+import Control.Exception (mask_, onException)
import Control.Monad (join, when)
import Data.Typeable (Typeable)
-import Distribution.Client.Compat.Exception (mask_)
-
-- | 'QSem' is a quantity semaphore in which the resource is aqcuired
-- and released in units of one. It provides guaranteed FIFO ordering
-- for satisfying blocked `waitQSem` calls.
diff --git a/cabal-install/Distribution/Client/JobControl.hs b/cabal-install/Distribution/Client/JobControl.hs
index 4f8229c..a4d227f 100644
--- a/cabal-install/Distribution/Client/JobControl.hs
+++ b/cabal-install/Distribution/Client/JobControl.hs
@@ -28,8 +28,7 @@ module Distribution.Client.JobControl (
import Control.Monad
import Control.Concurrent hiding (QSem, newQSem, waitQSem, signalQSem)
-import Control.Exception (SomeException, bracket_, throw, try)
-import Distribution.Client.Compat.Exception (mask)
+import Control.Exception (SomeException, bracket_, mask, throw, try)
import Distribution.Client.Compat.Semaphore
data JobControl m a = JobControl {
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 6f5f82b..56b1580 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -106,7 +106,6 @@ executable cabal
Distribution.Client.World
Distribution.Client.Win32SelfUpgrade
Distribution.Client.Compat.Environment
- Distribution.Client.Compat.Exception
Distribution.Client.Compat.FilePerms
Distribution.Client.Compat.Semaphore
Distribution.Client.Compat.Time
More information about the ghc-commits
mailing list