Fix build with haddock-library >= 1.6.0

This commit is contained in:
Julian Ospald 2018-11-13 18:03:53 +08:00
parent 67d0714dc3
commit 37f1d35347
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -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 =