aboutsummaryrefslogtreecommitdiff
path: root/hoogle-test/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hoogle-test/Main.hs')
-rw-r--r--hoogle-test/Main.hs31
1 files changed, 31 insertions, 0 deletions
diff --git a/hoogle-test/Main.hs b/hoogle-test/Main.hs
new file mode 100644
index 00000000..c8cda640
--- /dev/null
+++ b/hoogle-test/Main.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE CPP #-}
+
+
+import System.Environment
+import System.FilePath
+
+import Test.Haddock
+
+
+checkConfig :: CheckConfig String
+checkConfig = CheckConfig
+ { ccfgRead = \_ input -> Just input
+ , ccfgDump = id
+ , ccfgEqual = (==)
+ }
+
+
+dirConfig :: DirConfig
+dirConfig = defaultDirConfig $ takeDirectory __FILE__
+
+
+main :: IO ()
+main = do
+ cfg <- parseArgs checkConfig dirConfig =<< getArgs
+ runAndCheck $ cfg
+ { cfgHaddockArgs = cfgHaddockArgs cfg ++
+ [ "--package-name=test"
+ , "--package-version=0.0.0"
+ , "--hoogle"
+ ]
+ }