Resolving dependencies... cabal: Entering directory '/tmp/cabal-tmp-4880/cabalvchk-0.3' Configuring cabalvchk-0.3... Building cabalvchk-0.3... Preprocessing executable 'cabalvchk' for cabalvchk-0.3... [1 of 1] Compiling Main ( ghcpkgchk.hs, dist/build/cabalvchk/cabalvchk-tmp/Main.o ) ghcpkgchk.hs:46:13: error: • Couldn't match expected type ‘IO (Distribution.Simple.PackageIndex.PackageIndex InstalledPackageInfo)’ with actual type ‘Distribution.Simple.Program.ProgramConfiguration -> IO Distribution.Simple.PackageIndex.InstalledPackageIndex’ • Probable cause: ‘getInstalledPackages’ is applied to too few arguments In a stmt of a 'do' block: pkgIdx <- getInstalledPackages normal [GlobalPackageDB, UserPackageDB] pconfig In the expression: do { pconfig <- configureAllKnownPrograms normal defaultProgramConfiguration; pkgIdx <- getInstalledPackages normal [GlobalPackageDB, UserPackageDB] pconfig; pkgInf <- return . lookupPackageName pkgIdx $ PackageName p; return . map fst $ filter visible pkgInf } In an equation for ‘getInstalledPkgVersion’: getInstalledPkgVersion p = do { pconfig <- configureAllKnownPrograms normal defaultProgramConfiguration; pkgIdx <- getInstalledPackages normal [GlobalPackageDB, ....] pconfig; pkgInf <- return . lookupPackageName pkgIdx $ PackageName p; .... } where visible = not . null . filter exposed . snd ghcpkgchk.hs:46:41: error: • Couldn't match expected type ‘Distribution.Simple.Compiler.Compiler’ with actual type ‘[PackageDB]’ • In the second argument of ‘getInstalledPackages’, namely ‘[GlobalPackageDB, UserPackageDB]’ In a stmt of a 'do' block: pkgIdx <- getInstalledPackages normal [GlobalPackageDB, UserPackageDB] pconfig In the expression: do { pconfig <- configureAllKnownPrograms normal defaultProgramConfiguration; pkgIdx <- getInstalledPackages normal [GlobalPackageDB, UserPackageDB] pconfig; pkgInf <- return . lookupPackageName pkgIdx $ PackageName p; return . map fst $ filter visible pkgInf } ghcpkgchk.hs:46:74: error: • Couldn't match type ‘Distribution.Simple.Program.Db.ProgramDb’ with ‘[PackageDB]’ Expected type: Distribution.Simple.Compiler.PackageDBStack Actual type: Distribution.Simple.Program.Db.ProgramDb • In the third argument of ‘getInstalledPackages’, namely ‘pconfig’ In a stmt of a 'do' block: pkgIdx <- getInstalledPackages normal [GlobalPackageDB, UserPackageDB] pconfig In the expression: do { pconfig <- configureAllKnownPrograms normal defaultProgramConfiguration; pkgIdx <- getInstalledPackages normal [GlobalPackageDB, UserPackageDB] pconfig; pkgInf <- return . lookupPackageName pkgIdx $ PackageName p; return . map fst $ filter visible pkgInf } cabal: Leaving directory '/tmp/cabal-tmp-4880/cabalvchk-0.3' Failed to install cabalvchk-0.3 cabal: Error: some packages failed to install: cabalvchk-0.3 failed during the building phase. The exception was: ExitFailure 1