]> gitweb.michael.orlitzky.com - haeredes.git/blobdiff - test/Doctests.hs
test/Doctests.hs: support new Cabal autogen path in doctests.
[haeredes.git] / test / Doctests.hs
index d183b4b664d289ea123da751f562a937c34ff1ae..067f3d432b23a8b0ca2a4becec7e9af2733c4421 100644 (file)
@@ -1,7 +1,7 @@
-module Main
+module Main (main)
 where
 
-import Test.DocTest
+import Test.DocTest (doctest)
 import System.FilePath.Find ((==?), always, extension, find)
 
 find_sources :: IO [FilePath]
@@ -10,4 +10,8 @@ find_sources = find always (extension ==? ".hs") "src/"
 main :: IO ()
 main = do
   sources <- find_sources
-  doctest $ ["-isrc", "-idist/build/autogen"] ++ sources
+  doctest $ ["-isrc",
+             "-idist/build//autogen",        -- old cabal versions
+             "-idist/build/haeredes/autogen" -- new cabal versions
+            ]
+            ++ sources