Commit f62fcf7e authored by kristenk's avatar kristenk

Solver: Add a flag to control minimizing the conflict set.

Minimizing the conflict set requires rerunning the solver multiple times, which
can be time consuming.  This commit adds a flag, --minimize-conflict-set, that
defaults to false.  We should probably add a way to limit the total run time
before turning the feature on by default, such as applying the backjump limit to
the combined solver runs.
parent 5a2bf8bf
......@@ -254,6 +254,7 @@ instance Semigroup SavedConfig where
installMaxBackjumps = combine installMaxBackjumps,
installReorderGoals = combine installReorderGoals,
installCountConflicts = combine installCountConflicts,
installMinimizeConflictSet = combine installMinimizeConflictSet,
installIndependentGoals = combine installIndependentGoals,
installShadowPkgs = combine installShadowPkgs,
installStrongFlags = combine installStrongFlags,
......
......@@ -47,6 +47,7 @@ module Distribution.Client.Dependency (
setPreferenceDefault,
setReorderGoals,
setCountConflicts,
setMinimizeConflictSet,
setIndependentGoals,
setAvoidReinstalls,
setShadowPkgs,
......@@ -158,6 +159,7 @@ data DepResolverParams = DepResolverParams {
depResolverSourcePkgIndex :: PackageIndex.PackageIndex UnresolvedSourcePackage,
depResolverReorderGoals :: ReorderGoals,
depResolverCountConflicts :: CountConflicts,
depResolverMinimizeConflictSet :: MinimizeConflictSet,
depResolverIndependentGoals :: IndependentGoals,
depResolverAvoidReinstalls :: AvoidReinstalls,
depResolverShadowPkgs :: ShadowPkgs,
......@@ -195,6 +197,7 @@ showDepResolverParams p =
++ "\nstrategy: " ++ show (depResolverPreferenceDefault p)
++ "\nreorder goals: " ++ show (asBool (depResolverReorderGoals p))
++ "\ncount conflicts: " ++ show (asBool (depResolverCountConflicts p))
++ "\nminimize conflict set: " ++ show (asBool (depResolverMinimizeConflictSet p))
++ "\nindependent goals: " ++ show (asBool (depResolverIndependentGoals p))
++ "\navoid reinstalls: " ++ show (asBool (depResolverAvoidReinstalls p))
++ "\nshadow packages: " ++ show (asBool (depResolverShadowPkgs p))
......@@ -251,6 +254,7 @@ basicDepResolverParams installedPkgIndex sourcePkgIndex =
depResolverSourcePkgIndex = sourcePkgIndex,
depResolverReorderGoals = ReorderGoals False,
depResolverCountConflicts = CountConflicts True,
depResolverMinimizeConflictSet = MinimizeConflictSet False,
depResolverIndependentGoals = IndependentGoals False,
depResolverAvoidReinstalls = AvoidReinstalls False,
depResolverShadowPkgs = ShadowPkgs False,
......@@ -306,6 +310,12 @@ setCountConflicts count params =
depResolverCountConflicts = count
}
setMinimizeConflictSet :: MinimizeConflictSet -> DepResolverParams -> DepResolverParams
setMinimizeConflictSet minimize params =
params {
depResolverMinimizeConflictSet = minimize
}
setIndependentGoals :: IndependentGoals -> DepResolverParams -> DepResolverParams
setIndependentGoals indep params =
params {
......@@ -745,8 +755,7 @@ resolveDependencies platform comp pkgConfigDB solver params =
Step (showDepResolverParams finalparams)
$ fmap (validateSolverResult platform comp indGoals)
$ runSolver solver (SolverConfig reordGoals cntConflicts
indGoals noReinstalls
$ runSolver solver (SolverConfig reordGoals cntConflicts minimize indGoals noReinstalls
shadowing strFlags allowBootLibs onlyConstrained_ maxBkjumps enableBj
solveExes order verbosity (PruneAfterFirstSuccess False))
platform comp installedPkgIndex sourcePkgIndex
......@@ -760,6 +769,7 @@ resolveDependencies platform comp pkgConfigDB solver params =
sourcePkgIndex
reordGoals
cntConflicts
minimize
indGoals
noReinstalls
shadowing
......@@ -1005,9 +1015,10 @@ resolveWithoutDependencies :: DepResolverParams
-> Either [ResolveNoDepsError] [UnresolvedSourcePackage]
resolveWithoutDependencies (DepResolverParams targets constraints
prefs defpref installedPkgIndex sourcePkgIndex
_reorderGoals _countConflicts _indGoals _avoidReinstalls
_shadowing _strFlags _maxBjumps _enableBj
_solveExes _allowBootLibInstalls _onlyConstrained _order _verbosity) =
_reorderGoals _countConflicts _minimizeConflictSet
_indGoals _avoidReinstalls _shadowing _strFlags
_maxBjumps _enableBj _solveExes
_allowBootLibInstalls _onlyConstrained _order _verbosity) =
collectEithers $ map selectPackage (Set.toList targets)
where
selectPackage :: PackageName -> Either ResolveNoDepsError UnresolvedSourcePackage
......
......@@ -162,6 +162,8 @@ planPackages verbosity comp platform fetchFlags
. setCountConflicts countConflicts
. setMinimizeConflictSet minimizeConflictSet
. setShadowPkgs shadowPkgs
. setStrongFlags strongFlags
......@@ -197,6 +199,7 @@ planPackages verbosity comp platform fetchFlags
reorderGoals = fromFlag (fetchReorderGoals fetchFlags)
countConflicts = fromFlag (fetchCountConflicts fetchFlags)
minimizeConflictSet = fromFlag (fetchMinimizeConflictSet fetchFlags)
independentGoals = fromFlag (fetchIndependentGoals fetchFlags)
shadowPkgs = fromFlag (fetchShadowPkgs fetchFlags)
strongFlags = fromFlag (fetchStrongFlags fetchFlags)
......
......@@ -175,6 +175,8 @@ planPackages verbosity comp platform mSandboxPkgInfo freezeFlags
. setCountConflicts countConflicts
. setMinimizeConflictSet minimizeConflictSet
. setShadowPkgs shadowPkgs
. setStrongFlags strongFlags
......@@ -205,6 +207,7 @@ planPackages verbosity comp platform mSandboxPkgInfo freezeFlags
reorderGoals = fromFlag (freezeReorderGoals freezeFlags)
countConflicts = fromFlag (freezeCountConflicts freezeFlags)
minimizeConflictSet = fromFlag (freezeMinimizeConflictSet freezeFlags)
independentGoals = fromFlag (freezeIndependentGoals freezeFlags)
shadowPkgs = fromFlag (freezeShadowPkgs freezeFlags)
strongFlags = fromFlag (freezeStrongFlags freezeFlags)
......
......@@ -389,6 +389,8 @@ planPackages verbosity comp platform mSandboxPkgInfo solver
. setCountConflicts countConflicts
. setMinimizeConflictSet minimizeConflictSet
. setAvoidReinstalls avoidReinstalls
. setShadowPkgs shadowPkgs
......@@ -455,6 +457,7 @@ planPackages verbosity comp platform mSandboxPkgInfo solver
fromFlag (installReinstall installFlags)
reorderGoals = fromFlag (installReorderGoals installFlags)
countConflicts = fromFlag (installCountConflicts installFlags)
minimizeConflictSet = fromFlag (installMinimizeConflictSet installFlags)
independentGoals = fromFlag (installIndependentGoals installFlags)
avoidReinstalls = fromFlag (installAvoidReinstalls installFlags)
shadowPkgs = fromFlag (installShadowPkgs installFlags)
......
......@@ -238,6 +238,7 @@ resolveSolverSettings ProjectConfig{
| otherwise -> Just n
solverSettingReorderGoals = fromFlag projectConfigReorderGoals
solverSettingCountConflicts = fromFlag projectConfigCountConflicts
solverSettingMinimizeConflictSet = fromFlag projectConfigMinimizeConflictSet
solverSettingStrongFlags = fromFlag projectConfigStrongFlags
solverSettingAllowBootLibInstalls = fromFlag projectConfigAllowBootLibInstalls
solverSettingOnlyConstrained = fromFlag projectConfigOnlyConstrained
......@@ -258,6 +259,7 @@ resolveSolverSettings ProjectConfig{
projectConfigMaxBackjumps = Flag defaultMaxBackjumps,
projectConfigReorderGoals = Flag (ReorderGoals False),
projectConfigCountConflicts = Flag (CountConflicts True),
projectConfigMinimizeConflictSet = Flag (MinimizeConflictSet False),
projectConfigStrongFlags = Flag (StrongFlags False),
projectConfigAllowBootLibInstalls = Flag (AllowBootLibInstalls False),
projectConfigOnlyConstrained = Flag OnlyConstrainedNone,
......
......@@ -352,6 +352,7 @@ convertLegacyAllPackageFlags globalFlags configFlags
--installUpgradeDeps = projectConfigUpgradeDeps,
installReorderGoals = projectConfigReorderGoals,
installCountConflicts = projectConfigCountConflicts,
installMinimizeConflictSet = projectConfigMinimizeConflictSet,
installPerComponent = projectConfigPerComponent,
installIndependentGoals = projectConfigIndependentGoals,
--installShadowPkgs = projectConfigShadowPkgs,
......@@ -576,6 +577,7 @@ convertToLegacySharedConfig
installUpgradeDeps = mempty, --projectConfigUpgradeDeps,
installReorderGoals = projectConfigReorderGoals,
installCountConflicts = projectConfigCountConflicts,
installMinimizeConflictSet = projectConfigMinimizeConflictSet,
installIndependentGoals = projectConfigIndependentGoals,
installShadowPkgs = mempty, --projectConfigShadowPkgs,
installStrongFlags = projectConfigStrongFlags,
......@@ -952,7 +954,8 @@ legacySharedConfigFieldDescrs =
, "remote-build-reporting", "report-planning-failure"
, "one-shot", "jobs", "keep-going", "offline", "per-component"
-- solver flags:
, "max-backjumps", "reorder-goals", "count-conflicts", "independent-goals"
, "max-backjumps", "reorder-goals", "count-conflicts"
, "minimize-conflict-set", "independent-goals"
, "strong-flags" , "allow-boot-library-installs", "reject-unconstrained-dependencies", "index-state"
]
. commandOptionsToFields
......
......@@ -193,6 +193,7 @@ data ProjectConfigShared
projectConfigMaxBackjumps :: Flag Int,
projectConfigReorderGoals :: Flag ReorderGoals,
projectConfigCountConflicts :: Flag CountConflicts,
projectConfigMinimizeConflictSet :: Flag MinimizeConflictSet,
projectConfigStrongFlags :: Flag StrongFlags,
projectConfigAllowBootLibInstalls :: Flag AllowBootLibInstalls,
projectConfigOnlyConstrained :: Flag OnlyConstrained,
......@@ -382,6 +383,7 @@ data SolverSettings
solverSettingMaxBackjumps :: Maybe Int,
solverSettingReorderGoals :: ReorderGoals,
solverSettingCountConflicts :: CountConflicts,
solverSettingMinimizeConflictSet :: MinimizeConflictSet,
solverSettingStrongFlags :: StrongFlags,
solverSettingAllowBootLibInstalls :: AllowBootLibInstalls,
solverSettingOnlyConstrained :: OnlyConstrained,
......
......@@ -951,6 +951,8 @@ planPackages verbosity comp platform solver SolverSettings{..}
. setCountConflicts solverSettingCountConflicts
. setMinimizeConflictSet solverSettingMinimizeConflictSet
--TODO: [required eventually] should only be configurable for
--custom installs
-- . setAvoidReinstalls solverSettingAvoidReinstalls
......
......@@ -973,6 +973,7 @@ data FetchFlags = FetchFlags {
fetchMaxBackjumps :: Flag Int,
fetchReorderGoals :: Flag ReorderGoals,
fetchCountConflicts :: Flag CountConflicts,
fetchMinimizeConflictSet :: Flag MinimizeConflictSet,
fetchIndependentGoals :: Flag IndependentGoals,
fetchShadowPkgs :: Flag ShadowPkgs,
fetchStrongFlags :: Flag StrongFlags,
......@@ -992,6 +993,7 @@ defaultFetchFlags = FetchFlags {
fetchMaxBackjumps = Flag defaultMaxBackjumps,
fetchReorderGoals = Flag (ReorderGoals False),
fetchCountConflicts = Flag (CountConflicts True),
fetchMinimizeConflictSet = Flag (MinimizeConflictSet False),
fetchIndependentGoals = Flag (IndependentGoals False),
fetchShadowPkgs = Flag (ShadowPkgs False),
fetchStrongFlags = Flag (StrongFlags False),
......@@ -1053,6 +1055,7 @@ fetchCommand = CommandUI {
fetchMaxBackjumps (\v flags -> flags { fetchMaxBackjumps = v })
fetchReorderGoals (\v flags -> flags { fetchReorderGoals = v })
fetchCountConflicts (\v flags -> flags { fetchCountConflicts = v })
fetchMinimizeConflictSet (\v flags -> flags { fetchMinimizeConflictSet = v })
fetchIndependentGoals (\v flags -> flags { fetchIndependentGoals = v })
fetchShadowPkgs (\v flags -> flags { fetchShadowPkgs = v })
fetchStrongFlags (\v flags -> flags { fetchStrongFlags = v })
......@@ -1073,6 +1076,7 @@ data FreezeFlags = FreezeFlags {
freezeMaxBackjumps :: Flag Int,
freezeReorderGoals :: Flag ReorderGoals,
freezeCountConflicts :: Flag CountConflicts,
freezeMinimizeConflictSet :: Flag MinimizeConflictSet,
freezeIndependentGoals :: Flag IndependentGoals,
freezeShadowPkgs :: Flag ShadowPkgs,
freezeStrongFlags :: Flag StrongFlags,
......@@ -1090,6 +1094,7 @@ defaultFreezeFlags = FreezeFlags {
freezeMaxBackjumps = Flag defaultMaxBackjumps,
freezeReorderGoals = Flag (ReorderGoals False),
freezeCountConflicts = Flag (CountConflicts True),
freezeMinimizeConflictSet = Flag (MinimizeConflictSet False),
freezeIndependentGoals = Flag (IndependentGoals False),
freezeShadowPkgs = Flag (ShadowPkgs False),
freezeStrongFlags = Flag (StrongFlags False),
......@@ -1142,6 +1147,7 @@ freezeCommand = CommandUI {
freezeMaxBackjumps (\v flags -> flags { freezeMaxBackjumps = v })
freezeReorderGoals (\v flags -> flags { freezeReorderGoals = v })
freezeCountConflicts (\v flags -> flags { freezeCountConflicts = v })
freezeMinimizeConflictSet (\v flags -> flags { freezeMinimizeConflictSet = v })
freezeIndependentGoals (\v flags -> flags { freezeIndependentGoals = v })
freezeShadowPkgs (\v flags -> flags { freezeShadowPkgs = v })
freezeStrongFlags (\v flags -> flags { freezeStrongFlags = v })
......@@ -1711,6 +1717,7 @@ data InstallFlags = InstallFlags {
installMaxBackjumps :: Flag Int,
installReorderGoals :: Flag ReorderGoals,
installCountConflicts :: Flag CountConflicts,
installMinimizeConflictSet :: Flag MinimizeConflictSet,
installIndependentGoals :: Flag IndependentGoals,
installShadowPkgs :: Flag ShadowPkgs,
installStrongFlags :: Flag StrongFlags,
......@@ -1757,6 +1764,7 @@ defaultInstallFlags = InstallFlags {
installMaxBackjumps = Flag defaultMaxBackjumps,
installReorderGoals = Flag (ReorderGoals False),
installCountConflicts = Flag (CountConflicts True),
installMinimizeConflictSet = Flag (MinimizeConflictSet False),
installIndependentGoals= Flag (IndependentGoals False),
installShadowPkgs = Flag (ShadowPkgs False),
installStrongFlags = Flag (StrongFlags False),
......@@ -1968,6 +1976,7 @@ installOptions showOrParseArgs =
installMaxBackjumps (\v flags -> flags { installMaxBackjumps = v })
installReorderGoals (\v flags -> flags { installReorderGoals = v })
installCountConflicts (\v flags -> flags { installCountConflicts = v })
installMinimizeConflictSet (\v flags -> flags { installMinimizeConflictSet = v })
installIndependentGoals (\v flags -> flags { installIndependentGoals = v })
installShadowPkgs (\v flags -> flags { installShadowPkgs = v })
installStrongFlags (\v flags -> flags { installStrongFlags = v })
......@@ -2778,14 +2787,16 @@ optionSolverFlags :: ShowOrParseArgs
-> (flags -> Flag Int ) -> (Flag Int -> flags -> flags)
-> (flags -> Flag ReorderGoals) -> (Flag ReorderGoals -> flags -> flags)
-> (flags -> Flag CountConflicts) -> (Flag CountConflicts -> flags -> flags)
-> (flags -> Flag MinimizeConflictSet) -> (Flag MinimizeConflictSet -> flags -> flags)
-> (flags -> Flag IndependentGoals) -> (Flag IndependentGoals -> flags -> flags)
-> (flags -> Flag ShadowPkgs) -> (Flag ShadowPkgs -> flags -> flags)
-> (flags -> Flag StrongFlags) -> (Flag StrongFlags -> flags -> flags)
-> (flags -> Flag AllowBootLibInstalls) -> (Flag AllowBootLibInstalls -> flags -> flags)
-> (flags -> Flag OnlyConstrained) -> (Flag OnlyConstrained -> flags -> flags)
-> [OptionField flags]
optionSolverFlags showOrParseArgs getmbj setmbj getrg setrg getcc setcc getig setig
getsip setsip getstrfl setstrfl getib setib getoc setoc =
optionSolverFlags showOrParseArgs getmbj setmbj getrg setrg getcc setcc
getmc setmc getig setig getsip setsip getstrfl setstrfl
getib setib getoc setoc =
[ option [] ["max-backjumps"]
("Maximum number of backjumps allowed while solving (default: " ++ show defaultMaxBackjumps ++ "). Use a negative number to enable unlimited backtracking. Use 0 to disable backtracking completely.")
getmbj setmbj
......@@ -2801,6 +2812,13 @@ optionSolverFlags showOrParseArgs getmbj setmbj getrg setrg getcc setcc getig se
(fmap asBool . getcc)
(setcc . fmap CountConflicts)
(yesNoOpt showOrParseArgs)
, option [] ["minimize-conflict-set"]
("When there is no solution, try to improve the error message by finding "
++ "a minimal conflict set (default: false). May increase run time "
++ "significantly.")
(fmap asBool . getmc)
(setmc . fmap MinimizeConflictSet)
(yesNoOpt showOrParseArgs)
, option [] ["independent-goals"]
"Treat several goals on the command line as independent. If several goals depend on the same package, different versions can be chosen."
(fmap asBool . getig)
......
......@@ -50,6 +50,8 @@ import Distribution.Solver.Types.Progress
import Distribution.Solver.Types.Variable
import Distribution.System
( Platform(..) )
import Distribution.Simple.Setup
( BooleanFlag(..) )
import Distribution.Simple.Utils
( ordNubBy )
import Distribution.Verbosity
......@@ -84,16 +86,17 @@ modularResolver sc (Platform arch os) cinfo iidx sidx pkgConfigDB pprefs pcs pns
--
-- When there is no solution, we produce the error message by rerunning the
-- solver but making it prefer the goals from the final conflict set from the
-- first run. We also set the backjump limit to 0, so that the log stops at the
-- first backjump and is relatively short. Preferring goals from the final
-- conflict set increases the probability that the log to the first backjump
-- contains package, flag, and stanza choices that are relevant to the final
-- failure. The solver shouldn't need to choose any packages that aren't in the
-- final conflict set. (For every variable in the final conflict set, the final
-- conflict set should also contain the variable that introduced that variable.
-- The solver can then follow that chain of variables in reverse order from the
-- user target to the conflict.) However, it is possible that the conflict set
-- contains unnecessary variables.
-- first run (or a subset of the final conflict set with
-- --minimize-conflict-set). We also set the backjump limit to 0, so that the
-- log stops at the first backjump and is relatively short. Preferring goals
-- from the final conflict set increases the probability that the log to the
-- first backjump contains package, flag, and stanza choices that are relevant
-- to the final failure. The solver shouldn't need to choose any packages that
-- aren't in the final conflict set. (For every variable in the final conflict
-- set, the final conflict set should also contain the variable that introduced
-- that variable. The solver can then follow that chain of variables in reverse
-- order from the user target to the conflict.) However, it is possible that the
-- conflict set contains unnecessary variables.
--
-- Producing an error message when the solver reaches the backjump limit is more
-- complicated. There is no final conflict set, so we create one for the minimal
......@@ -134,23 +137,26 @@ solve' sc cinfo idx pkgConfigDB pprefs gcs pns =
-> SolverFailure
-> RetryLog String String (Assignment, RevDepMap)
createErrorMsg verbosity mbj failure@(ExhaustiveSearch cs cm) =
continueWith ("Found no solution after exhaustively searching the "
++ "dependency tree. Rerunning the dependency solver "
++ "to minimize the conflict set ({"
++ showConflictSet cs ++ "}).") $
retry (tryToMinimizeConflictSet (runSolver printFullLog) sc cs cm) $
\case
ExhaustiveSearch cs' cm' ->
fromProgress $ Fail $
rerunSolverForErrorMsg cs'
++ finalErrorMsg verbosity mbj (ExhaustiveSearch cs' cm')
BackjumpLimitReached ->
fromProgress $ Fail $
"Reached backjump limit while trying to minimize the "
++ "conflict set to create a better error message. "
++ "Original error message:\n"
++ rerunSolverForErrorMsg cs
++ finalErrorMsg verbosity mbj failure
if asBool $ minimizeConflictSet sc
then continueWith ("Found no solution after exhaustively searching the "
++ "dependency tree. Rerunning the dependency solver "
++ "to minimize the conflict set ({"
++ showConflictSet cs ++ "}).") $
retry (tryToMinimizeConflictSet (runSolver printFullLog) sc cs cm) $
\case
ExhaustiveSearch cs' cm' ->
fromProgress $ Fail $
rerunSolverForErrorMsg cs'
++ finalErrorMsg verbosity mbj (ExhaustiveSearch cs' cm')
BackjumpLimitReached ->
fromProgress $ Fail $
"Reached backjump limit while trying to minimize the "
++ "conflict set to create a better error message. "
++ "Original error message:\n"
++ rerunSolverForErrorMsg cs
++ finalErrorMsg verbosity mbj failure
else fromProgress $ Fail $
rerunSolverForErrorMsg cs ++ finalErrorMsg verbosity mbj failure
createErrorMsg verbosity mbj failure@BackjumpLimitReached =
continueWith
("Backjump limit reached. Rerunning dependency solver to generate "
......
......@@ -57,6 +57,7 @@ import Debug.Trace.Tree.Assoc (Assoc(..))
data SolverConfig = SolverConfig {
reorderGoals :: ReorderGoals,
countConflicts :: CountConflicts,
minimizeConflictSet :: MinimizeConflictSet,
independentGoals :: IndependentGoals,
avoidReinstalls :: AvoidReinstalls,
shadowPkgs :: ShadowPkgs,
......
......@@ -3,6 +3,7 @@
module Distribution.Solver.Types.Settings
( ReorderGoals(..)
, IndependentGoals(..)
, MinimizeConflictSet(..)
, AvoidReinstalls(..)
, ShadowPkgs(..)
, StrongFlags(..)
......@@ -28,6 +29,9 @@ newtype ReorderGoals = ReorderGoals Bool
newtype CountConflicts = CountConflicts Bool
deriving (BooleanFlag, Eq, Generic, Show)
newtype MinimizeConflictSet = MinimizeConflictSet Bool
deriving (BooleanFlag, Eq, Generic, Show)
newtype IndependentGoals = IndependentGoals Bool
deriving (BooleanFlag, Eq, Generic, Show)
......@@ -59,6 +63,7 @@ newtype SolveExecutables = SolveExecutables Bool
instance Binary ReorderGoals
instance Binary CountConflicts
instance Binary IndependentGoals
instance Binary MinimizeConflictSet
instance Binary AvoidReinstalls
instance Binary ShadowPkgs
instance Binary StrongFlags
......
......@@ -438,7 +438,7 @@ instance Arbitrary ProjectConfigShared where
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
......@@ -468,14 +468,15 @@ instance Arbitrary ProjectConfigShared where
, projectConfigMaxBackjumps = x16
, projectConfigReorderGoals = x17
, projectConfigCountConflicts = x18
, projectConfigStrongFlags = x19
, projectConfigAllowBootLibInstalls = x20
, projectConfigOnlyConstrained = x21
, projectConfigPerComponent = x22
, projectConfigIndependentGoals = x23
, projectConfigConfigFile = x24
, projectConfigProgPathExtra = x25
, projectConfigStoreDir = x26 } =
, projectConfigMinimizeConflictSet = x19
, projectConfigStrongFlags = x20
, projectConfigAllowBootLibInstalls = x21
, projectConfigOnlyConstrained = x22
, projectConfigPerComponent = x23
, projectConfigIndependentGoals = x24
, projectConfigConfigFile = x25
, projectConfigProgPathExtra = x26
, projectConfigStoreDir = x27 } =
[ ProjectConfigShared { projectConfigDistDir = x00'
, projectConfigProjectFile = x01'
, projectConfigHcFlavor = x02'
......@@ -495,25 +496,26 @@ instance Arbitrary ProjectConfigShared where
, projectConfigMaxBackjumps = x16'
, projectConfigReorderGoals = x17'
, projectConfigCountConflicts = x18'
, projectConfigStrongFlags = x19'
, projectConfigAllowBootLibInstalls = x20'
, projectConfigOnlyConstrained = x21'
, projectConfigPerComponent = x22'
, projectConfigIndependentGoals = x23'
, projectConfigConfigFile = x24'
, projectConfigProgPathExtra = x25'
, projectConfigStoreDir = x26' }
, projectConfigMinimizeConflictSet = x19'
, projectConfigStrongFlags = x20'
, projectConfigAllowBootLibInstalls = x21'
, projectConfigOnlyConstrained = x22'
, projectConfigPerComponent = x23'
, projectConfigIndependentGoals = x24'
, projectConfigConfigFile = x25'
, projectConfigProgPathExtra = x26'
, projectConfigStoreDir = x27' }
| ((x00', x01', x02', x03', x04'),
(x05', x06', x07', x08', x09'),
(x10', x11', x12', x13', x14', x15'),
(x16', x17', x18', x19', x20'),
x21', x22', x23', x24', x25', x26')
(x16', x17', x18', x19', x20', x21'),
x22', x23', x24', x25', x26', x27')
<- shrink
((x00, x01, x02, fmap NonEmpty x03, fmap NonEmpty x04),
(x05, x06, x07, x08, preShrink_Constraints x09),
(x10, x11, x12, x13, x14, x15),
(x16, x17, x18, x19, x20),
x21, x22, x23, x24, x25, x26)
(x16, x17, x18, x19, x20, x21),
x22, x23, x24, x25, x26, x27)
]
where
preShrink_Constraints = map fst
......@@ -835,6 +837,9 @@ instance Arbitrary ReorderGoals where
instance Arbitrary CountConflicts where
arbitrary = CountConflicts <$> arbitrary
instance Arbitrary MinimizeConflictSet where
arbitrary = MinimizeConflictSet <$> arbitrary
instance Arbitrary IndependentGoals where
arbitrary = IndependentGoals <$> arbitrary
......
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