Commit 2ec49343 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Hide any available base and ghc-prim packages from the dep resolver

Previously if the base package was available on hackage then the dep
resolver might try to upgrade it. Unfortunately that's almost
certainly technically impossible at the moment. So now since the dep
resolver does not see these available packages it cannot pick them.
This should fix ticket #174.
parent 62d3a032
......@@ -66,6 +66,10 @@ hideBrokenPackages index =
check p x = assert (p x) x
hideBasePackage :: Package p => PackageIndex p -> PackageIndex p
hideBasePackage = PackageIndex.deletePackageName "base"
. PackageIndex.deletePackageName "ghc-prim"
type DependencyResolver a = OS
-> Arch
-> CompilerId
......@@ -82,7 +86,9 @@ dependencyResolver
-> [UnresolvedDependency]
-> Either [Dependency] (InstallPlan a)
dependencyResolver resolver os arch comp installed available deps =
case resolver os arch comp (hideBrokenPackages installed) available deps of
let installed' = hideBrokenPackages installed
available' = hideBasePackage available
in case resolver os arch comp installed' available' deps of
Left unresolved -> Left unresolved
Right pkgs ->
case os arch comp (PackageIndex.fromList pkgs) of
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment