From: Michael Orlitzky Date: Sat, 2 Mar 2019 01:44:21 +0000 (-0500) Subject: test/Doctests.hs: support new Cabal autogen path in doctests. X-Git-Tag: 0.5.1~11 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=5107e4fd9a830f448059a84cf4d4bd477fdb4f19;p=haeredes.git test/Doctests.hs: support new Cabal autogen path in doctests. 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. --- diff --git a/test/Doctests.hs b/test/Doctests.hs index 22124b1..067f3d4 100644 --- a/test/Doctests.hs +++ b/test/Doctests.hs @@ -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