diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2018-11-10 16:02:13 -0800 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2018-11-10 16:02:13 -0800 |
commit | 959033d592b41235896402a64703650df77c34bd (patch) | |
tree | 352d1c64c354017adc5b7c3c6aa7aa7fd95e1bf6 /haddock-api/src/Haddock/Options.hs | |
parent | b62c9542480d629bb482f5394dec2fdd5a48af24 (diff) | |
parent | f4d53a159642aa9182241259709659e7074425d5 (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.hs | 5 |
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 ) |