Update Haddock file refs

This commit is contained in:
Michael Snoyman 2014-12-11 18:46:27 +02:00
parent e0e64b4088
commit 33b2e1540a
2 changed files with 14 additions and 7 deletions

View File

@ -232,6 +232,7 @@ runTestSuite cabalVersion settings testdir docdir
: "--hyperlink-source"
: "--html"
: "--hoogle"
-- FIXME is this redundant with read-interface above?
: "--html-location=../$pkg-$version/"
: hfsOpts) dir
let PackageName packageName' = packageName

View File

@ -309,15 +309,16 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
(childDir </> "dist" </> "doc" </> "html" </> fpFromText name)
(pbDocDir pb </> fpFromText namever)
{-
enewPath <- tryIO
$ canonicalizePath
$ docdir </> package </> packageName' <.> "haddock"
$ pbDocDir pb
</> fpFromText namever
</> fpFromText name <.> "haddock"
case enewPath of
Left _ -> return () -- print e
Right newPath -> atomicModifyIORef haddockFilesRef $ \hfs'
-> ((package, newPath) : hfs', ())
-}
Left e -> warn $ tshow e
Right newPath -> atomically
$ modifyTVar sbHaddockFiles
$ insertMap namever newPath
case (eres, pcHaddocks) of
(Left e, ExpectSuccess) -> throwM e
@ -345,7 +346,12 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
warn t = atomically $ modifyTVar sbWarningsVar (. (t:))
updateErrs exc =
updateErrs exc = do
log' $ concat
[ display (piName sbPackageInfo)
, ": "
, tshow exc
]
atomically $ modifyTVar sbErrsVar $ insertMap (piName sbPackageInfo) exc'
where
exc' =