diff options
author | Ian Lynagh <igloo@earth.li> | 2009-05-09 20:07:08 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-05-09 20:07:08 +0000 |
commit | c8d82c87a583e82476cff5643cc4d9919b9c083f (patch) | |
tree | 68670ec8011340c2d928e51965a90a8ca83f40ea /libraries | |
parent | 7c1909944e8726cad97107081a30b01bedeb9767 (diff) | |
download | haskell-c8d82c87a583e82476cff5643cc4d9919b9c083f.tar.gz |
Remove libraries/ifBuildable.hs; it's no longer used
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/ifBuildable.hs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/libraries/ifBuildable.hs b/libraries/ifBuildable.hs deleted file mode 100644 index 68b619751b..0000000000 --- a/libraries/ifBuildable.hs +++ /dev/null @@ -1,40 +0,0 @@ --- Returns exitcode 0 if the given package is buildable or is a boot package, --- and 1 otherwise. - -module Main (main) where - -import Control.Monad -import System.Directory -import System.Environment -import System.Exit -import System.IO - -main :: IO () -main = do args <- getArgs - case args of - [packagesFile, package] -> - doit packagesFile package - _ -> - error "Syntax: ifBuildable <packages-file> <package>" - -doit :: FilePath -> String -> IO () -doit packagesFile package - = do setCurrentDirectory package - unbuildable <- doesFileExist "unbuildable" - if not unbuildable - then exitWith ExitSuccess - else do mustBeBuildables <- getMustBeBuildables packagesFile - if package `elem` mustBeBuildables - then exitWith ExitSuccess - else do hPutStrLn stderr "Warning: Package is unbuildable" - exitWith (ExitFailure 1) - -getMustBeBuildables :: FilePath -> IO [String] -getMustBeBuildables packagesFile - = do xs <- readFile packagesFile - let nonCommentLines = filter (("#" /=) . take 1) $ lines xs - requiredLines = filter ((3 == ) . length) $ map words nonCommentLines - requiredLibraries = [ x | 'l':'i':'b':'r':'a':'r':'i':'e':'s':'/':x - <- map head requiredLines ] - return $ filter ("editline" /=) requiredLibraries - |