diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2018-12-12 08:34:57 -0800 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2018-12-12 08:42:09 -0800 |
commit | d66a17f3d7552ccd82b5b4b491013f9ac9498966 (patch) | |
tree | 76a65bf920e126674b82fde59da94f6a52f43355 /haddock-api/src | |
parent | 6414b46e1ac8b63cad20d662311788a80e3b29bb (diff) |
Fix warnings, accept output
* remove redundant imports (only brought to light due to recent work for
improving redundant import detection)
* fix a bug that was casuing exports to appear in reverse order
* fix something in haddock-library that prevented compilation on old GHC's
Diffstat (limited to 'haddock-api/src')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hoogle.hs | 1 | ||||
-rw-r--r-- | haddock-api/src/Haddock/GhcUtils.hs | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Interface.hs | 1 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 3 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Types.hs | 1 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Utils.hs | 1 |
6 files changed, 1 insertions, 8 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs index 545d4a88..b3b46a47 100644 --- a/haddock-api/src/Haddock/Backends/Hoogle.hs +++ b/haddock-api/src/Haddock/Backends/Hoogle.hs @@ -25,7 +25,6 @@ import Haddock.GhcUtils import Haddock.Types hiding (Version) import Haddock.Utils hiding (out) -import HsBinds (emptyLHsBinds) import GHC import Outputable import NameSet diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs index cfb91f93..1acfb25b 100644 --- a/haddock-api/src/Haddock/GhcUtils.hs +++ b/haddock-api/src/Haddock/GhcUtils.hs @@ -32,8 +32,6 @@ import GHC import Class import DynFlags -import HsTypes (HsType(..)) - moduleString :: Module -> String moduleString = moduleNameString . moduleName diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs index 759d5d03..8bfc249c 100644 --- a/haddock-api/src/Haddock/Interface.hs +++ b/haddock-api/src/Haddock/Interface.hs @@ -58,7 +58,6 @@ import Exception import GHC hiding (verbosity) import HscTypes import FastString (unpackFS) -import MonadUtils (liftIO) import TcRnTypes (tcg_rdr_env) import Name (nameIsFromExternalPackage, nameOccName) import OccName (isTcOcc) diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 654eb8c0..ea50cba9 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -61,7 +61,6 @@ import TcRnTypes import FastString ( unpackFS, fastStringToByteString) import BasicTypes ( StringLiteral(..), SourceText(..), PromotionFlag(..) ) import qualified Outputable as O -import HsDecls ( getConArgs ) -- | Use a 'TypecheckedModule' to produce an 'Interface'. @@ -117,7 +116,7 @@ createInterface tm flags modMap instIfaceMap = do let declsWithDocs = topDecls group_ - exports0 = fmap (reverse . map (first unLoc)) mayExports + exports0 = fmap (map (first unLoc)) mayExports exports | OptIgnoreExports `elem` opts = Nothing | otherwise = exports0 diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs index 7b3c90a2..c1b8328d 100644 --- a/haddock-api/src/Haddock/Types.hs +++ b/haddock-api/src/Haddock/Types.hs @@ -42,7 +42,6 @@ import DynFlags (Language) import qualified GHC.LanguageExtensions as LangExt import OccName import Outputable -import Control.Applicative (Applicative(..)) import Control.Monad (ap) import Haddock.Backends.Hyperlinker.Types diff --git a/haddock-api/src/Haddock/Utils.hs b/haddock-api/src/Haddock/Utils.hs index f8016e4d..49a82717 100644 --- a/haddock-api/src/Haddock/Utils.hs +++ b/haddock-api/src/Haddock/Utils.hs @@ -64,7 +64,6 @@ import Haddock.GhcUtils import BasicTypes ( PromotionFlag(..) ) import GHC import Name -import HsTypes (extFieldOcc) import Outputable ( panic ) import Control.Monad ( liftM ) |