Commits (20)
......@@ -4,15 +4,16 @@
env:
- GHCVER=7.4.2
- GHCVER=7.6.3
- GHCVER=7.8.3
- GHCVER=7.8.4
- GHCVER=7.10.1
- GHCVER=head
# Note: the distinction between `before_install` and `install` is not important.
before_install:
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install cabal-install-1.20 ghc-$GHCVER-prof ghc-$GHCVER-dyn happy
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
- travis_retry sudo apt-get install cabal-install-1.22 ghc-$GHCVER-prof ghc-$GHCVER-dyn happy
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.22/bin:$PATH
install:
- cabal update
......@@ -27,14 +28,16 @@ script:
- mkdir -p ./dist/setup
- cp Setup.hs ./dist/setup/setup.hs
# Should be able to build setup without extra dependencies
- /opt/ghc/$GHCVER/bin/ghc --make -odir ./dist/setup -hidir ./dist/setup -i -i. ./dist/setup/setup.hs -o ./dist/setup/setup -threaded # the command cabal-install would use to build setup
- /opt/ghc/$GHCVER/bin/ghc --make -odir ./dist/setup -hidir ./dist/setup -i -i. ./dist/setup/setup.hs -o ./dist/setup/setup -Wall -Werror -threaded # the command cabal-install would use to build setup
# Need extra dependencies for test suite
- travis_retry git clone -b pr-base48 https://github.com/hvr/ansi-wl-pprint ../ansi-wl-pprint
- cabal install ../ansi-wl-pprint
- cabal install --only-dependencies --enable-tests
- sudo /opt/ghc/$GHCVER/bin/ghc-pkg recache
- /opt/ghc/$GHCVER/bin/ghc-pkg recache --user
- ./dist/setup/setup configure --user --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
- ./dist/setup/setup configure --user --enable-tests --enable-benchmarks --ghc-option=-Werror -v2 # -v2 provides useful information for debugging
- ./dist/setup/setup build # this builds all libraries and executables (including tests/benchmarks)
- ./dist/setup/setup haddock # see #2198
- ./dist/setup/setup test --show-details=streaming
......@@ -56,9 +59,9 @@ script:
# Also build cabal-install.
- cd ../cabal-install
- cabal sandbox init
- cabal sandbox add-source ../Cabal
- cabal sandbox add-source ../Cabal ../ansi-wl-pprint
- cabal install --dependencies-only --enable-tests
- cabal configure --enable-tests
- cabal configure --enable-tests --ghc-option=-Werror
- cabal build
- cabal test
- cabal check
......
name: Cabal
version: 1.22.1.2
version: 1.22.2.0
copyright: 2003-2006, Isaac Jones
2005-2011, Duncan Coutts
license: BSD3
......@@ -319,7 +319,8 @@ test-suite package-tests
filepath,
extensible-exceptions,
bytestring,
regex-posix
regex-posix,
old-time
if !os(windows)
build-depends: unix
ghc-options: -Wall
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Compat.ReadP
......@@ -71,7 +72,10 @@ module Distribution.Compat.ReadP
import Control.Monad( MonadPlus(..), liftM, liftM2, ap )
import Data.Char (isSpace)
import Control.Applicative (Applicative(..), Alternative(empty, (<|>)))
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative (Applicative(..))
#endif
import Control.Applicative (Alternative(empty, (<|>)))
infixr 5 +++, <++
......
......@@ -27,6 +27,7 @@ module Distribution.Package (
-- * Package keys (used for linker symbols and library name)
PackageKey(..),
mkPackageKey,
packageKeyHash,
packageKeyLibraryName,
-- * Package source dependencies
......
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
......@@ -109,7 +110,9 @@ import Distribution.Compat.Binary (Binary)
import Data.Data (Data)
import Data.List (nub, intercalate)
import Data.Maybe (fromMaybe, maybeToList)
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid (Monoid(mempty, mappend))
#endif
import Data.Typeable ( Typeable )
import Control.Monad (MonadPlus(mplus))
import GHC.Generics (Generic)
......
{-# LANGUAGE CPP #-}
-- -fno-warn-deprecations for use of Map.foldWithKey
{-# OPTIONS_GHC -fno-warn-deprecations #-}
-----------------------------------------------------------------------------
......@@ -59,7 +60,9 @@ import Data.Char ( isAlphaNum )
import Data.Maybe ( catMaybes, maybeToList )
import Data.Map ( Map, fromListWith, toList )
import qualified Data.Map as Map
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid
#endif
------------------------------------------------------------------------------
......
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
......@@ -42,10 +43,14 @@ module Distribution.PackageDescription.Parse (
import Data.Char (isSpace)
import Data.Maybe (listToMaybe, isJust)
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid ( Monoid(..) )
#endif
import Data.List (nub, unfoldr, partition, (\\))
import Control.Monad (liftM, foldM, when, unless, ap)
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative (Applicative(..))
#endif
import Control.Arrow (first)
import System.Directory (doesFileExist)
import qualified Data.ByteString.Lazy.Char8 as BS.Char8
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.PackageDescription.PrettyPrint
......@@ -17,7 +18,9 @@ module Distribution.PackageDescription.PrettyPrint (
showGenericPackageDescription,
) where
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid (Monoid(mempty))
#endif
import Distribution.PackageDescription
( Benchmark(..), BenchmarkInterface(..), benchmarkType
, TestSuite(..), TestSuiteInterface(..), testType
......@@ -27,7 +30,7 @@ import Distribution.PackageDescription
Flag(..), PackageDescription(..),
GenericPackageDescription(..))
import Text.PrettyPrint
(hsep, comma, punctuate, parens, char, nest, empty,
(hsep, parens, char, nest, empty,
isEmpty, ($$), (<+>), colon, (<>), text, vcat, ($+$), Doc, render)
import Distribution.Simple.Utils (writeUTF8File)
import Distribution.ParseUtils (showFreeText, FieldDescr(..), indentWith, ppField, ppFields)
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.ParseUtils
......@@ -61,7 +62,9 @@ import Data.Maybe (fromMaybe)
import Data.Tree as Tree (Tree(..), flatten)
import qualified Data.Map as Map
import Control.Monad (foldM, ap)
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative (Applicative(..))
#endif
import System.FilePath (normalise)
import Data.List (sortBy)
......
......@@ -390,7 +390,7 @@ testSuiteLibV09AsLibAndExe pkg_descr
(package pkg) [] []
}
ipkgid = inplacePackageId (packageId pkg)
ipi = inplaceInstalledPackageInfo pwd distPref pkg ipkgid lib lbi libClbi
ipi = inplaceInstalledPackageInfo pwd distPref pkg ipkgid lib lbi' libClbi
testDir = buildDir lbi </> stubName test
</> stubName test ++ "-tmp"
testLibDep = thisPackageVersion $ package pkg
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.BuildTargets
......@@ -55,7 +56,10 @@ import Data.Either
( partitionEithers )
import qualified Data.Map as Map
import Control.Monad
import Control.Applicative (Applicative(..), Alternative(..))
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative (Applicative(..))
#endif
import Control.Applicative (Alternative(..))
import qualified Distribution.Compat.ReadP as Parse
import Distribution.Compat.ReadP
( (+++), (<++) )
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.CCompiler
......@@ -46,8 +47,10 @@ module Distribution.Simple.CCompiler (
filenameCDialect
) where
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid
( Monoid(..) )
#endif
import System.FilePath
( takeExtension )
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Command
......@@ -63,7 +64,9 @@ import Control.Monad
import Data.Char (isAlpha, toLower)
import Data.List (sortBy)
import Data.Maybe
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid
#endif
import qualified Distribution.GetOpt as GetOpt
import Distribution.Text
( Text(disp, parse) )
......
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
......@@ -135,8 +136,10 @@ import Data.Maybe
import Data.Either
( partitionEithers )
import qualified Data.Set as Set
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid
( Monoid(..) )
#endif
import qualified Data.Map as Map
import Data.Map (Map)
import Data.Traversable
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.GHC
......@@ -106,7 +107,9 @@ import Data.Char ( isDigit, isSpace )
import Data.List
import qualified Data.Map as M ( fromList )
import Data.Maybe ( catMaybes )
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid ( Monoid(..) )
#endif
import Data.Version ( showVersion )
import System.Directory
( doesFileExist, getAppUserDataDirectory, createDirectoryIfMissing )
......
......@@ -15,7 +15,7 @@ module Distribution.Simple.GHC.ImplInfo (
) where
import Distribution.Simple.Compiler
( Compiler(..), CompilerId(..), CompilerFlavor(..)
( Compiler(..), CompilerFlavor(..)
, compilerFlavor, compilerVersion, compilerCompatVersion )
import Distribution.Version ( Version(..) )
......
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.GHC.Internal
......@@ -66,7 +67,9 @@ import qualified Data.Map as M
import Data.Char ( isSpace )
import Data.Maybe ( fromMaybe, maybeToList, isJust )
import Control.Monad ( unless, when )
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid ( Monoid(..) )
#endif
import System.Directory ( getDirectoryContents, getTemporaryDirectory )
import System.Environment ( getEnv )
import System.FilePath ( (</>), (<.>), takeExtension, takeDirectory )
......
{-# LANGUAGE CPP #-}
module Distribution.Simple.GHCJS (
configure, getInstalledPackages, getPackageDBContents,
buildLib, buildExe,
......@@ -71,12 +73,13 @@ import Language.Haskell.Extension ( Extension(..)
import Control.Monad ( unless, when )
import Data.Char ( isSpace )
import qualified Data.Map as M ( fromList )
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid ( Monoid(..) )
#endif
import System.Directory ( doesFileExist )
import System.FilePath ( (</>), (<.>), takeExtension,
takeDirectory, replaceExtension,
splitExtension )
import Distribution.Compat.Exception (catchIO)
configure :: Verbosity -> Maybe FilePath -> Maybe FilePath
-> ProgramConfiguration
......
{-# LANGUAGE CPP #-}
module Distribution.Simple.HaskellSuite where
import Control.Monad
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
import Data.Maybe
import Data.Version
import qualified Data.Map as M (empty)
......
......@@ -47,7 +47,9 @@ module Distribution.Simple.InstallDirs (
import Distribution.Compat.Binary (Binary)
import Data.List (isPrefixOf)
import Data.Maybe (fromMaybe)
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid (Monoid(..))
#endif
import GHC.Generics (Generic)
import System.Directory (getAppUserDataDirectory)
import System.FilePath ((</>), isPathSeparator, pathSeparator)
......