hdocs 0.5.2.0 → 0.5.2.1
raw patch · 2 files changed
+14/−7 lines, 2 filesdep ~basedep ~ghcdep ~haddock-api
Dependency ranges changed: base, ghc, haddock-api
Files
- hdocs.cabal +7/−2
- src/HDocs/Ghc/Compat.hs +7/−5
hdocs.cabal view
@@ -1,5 +1,5 @@ name: hdocs -version: 0.5.2.0 +version: 0.5.2.1 synopsis: Haskell docs tool description: Tool and library to get docs for installed packages and source files. @@ -37,7 +37,12 @@ HDocs.Module other-modules: HDocs.Ghc.Compat - if impl(ghc >= 8.0) + if impl(ghc >= 8.2) && impl(ghc < 8.3) + build-depends: + ghc >= 8.2 && < 8.3, + haddock-api >= 2.18.0 && < 2.19.0, + haddock-library == 1.4.* + if impl(ghc >= 8.0) && impl(ghc < 8.2) build-depends: ghc >= 8.0.0, haddock-api >= 2.17.0 && < 2.18.0,
src/HDocs/Ghc/Compat.hs view
@@ -13,13 +13,13 @@ #endif pkgDatabase :: GHC.DynFlags -> Maybe [GHC.PackageConfig] -#if __GLASGOW_HASKELL__ == 800 +#if __GLASGOW_HASKELL__ >= 800 pkgDatabase = fmap (concatMap snd) . GHC.pkgDatabase #elif __GLASGOW_HASKELL__ == 710 pkgDatabase = GHC.pkgDatabase #endif -#if __GLASGOW_HASKELL__ == 800 +#if __GLASGOW_HASKELL__ >= 800 cleanupHandler :: GHC.DynFlags -> m a -> m a cleanupHandler _ = id #elif __GLASGOW_HASKELL__ == 710 @@ -27,21 +27,23 @@ cleanupHandler = GHC.defaultCleanupHandler #endif -#if __GLASGOW_HASKELL__ == 800 +#if __GLASGOW_HASKELL__ >= 800 type UnitId = Module.UnitId #elif __GLASGOW_HASKELL__ == 710 type UnitId = Module.PackageKey #endif unitId :: GHC.PackageConfig -> UnitId -#if __GLASGOW_HASKELL__ == 800 +#if __GLASGOW_HASKELL__ == 802 +unitId = GHC.packageConfigId +#elif __GLASGOW_HASKELL__ == 800 unitId = GHC.unitId #elif __GLASGOW_HASKELL__ == 710 unitId = GHC.packageKey #endif moduleUnitId :: Module.Module -> UnitId -#if __GLASGOW_HASKELL__ == 800 +#if __GLASGOW_HASKELL__ >= 800 moduleUnitId = Module.moduleUnitId #elif __GLASGOW_HASKELL__ == 710 moduleUnitId = Module.modulePackageKey