@@ -16,6 +16,7 @@ import System.IO (hFlush, stdout)
16data SelectArgs = SelectArgs
16data SelectArgs = SelectArgs
17 { excluded :: [String]
17 { excluded :: [String]
18 , noPlatform :: Bool
18 , noPlatform :: Bool
19+ , ignoreUpgradeable :: Bool
19 , onlyPermissive :: Bool
20 , onlyPermissive :: Bool
20 , allowed :: [String]
21 , allowed :: [String]
21 , buildPlanDest :: FilePath
22 , buildPlanDest :: FilePath
@@ -27,6 +28,7 @@ parseSelectArgs =
27 loop SelectArgs
28 loop SelectArgs
28 { excluded = []
29 { excluded = []
29 , noPlatform = False
30 , noPlatform = False
31+ , ignoreUpgradeable = False
30 , onlyPermissive = False
32 , onlyPermissive = False
31 , allowed = []
33 , allowed = []
32 , buildPlanDest = defaultBuildPlan
34 , buildPlanDest = defaultBuildPlan
@@ -36,6 +38,7 @@ parseSelectArgs =
36 loop x [] = return x
38 loop x [] = return x
37 loop x ("--exclude":y:rest) = loop x { excluded = y : excluded x } rest
39 loop x ("--exclude":y:rest) = loop x { excluded = y : excluded x } rest
38 loop x ("--no-platform":rest) = loop x { noPlatform = True } rest
40 loop x ("--no-platform":rest) = loop x { noPlatform = True } rest
41+ loop x ("--ignore-upgradeable":rest) = loop x { ignoreUpgradeable = True } rest
39 loop x ("--only-permissive":rest) = loop x { onlyPermissive = True } rest
42 loop x ("--only-permissive":rest) = loop x { onlyPermissive = True } rest
40 loop x ("--allow":y:rest) = loop x { allowed = y : allowed x } rest
43 loop x ("--allow":y:rest) = loop x { allowed = y : allowed x } rest
41 loop x ("--build-plan":y:rest) = loop x { buildPlanDest = y } rest
44 loop x ("--build-plan":y:rest) = loop x { buildPlanDest = y } rest
@@ -95,6 +98,7 @@ main = do
95 (defaultSelectSettings ghcVersion)
98 (defaultSelectSettings ghcVersion)
96 { excludedPackages = fromList $ map PackageName excluded
99 { excludedPackages = fromList $ map PackageName excluded
97 , requireHaskellPlatform = not noPlatform
100 , requireHaskellPlatform = not noPlatform
101+ , ignoreUpgradeableCore = ignoreUpgradeable
98 , allowedPackage =
102 , allowedPackage =
99 if onlyPermissive
103 if onlyPermissive
100 then allowPermissive allowed
104 then allowPermissive allowed