Resolving dependencies... Configuring mtl-2.2.1... Configuring primitive-0.6.1.0... Building mtl-2.2.1... Building primitive-0.6.1.0... Installed mtl-2.2.1 Configuring random-1.1... Configuring text-1.2.2.1... Installed primitive-0.6.1.0 Building random-1.1... Building text-1.2.2.1... Configuring utf8-string-1.0.1.1... Installed random-1.1 Building utf8-string-1.0.1.1... Installed utf8-string-1.0.1.1 Configuring vector-0.11.0.0... Building vector-0.11.0.0... Installed text-1.2.2.1 Configuring hashable-1.2.4.0... Building hashable-1.2.4.0... Installed hashable-1.2.4.0 Installed vector-0.11.0.0 Configuring hashtables-1.2.1.0... Building hashtables-1.2.1.0... Installed hashtables-1.2.1.0 Configuring gtk2hs-buildtools-0.13.2.1... Building gtk2hs-buildtools-0.13.2.1... Installed gtk2hs-buildtools-0.13.2.1 Configuring cairo-0.13.3.1... Configuring glib-0.13.4.1... Building glib-0.13.4.1... Building cairo-0.13.3.1... Installed cairo-0.13.3.1 Installed glib-0.13.4.1 Configuring pango-0.13.1.1... Failed to install pango-0.13.1.1 Build log ( /home/builder/.cabal/logs/pango-0.13.1.1.log ): cabal: Entering directory '/tmp/cabal-tmp-7525/pango-0.13.1.1' cabal: Leaving directory '/tmp/cabal-tmp-7525/pango-0.13.1.1' cabal: Error: some packages failed to install: pango-0.13.1.1 failed during the configure step. The exception was: user error ('/opt/ghc/8.0.2/bin/ghc' exited with an error: /tmp/cabal-tmp-7525/pango-0.13.1.1/SetupWrapper.hs:86:16: error: • Couldn't match expected type ‘IO (PackageIndex.PackageIndex a0)’ with actual type ‘ProgramConfiguration -> IO PackageIndex.InstalledPackageIndex’ • Probable cause: ‘getInstalledPackages’ is applied to too few arguments In a stmt of a 'do' block: index <- getInstalledPackages verbosity usePackageDB conf In the expression: do { index <- getInstalledPackages verbosity usePackageDB conf; let cabalDep = Dependency (PackageName "Cabal") (orLaterVersion useCabalVersion); case PackageIndex.lookupDependency index cabalDep of { [] -> die $ "The package requires Cabal library version " ++ display useCabalVersion ++ " but no suitable version is installed." pkgs -> return $ bestVersion (map fst pkgs) } } In an equation for ‘installedCabalVersion’: installedCabalVersion comp conf = do { index <- getInstalledPackages verbosity usePackageDB conf; let cabalDep = ...; case PackageIndex.lookupDependency index cabalDep of { [] -> die $ "The package requires Cabal library version " ++ display useCabalVersion ++ " but no suitable version is installed." pkgs -> return $ bestVersion (map fst pkgs) } } where bestVersion = maximumBy (comparing preference) preference version = (sameVersion, sameMajorVersion, stableVersion, latestVersion) where sameVersion = version == cabalVersion sameMajorVersion = majorVersion version == majorVersion cabalVersion .... /tmp/cabal-tmp-7525/pango-0.13.1.1/SetupWrapper.hs:86:47: error: • Couldn't match expected type ‘Compiler’ with actual type ‘[PackageDB]’ • In the second argument of ‘getInstalledPackages’, namely ‘usePackageDB’ In a stmt of a 'do' block: index <- getInstalledPackages verbosity usePackageDB conf In the expression: do { index <- getInstalledPackages verbosity usePackageDB conf; let cabalDep = Dependency (PackageName "Cabal") (orLaterVersion useCabalVersion); case PackageIndex.lookupDependency index cabalDep of { [] -> die $ "The package requires Cabal library version " ++ display useCabalVersion ++ " but no suitable version is installed." pkgs -> return $ bestVersion (map fst pkgs) } } /tmp/cabal-tmp-7525/pango-0.13.1.1/SetupWrapper.hs:120:54: error: • Couldn't match type ‘Distribution.Simple.Program.Db.ProgramDb’ with ‘[PackageDB]’ Expected type: PackageDBStack Actual type: ProgramConfiguration • In the second argument of ‘cabalLibVersionToUse’, namely ‘conf’ In a stmt of a 'do' block: cabalLibVersion <- cabalLibVersionToUse comp conf In the second argument of ‘($)’, namely ‘do { debug verbosity "Setup script is out of date, compiling..."; (comp, _, conf) <- configCompilerEx (Just GHC) Nothing Nothing defaultProgramConfiguration verbosity; cabalLibVersion <- cabalLibVersionToUse comp conf; let cabalPkgid = PackageIdentifier (PackageName "Cabal") cabalLibVersion; .... }’ )