summaryrefslogtreecommitdiff
path: root/p/haskell-servant/debian/patches/fix-doctest.diff
blob: b775978438f062dc64c58834a375f8fc5dc82147 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Index: haskell-servant/test/Doctests.hs
===================================================================
--- haskell-servant.orig/test/Doctests.hs	2016-06-01 10:24:35.430202851 +0200
+++ haskell-servant/test/Doctests.hs	2016-06-01 10:25:00.642707368 +0200
@@ -20,14 +20,14 @@
 
 getCabalMacrosFile :: IO (Maybe FilePath)
 getCabalMacrosFile = do
-  exists <- doesDirectoryExist "dist"
+  exists <- doesDirectoryExist "dist-ghc"
   if exists
     then do
-      contents <- getDirectoryContents "dist"
+      contents <- getDirectoryContents "dist-ghc"
       let rest = "build" </> "autogen" </> "cabal_macros.h"
       whenExists $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
         [x] -> "dist" </> x </> rest
-        [] -> "dist" </> rest
+        [] -> "dist-ghc" </> rest
         xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
                     ++ show xs ++ "\nTry cabal clean"
     else return Nothing