diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2018-10-16 15:10:39 -0700 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2018-10-16 15:14:48 -0700 |
commit | 8d27cc1b185dc36424c4e6dfe5c55c6a25c05028 (patch) | |
tree | 9aab1f2c94d39867dd9a036adf808b3d2110aa0e /haddock-api/src/Haddock.hs | |
parent | b5372b7d86e3058b419076641dd3048258c4ddf2 (diff) | |
parent | 41d9846754cdccb82e667ece2f44725ed9cab4e7 (diff) |
Merge branch 'ghc-8.6' into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock.hs')
-rw-r--r-- | haddock-api/src/Haddock.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs index d294b612..8c0ae705 100644 --- a/haddock-api/src/Haddock.hs +++ b/haddock-api/src/Haddock.hs @@ -48,6 +48,7 @@ import Control.Exception import Data.Maybe import Data.IORef import Data.Map (Map) +import Data.Version (makeVersion) import qualified Data.Map as Map import System.IO import System.Exit @@ -373,9 +374,13 @@ render dflags flags sinceQual qual ifaces installedIfaces extSrcMap = do -- might want to fix that if/when these two get some work on them when (Flag_Hoogle `elem` flags) $ do case pkgNameVer of - (Just (PackageName pkgNameFS), Just pkgVer) -> - let pkgNameStr | unpackFS pkgNameFS == "main" && title /= [] = title - | otherwise = unpackFS pkgNameFS + (Just (PackageName pkgNameFS), mpkgVer) -> + let + pkgNameStr | unpackFS pkgNameFS == "main" && title /= [] = title + | otherwise = unpackFS pkgNameFS + + pkgVer = + fromMaybe (makeVersion []) mpkgVer in ppHoogle dflags' pkgNameStr pkgVer title (fmap _doc prologue) visibleIfaces odir _ -> putStrLn . unlines $ |