Add tools to test that cleaning works properly
[ghc-hetmet.git] / utils / testremove / wouldrm.hs
1
2 module Main (main) where
3
4 import System.Environment
5
6 data CleanWhat = CleanFile FilePath
7                | CleanRec  FilePath
8     deriving (Read, Show)
9
10 main :: IO ()
11 main = do args <- getArgs
12           ls <- case args of
13                 "CLEAN_FILES" : files -> return $ map CleanFile files
14                 "CLEAN_REC"   : dirs  -> return $ map CleanRec dirs
15                 _ -> error "Bad args"
16           appendFile "would-be-cleaned" $ unlines $ map show ls