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