@@ -9,15 +9,17 @@ import System.IO (hFlush, stdout)
99data BuildArgs = BuildArgs
1010 { noClean :: Bool
1111 , excluded :: [String]
12+ , noPlatform :: Bool
1213 }
1314
1415parseBuildArgs :: [String] -> IO BuildArgs
1516parseBuildArgs =
16− loop $ BuildArgs False []
17+ loop $ BuildArgs False [] False
1718 where
1819 loop x [] = return x
1920 loop x ("--no-clean":rest) = loop x { noClean = True } rest
2021 loop x ("--exclude":y:rest) = loop x { excluded = y : excluded x } rest
22+ loop x ("--no-platform":rest) = loop x { noPlatform = True } rest
2123 loop _ (y:_) = error $ "Did not understand argument: " ++ y
2224
2325main :: IO ()
@@ -29,6 +31,7 @@ main = do
2931 build defaultBuildSettings
3032 { cleanBeforeBuild = not noClean
3133 , excludedPackages = fromList $ map PackageName excluded
34+ , requireHaskellPlatform = not noPlatform
3235 }
3336 ["init"] -> do
3437 putStrLn "Note: init isn't really ready for prime time use."
@@ -46,5 +49,5 @@ main = do
4649 putStrLn "Available commands:"
4750 putStrLn " update Download updated Stackage databases. Automatically calls init."
4851 putStrLn " init Initialize your cabal file to use Stackage"
49− putStrLn " build [--no-clean] [--exclude package...]"
52+ putStrLn " build [--no-clean] [--no-platform] [--exclude package...]"
5053 putStrLn " Build the package databases (maintainers only)"