diff options
-rw-r--r-- | cabal.project | 21 | ||||
-rw-r--r-- | src/HaskellCodeExplorer/GhcUtils.hs | 8 |
2 files changed, 28 insertions, 1 deletions
diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..34e7a84 --- /dev/null +++ b/cabal.project @@ -0,0 +1,21 @@ +-- These are project-fixed settings and should not contain developer specific settings. +-- +-- Developer specific settings can be configured in cabal.project.local (e.g. optimization level) +-- either manually or through 'cabal new-configure'. +-- +-- Refer to the documentation: https://cabal.readthedocs.io/en/latest/nix-local-build.html#cabal-new-configure +-- https://cabal.readthedocs.io/en/latest/nix-local-build.html#configuring-builds-with-cabal-project +-- +-- A common config might be: +-- -- all local packages +-- optimization: 0 +-- +-- -- always build dependencies with highest optimization +-- package * +-- optimization: 2 + +with-compiler: ghc-8.4.4 + +packages: . + vendor/cabal-helper-0.8.1.2 + diff --git a/src/HaskellCodeExplorer/GhcUtils.hs b/src/HaskellCodeExplorer/GhcUtils.hs index 33370d5..3a4ec26 100644 --- a/src/HaskellCodeExplorer/GhcUtils.hs +++ b/src/HaskellCodeExplorer/GhcUtils.hs @@ -1110,7 +1110,13 @@ hsDocsToDocH :: DynFlags -> GlobalRdrEnv -> [HsDocString] -> Doc Name hsDocsToDocH flags rdrEnv = rename flags rdrEnv . overIdentifier (parseIdent flags) . - _doc . parseParas . concatMap (unpackFS . (\(HsDocString s) -> s)) + _doc +#if MIN_VERSION_haddock_library(1,6,0) + . parseParas Nothing +#else + . parseParas +#endif + . concatMap (unpackFS . (\(HsDocString s) -> s)) parseIdent :: DynFlags -> String -> Maybe RdrName parseIdent dflags str0 = |