blob: 71d78f73cf8e772ab148877dc8f99ed5220fb903 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/env runhaskell
{-# LANGUAGE CPP #-}
import System.Environment
import System.FilePath
baseDir, rootDir :: FilePath
baseDir = takeDirectory __FILE__
rootDir = baseDir </> ".."
srcDir, refDir, outDir :: FilePath
srcDir = baseDir </> "src"
refDir = baseDir </> "ref"
outDir = baseDir </> "out"
main :: IO ()
main = do
files <- map processArg <$> getArgs
putStrLn $ "Files to test: " ++ show files
processArg :: String -> FilePath
processArg arg
| takeExtension arg `elem` [".hs", ".lhs"] = arg
| otherwise = srcDir </> arg <.> "hs"
|