aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Options.hs
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-11-09 08:13:35 -0800
committerAlec Theriault <alec.theriault@gmail.com>2018-11-09 08:13:35 -0800
commite44f4637472ebcd818089e96338e0b4705b4f649 (patch)
tree1b894bc2df3421c421e4a845c6ad72c821ac2b03 /haddock-api/src/Haddock/Options.hs
parent63abb6c197ae513eac6d171c589b129feb004413 (diff)
parent8a491e437f1c8379b66a420f8584c1761b45aa7e (diff)
Merge branch 'ghc-8.6' into wip/new-ocean
Diffstat (limited to 'haddock-api/src/Haddock/Options.hs')
-rw-r--r--haddock-api/src/Haddock/Options.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Options.hs b/haddock-api/src/Haddock/Options.hs
index b5e987d8..bdc98406 100644
--- a/haddock-api/src/Haddock/Options.hs
+++ b/haddock-api/src/Haddock/Options.hs
@@ -371,9 +371,10 @@ modulePackageInfo :: DynFlags
-> [Flag] -- ^ Haddock flags are checked as they may contain
-- the package name or version provided by the user
-- which we prioritise
- -> Module
+ -> Maybe Module
-> (Maybe PackageName, Maybe Data.Version.Version)
-modulePackageInfo dflags flags modu =
+modulePackageInfo _dflags _flags Nothing = (Nothing, Nothing)
+modulePackageInfo dflags flags (Just modu) =
( optPackageName flags <|> fmap packageName pkgDb
, optPackageVersion flags <|> fmap packageVersion pkgDb
)