Commit 06a79272 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov Committed by GitHub
Browse files

Merge pull request #3846 from haskell/revive-ghc-7.4-support

Revive GHC 7.4 support and revise the GHC compatibility window for the Cabal library
parents df8d036c 593f2e9e
......@@ -13,6 +13,9 @@ matrix:
os: linux
# These don't have -dyn/-prof whitelisted yet, so we have to
# do the old-style installation
- env: GHCVER=7.4.2 SCRIPT=script CABAL_LIB_ONLY=YES
os: linux
sudo: required
- env: GHCVER=7.6.3 SCRIPT=script
os: linux
sudo: required
......
......@@ -17,6 +17,10 @@ module Distribution.Compat.Binary
#endif
) where
#if __GLASGOW_HASKELL__ < 706
import Prelude hiding (catch)
#endif
import Control.Exception (catch, evaluate)
#if __GLASGOW_HASKELL__ >= 711
import Control.Exception (pattern ErrorCall)
......
......@@ -51,6 +51,13 @@ getEnvironment = fmap upcaseVars System.getEnvironment
getEnvironment = System.getEnvironment
#endif
#if __GLASGOW_HASKELL__ < 706
-- | @lookupEnv var@ returns the value of the environment variable @var@, or
-- @Nothing@ if there is no such value.
lookupEnv :: String -> IO (Maybe String)
lookupEnv name = (Just `fmap` System.getEnv name) `catchIO` const (return Nothing)
#endif /* __GLASGOW_HASKELL__ < 706 */
-- | @setEnv name value@ sets the specified environment variable to @value@.
--
-- Throws `Control.Exception.IOException` if either @name@ or @value@ is the
......
......@@ -2,8 +2,8 @@
1.25.x.x (current development version)
* Dropped support for versions of GHC earlier than 6.12 (#3111).
* Cabal/cabal-install can no longer be compiled by versions of GHC
earlier than 7.6 (#3833).
* GHC compatibility window for the Cabal library has been extended
to five years (#3838).
* Convenience/internal libraries are now supported (#269).
An internal library is declared using the stanza "library
'libname'". Packages which use internal libraries can
......
......@@ -152,15 +152,16 @@ Conventions
support window, except Template Haskell, which would cause
bootstrapping problems in the GHC compilation process.
* Our GHC support window is three years: that is, the Cabal library
must be buildable out-of-the-box with the dependencies that shipped
with GHC for at least three years. The Travis CI checks this, so
most developers submit a PR to see if their code works on all
these versions of Haskell. cabal-install must also be buildable
on all these GHCs, although it does not have to be buildable
* Our GHC support window is five years for the Cabal library and three
years for cabal-install: that is, the Cabal library must be
buildable out-of-the-box with the dependencies that shipped with GHC
for at least five years. The Travis CI checks this, so most
developers submit a PR to see if their code works on all these
versions of GHC. cabal-install must also be buildable on all
supported GHCs, although it does not have to be buildable
out-of-the-box. Instead, the `cabal-install/bootstrap.sh` script
must be able to download and install all of the dependencies.
(This is also checked by CI!)
must be able to download and install all of the dependencies. (This
is also checked by CI!)
* `Cabal` has its own Prelude, in `Distribution.Compat.Prelude`,
that provides a compatibility layer and exports some commonly
......
......@@ -73,6 +73,10 @@ timed cabal new-build Cabal Cabal:package-tests Cabal:unit-tests
unset CABAL_BUILDDIR
if [ "x$CABAL_LIB_ONLY" = "xYES" ]; then
exit 0;
fi
# ---------------------------------------------------------------------
# cabal-install
# ---------------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment