Skip to content

Commit

Permalink
Solver: always keep ghc wired-in as hard constraints
Browse files Browse the repository at this point in the history
fixes #2453
  • Loading branch information
harendra-kumar committed Aug 8, 2016
1 parent daf9c22 commit 78241b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Stack/Solver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import Data.Either
import Data.Foldable (forM_)
import Data.Function (on)
import qualified Data.HashMap.Strict as HashMap
import qualified Data.HashSet as HashSet
import Data.List ( (\\), isSuffixOf, intercalate
, minimumBy, isPrefixOf)
import Data.List.Extra (groupSortOn)
Expand All @@ -62,7 +63,7 @@ import Path
import Path.Find (findFiles)
import Path.IO hiding (findExecutable, findFiles)
import Stack.BuildPlan
import Stack.Constants (stackDotYaml)
import Stack.Constants (stackDotYaml, wiredInPackages)
import Stack.Package (printCabalFileWarning
, hpack
, readPackageUnresolved)
Expand Down Expand Up @@ -265,6 +266,7 @@ getCabalConfig dir constraintType constraints = do
assert (not . null . versionString $ version) $
T.concat
[ (if constraintType == Constraint
|| name `HashSet.member` wiredInPackages
then "constraint: "
else "preference: ")
, T.pack $ packageNameString name
Expand Down

0 comments on commit 78241b9

Please sign in to comment.