Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix building cabal-install with ghc-6.12 and older

Fall back to using serial rather job control for base < 4.3.
So this means if you build caba-install with ghc-6.12 or older
then the -j flag will do nothing, it'll still run serially.

BTW, if anyone wants to build cabal-install using a Haskell impl
with no support for concurrency then they can use the same trick.
(The serial and parallel job control impls deliberately share the
same interface.)
  • Loading branch information...
commit ce2fc30351579e1b15ae0efa78f758ed0d73c79f 1 parent 7d6b527
@dcoutts dcoutts authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 cabal-install/Distribution/Client/JobControl.hs
5 cabal-install/Distribution/Client/JobControl.hs
@@ -51,6 +51,7 @@ newSerialJobControl = do
collect = join . readChan
newParallelJobControl :: IO (JobControl IO a)
+#if MIN_VERSION_base(4,3,0)
newParallelJobControl = do
resultVar <- newEmptyMVar
return JobControl {
@@ -68,7 +69,9 @@ newParallelJobControl = do
collect :: MVar (Either SomeException a) -> IO a
collect resultVar =
takeMVar resultVar >>= either throw return
+newParallelJobControl = newSerialJobControl
data JobLimit = JobLimit QSem
Please sign in to comment.
Something went wrong with that request. Please try again.