aboutsummaryrefslogtreecommitdiff
path: root/haddock-test/src/Test/Haddock/Config.hs
diff options
context:
space:
mode:
Diffstat (limited to 'haddock-test/src/Test/Haddock/Config.hs')
-rw-r--r--haddock-test/src/Test/Haddock/Config.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/haddock-test/src/Test/Haddock/Config.hs b/haddock-test/src/Test/Haddock/Config.hs
index 50616c7f..988636e4 100644
--- a/haddock-test/src/Test/Haddock/Config.hs
+++ b/haddock-test/src/Test/Haddock/Config.hs
@@ -193,7 +193,7 @@ loadConfig ccfg dcfg flags files = do
, baseDependencies ghcPath
]
- let cfgHaddockStdOut = fromMaybe "/dev/null" (flagsHaddockStdOut flags)
+ let cfgHaddockStdOut = fromMaybe defaultStdOut (flagsHaddockStdOut flags)
cfgDiffTool <- if FlagNoDiff `elem` flags
then pure Nothing
@@ -256,6 +256,14 @@ defaultDiffTool =
isAvailable = liftM isJust . findProgramLocation silent
+defaultStdOut :: FilePath
+#ifdef mingw32_HOST_OS
+defaultStdOut = "nul"
+#else
+defaultStdOut = "/dev/null"
+#endif
+
+
processFileArgs :: DirConfig -> [String] -> IO [TestPackage]
processFileArgs dcfg [] =
processFileArgs' dcfg . filter isValidEntry =<< getDirectoryContents srcDir