[commit: haddock] 2.17.3.1-spanfix, alexbiehl-patch-1, ghc-8.0, ghc-8.0-facebook, ghc-head, ghc-head1, haddock-quick, headdock-library-1.4.5, ie_avails, issue-303, issue-475, master, pr-filter-maps, pr/cabal-desc, travis, v2.17, v2.17.3, v2.18, wip-located-module-as, wip/D2418, wip/T11080-open-data-kinds, wip/T11430, wip/T12105, wip/T12105-2, wip/T12942, wip/T13163, wip/T3384, wip/embelleshed-rdr, wip/new-tree-one-param, wip/rae, wip/remove-frames, wip/remove-frames1, wip/revert-ttg-2017-11-20, wip/ttg-2017-10-13, wip/ttg-2017-10-31, wip/ttg-2017-11-06, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13: test: Compatibility with Cabal 1.23 (edb3feb)

git at git.haskell.org git at git.haskell.org
Mon Nov 20 20:58:35 UTC 2017


Repository : ssh://git@git.haskell.org/haddock

On branches: 2.17.3.1-spanfix,alexbiehl-patch-1,ghc-8.0,ghc-8.0-facebook,ghc-head,ghc-head1,haddock-quick,headdock-library-1.4.5,ie_avails,issue-303,issue-475,master,pr-filter-maps,pr/cabal-desc,travis,v2.17,v2.17.3,v2.18,wip-located-module-as,wip/D2418,wip/T11080-open-data-kinds,wip/T11430,wip/T12105,wip/T12105-2,wip/T12942,wip/T13163,wip/T3384,wip/embelleshed-rdr,wip/new-tree-one-param,wip/rae,wip/remove-frames,wip/remove-frames1,wip/revert-ttg-2017-11-20,wip/ttg-2017-10-13,wip/ttg-2017-10-31,wip/ttg-2017-11-06,wip/ttg2-2017-11-10,wip/ttg3-2017-11-12,wip/ttg4-constraints-2017-11-13
Link       : http://git.haskell.org/haddock.git/commitdiff/edb3feb49d7d87365abac961368367944d85022d

>---------------------------------------------------------------

commit edb3feb49d7d87365abac961368367944d85022d
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Dec 20 00:59:51 2015 +0100

    test: Compatibility with Cabal 1.23


>---------------------------------------------------------------

edb3feb49d7d87365abac961368367944d85022d
 haddock-test/src/Test/Haddock/Config.hs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/haddock-test/src/Test/Haddock/Config.hs b/haddock-test/src/Test/Haddock/Config.hs
index 8f1f488..cd87817 100644
--- a/haddock-test/src/Test/Haddock/Config.hs
+++ b/haddock-test/src/Test/Haddock/Config.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE RecordWildCards #-}
-
+{-# LANGUAGE CPP #-}
 
 module Test.Haddock.Config
     ( TestPackage(..), CheckConfig(..), DirConfig(..), Config(..)
@@ -218,9 +218,13 @@ baseDependencies ghcPath = do
     -- consequences of unsetting it - but looks like it works (for now).
     unsetEnv "GHC_PACKAGE_PATH"
 
-    (_, _, cfg) <- configure normal (Just ghcPath) Nothing
+    (comp, _, cfg) <- configure normal (Just ghcPath) Nothing
         defaultProgramConfiguration
+#if MIN_VERSION_Cabal(1,23,0)
+    pkgIndex <- getInstalledPackages normal comp [GlobalPackageDB] cfg
+#else
     pkgIndex <- getInstalledPackages normal [GlobalPackageDB] cfg
+#endif
     mapM (getDependency pkgIndex) ["base", "process", "ghc-prim"]
   where
     getDependency pkgIndex name = case ifaces pkgIndex name of



More information about the ghc-commits mailing list