diff options
Diffstat (limited to 'html-test/run.hs')
-rwxr-xr-x | html-test/run.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/html-test/run.hs b/html-test/run.hs index b3ca4786..da414171 100755 --- a/html-test/run.hs +++ b/html-test/run.hs @@ -181,19 +181,25 @@ baseDependencies ghcPath = do processFileArgs :: [String] -> IO [FilePath] -processFileArgs [] = filter isSourceFile <$> getDirectoryContents srcDir +processFileArgs [] = + map toModulePath . filter isSourceFile <$> getDirectoryContents srcDir + where + toModulePath = modulePath . takeBaseName processFileArgs args = pure $ map processFileArg args processFileArg :: String -> FilePath processFileArg arg | isSourceFile arg = arg - | otherwise = srcDir </> arg <.> "hs" + | otherwise = modulePath arg isSourceFile :: FilePath -> Bool isSourceFile path = takeExtension path `elem` [".hs", ".lhs"] +modulePath :: String -> FilePath +modulePath mdl = srcDir </> mdl <.> "hs" + data Flag = FlagHaddockPath FilePath |