diff options
author | Hécate Moonlight <hecate+github@glitchbra.in> | 2021-02-22 11:53:07 +0100 |
---|---|---|
committer | Hécate Moonlight <hecate+github@glitchbra.in> | 2021-02-22 11:53:07 +0100 |
commit | af46d073aa254bdede248fa8d2f5deb412968317 (patch) | |
tree | 11a344ef98d7f0b8f51ba7297bc6e574bebcbbef | |
parent | a82ad674def0e62218076d91ea24ad978ccfed9f (diff) |
Clean-up of Interface and Interface.Create's imports and pragmata
-rw-r--r-- | haddock-api/src/Haddock/Interface.hs | 23 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 51 |
2 files changed, 41 insertions, 33 deletions
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs index 7cc76953..74dbc9c7 100644 --- a/haddock-api/src/Haddock/Interface.hs +++ b/haddock-api/src/Haddock/Interface.hs @@ -51,26 +51,25 @@ import qualified Data.Map as Map import qualified Data.Set as Set import Text.Printf -import GHC.Unit.Module.Env (mkModuleSet, emptyModuleSet, unionModuleSet, ModuleSet) -import GHC.Unit.Module.ModSummary -import GHC.Unit.Module.Graph -import GHC.Unit.Types -import GHC.Data.Graph.Directed -import GHC.Driver.Session hiding (verbosity) import GHC hiding (verbosity) +import GHC.Data.FastString (unpackFS) +import GHC.Data.Graph.Directed import GHC.Driver.Env import GHC.Driver.Monad -import GHC.Data.FastString (unpackFS) -import GHC.Utils.Error +import GHC.Driver.Session hiding (verbosity) +import GHC.HsToCore.Docs +import GHC.Plugins (Outputable, StaticPlugin(..), Plugin(..), PluginWithArgs(..), defaultPlugin, keepRenamedSource) import GHC.Tc.Types (TcM, TcGblEnv(..)) -import GHC.Tc.Utils.Monad (getTopEnv, setGblEnv) import GHC.Tc.Utils.Env (tcLookupGlobal) +import GHC.Tc.Utils.Monad (getTopEnv, setGblEnv) import GHC.Types.Name (nameIsFromExternalPackage, nameOccName) import GHC.Types.Name.Occurrence (isTcOcc) import GHC.Types.Name.Reader (unQualOK, greMangledName, globalRdrEnvElts) -import GHC.HsToCore.Docs -import GHC.Plugins (Outputable, StaticPlugin(..), Plugin(..), PluginWithArgs(..), - defaultPlugin, keepRenamedSource) +import GHC.Unit.Module.Env (mkModuleSet, emptyModuleSet, unionModuleSet, ModuleSet) +import GHC.Unit.Module.Graph +import GHC.Unit.Module.ModSummary +import GHC.Unit.Types +import GHC.Utils.Error #if defined(mingw32_HOST_OS) import System.IO diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index c0b9fd46..a921342e 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -1,8 +1,17 @@ -{-# LANGUAGE StandaloneDeriving, FlexibleInstances, MultiParamTypeClasses, CPP, TupleSections, BangPatterns, LambdaCase, NamedFieldPuns, ScopedTypeVariables, RecordWildCards #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE ViewPatterns #-} +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE CPP #-} {-# LANGUAGE DerivingStrategies #-} +{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE TupleSections #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -Wwarn #-} ----------------------------------------------------------------------------- -- | @@ -38,33 +47,33 @@ import Data.Map (Map) import Data.List (foldl', find) import Data.Maybe import Data.Traversable -import GHC.Stack -import GHC.Tc.Utils.Monad (finalSafeMode) -import GHC.Types.Avail hiding (avail) -import qualified GHC.Types.Avail as Avail -import qualified GHC.Unit.Module as Module -import GHC.Unit.Module.ModSummary -import qualified GHC.Types.SrcLoc as SrcLoc -import GHC.Types.SourceFile -import GHC.Core.Class -import GHC.Core.ConLike (ConLike(..)) +import GHC.Stack import GHC hiding (lookupName) +import GHC.Core.Class +import GHC.Core.ConLike (ConLike (..)) +import GHC.Data.FastString (bytesFS, unpackFS) import GHC.Driver.Ppr +import GHC.HsToCore.Docs hiding (mkMaps) +import GHC.Parser.Annotation (IsUnicodeSyntax (..)) +import GHC.Tc.Types hiding (IfM) +import GHC.Tc.Utils.Monad (finalSafeMode) +import GHC.Types.Avail hiding (avail) +import qualified GHC.Types.Avail as Avail +import GHC.Types.Basic (PromotionFlag (..)) import GHC.Types.Name -import GHC.Types.Name.Set import GHC.Types.Name.Env -import GHC.Unit.State import GHC.Types.Name.Reader -import GHC.Tc.Types hiding (IfM) -import GHC.Data.FastString ( unpackFS, bytesFS ) -import GHC.Types.Basic ( PromotionFlag(..) ) +import GHC.Types.Name.Set +import GHC.Types.SourceFile import GHC.Types.SourceText +import qualified GHC.Types.SrcLoc as SrcLoc +import qualified GHC.Unit.Module as Module +import GHC.Unit.Module.ModSummary +import GHC.Unit.Module.Warnings +import GHC.Unit.State import qualified GHC.Utils.Outputable as O import GHC.Utils.Panic -import GHC.HsToCore.Docs hiding (mkMaps) -import GHC.Parser.Annotation (IsUnicodeSyntax(..)) -import GHC.Unit.Module.Warnings newtype IfEnv m = IfEnv { |