Commit d9ade6b8 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Small refactoring for readability.

parent 6945d9f0
......@@ -355,9 +355,7 @@ configure (pkg_descr0, pbi) cfg
--
-- TODO: mention '--exact-configuration' in the error message
-- when this fails?
(depName `Map.member` requiredDepsMap)
|| (pkgName pid == depName
&& pkgVersion pid `withinRange` verRange)
(depName `Map.member` requiredDepsMap) || isInternalDep
| otherwise =
-- Normal operation: just look up dependency in the package
......@@ -365,6 +363,8 @@ configure (pkg_descr0, pbi) cfg
not . null . PackageIndex.lookupDependency pkgs' $ d
where
pkgs' = PackageIndex.insert internalPackage installedPackageSet
isInternalDep = pkgName pid == depName
&& pkgVersion pid `withinRange` verRange
enableTest t = t { testEnabled = fromFlag (configTests cfg) }
flaggedTests = map (\(n, t) -> (n, mapTreeData enableTest t))
(condTestSuites pkg_descr0)
......
Markdown is supported
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