Skip to content

Commit

Permalink
Merge pull request #4596 from commercialhaskell/haddock-internal
Browse files Browse the repository at this point in the history
Fix building haddocks for packages with internal libraries
  • Loading branch information
snoyberg authored Feb 19, 2019
2 parents bc0bc3e + 1c01bb6 commit 55c13af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Stack/Build/Haddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Data.Time (UTCTime)
import Path
import Path.Extra
import Path.IO
import RIO.List (intercalate)
import RIO.PrettyPrint
import Stack.Constants
import Stack.PackageDump
Expand Down Expand Up @@ -235,18 +236,17 @@ generateHaddockIndex descr wc bco dumpPackages docRelFP destDir = do
docRelFP FP.</>
packageIdentifierString dpPackageIdent FP.</>
(packageNameString name FP.<.> "haddock")
interfaces = intercalate "," $
maybeToList dpHaddockHtml ++ [srcInterfaceFP]

destInterfaceAbsFile <- parseCollapsedAbsFile (toFilePath destDir FP.</> destInterfaceRelFP)
esrcInterfaceModTime <- tryGetModificationTime srcInterfaceAbsFile
return $
case esrcInterfaceModTime of
Left _ -> Nothing
Right srcInterfaceModTime ->
Just
( [ "-i"
, concat
[ docRelFP FP.</> packageIdentifierString dpPackageIdent
, ","
, destInterfaceRelFP ]]
( [ "-i", interfaces ]
, srcInterfaceModTime
, srcInterfaceAbsFile
, destInterfaceAbsFile )
Expand Down

0 comments on commit 55c13af

Please sign in to comment.