aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Options.hs
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-11-10 16:02:13 -0800
committerAlec Theriault <alec.theriault@gmail.com>2018-11-10 16:02:13 -0800
commit959033d592b41235896402a64703650df77c34bd (patch)
tree352d1c64c354017adc5b7c3c6aa7aa7fd95e1bf6 /haddock-api/src/Haddock/Options.hs
parentb62c9542480d629bb482f5394dec2fdd5a48af24 (diff)
parentf4d53a159642aa9182241259709659e7074425d5 (diff)
Merge branch 'ghc-8.6' into ghc-head
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 46db572b..e314bbd0 100644
--- a/haddock-api/src/Haddock/Options.hs
+++ b/haddock-api/src/Haddock/Options.hs
@@ -374,9 +374,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
)