From bc8de008b271ca4b9eb99f8043d08c42ab1734f0 Mon Sep 17 00:00:00 2001 From: Sebastian Meric de Bellefon Date: Wed, 22 Jun 2016 22:51:30 -0400 Subject: do not create empty src directory Fix #536. --- haddock-api/src/Haddock.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'haddock-api/src/Haddock.hs') diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs index 5e8f4a4a..28974d19 100644 --- a/haddock-api/src/Haddock.hs +++ b/haddock-api/src/Haddock.hs @@ -336,7 +336,7 @@ render dflags flags qual ifaces installedIfaces extSrcMap = do ppLaTeX title pkgStr visibleIfaces odir (fmap _doc prologue) opt_latex_style libDir - when (Flag_HyperlinkedSource `elem` flags) $ do + when (Flag_HyperlinkedSource `elem` flags && not (null ifaces)) $ do ppHyperlinkedSource odir libDir opt_source_css pretty srcMap ifaces -- | From GHC 7.10, this function has a potential to crash with a -- cgit v1.2.3