]> gitweb.michael.orlitzky.com - haeredes.git/commitdiff
test/Doctests.hs: support new Cabal autogen path in doctests.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 2 Mar 2019 01:44:21 +0000 (20:44 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 2 Mar 2019 01:44:21 +0000 (20:44 -0500)
Since the last haeredes release, Cabal has moved its auto-generated
modules from dist/build/autogen to dist/build/$component/autogen,
breaking our doctests which need to load the Paths_haeredes module.
These paths are passed to the doctest runner as a list, so it's easy
to support both: we now just pass both paths.

test/Doctests.hs

index 22124b13cc5cd7d57c7c055420e5be07e9b04f59..067f3d432b23a8b0ca2a4becec7e9af2733c4421 100644 (file)
@@ -10,4 +10,8 @@ find_sources = find always (extension ==? ".hs") "src/"
 main :: IO ()
 main = do
   sources <- find_sources
 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