aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-03-18 12:13:59 +0100
committerSylvain Henry <sylvain@haskus.fr>2020-03-20 09:34:39 +0100
commit3c2944c037263b426c4fe60a3424c27b852ea71c (patch)
tree944a7dec27a49eb9d24d58c743007cc47121e44f /haddock-api
parent3174ad334c2c505394703ce96fcb67ace94a427c (diff)
Modules: Types
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Hoogle.hs4
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker.hs6
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs4
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs8
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs6
-rw-r--r--haddock-api/src/Haddock/Backends/LaTeX.hs8
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Decl.hs6
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Layout.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Names.hs4
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Utils.hs6
-rw-r--r--haddock-api/src/Haddock/Convert.hs16
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs20
-rw-r--r--haddock-api/src/Haddock/Interface.hs8
-rw-r--r--haddock-api/src/Haddock/Interface/AttachInstances.hs10
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs20
-rw-r--r--haddock-api/src/Haddock/Interface/Json.hs6
-rw-r--r--haddock-api/src/Haddock/Interface/LexParseRn.hs6
-rw-r--r--haddock-api/src/Haddock/Interface/ParseModuleHeader.hs2
-rw-r--r--haddock-api/src/Haddock/Interface/Rename.hs4
-rw-r--r--haddock-api/src/Haddock/Interface/Specialize.hs2
-rw-r--r--haddock-api/src/Haddock/InterfaceFile.hs10
-rw-r--r--haddock-api/src/Haddock/ModuleTree.hs4
-rw-r--r--haddock-api/src/Haddock/Parser.hs4
-rw-r--r--haddock-api/src/Haddock/Types.hs4
-rw-r--r--haddock-api/src/Haddock/Utils.hs4
28 files changed, 90 insertions, 90 deletions
diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs
index 3c8f05c9..0bdd4b2c 100644
--- a/haddock-api/src/Haddock.hs
+++ b/haddock-api/src/Haddock.hs
@@ -71,7 +71,7 @@ import GHC.Driver.Session hiding (projectVersion, verbosity)
import ErrUtils
import GHC.Driver.Packages
import Panic (handleGhcException)
-import Module
+import GHC.Types.Module
import FastString
import qualified GHC.Runtime.Loader
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs
index c127235c..93ca4cfd 100644
--- a/haddock-api/src/Haddock/Backends/Hoogle.hs
+++ b/haddock-api/src/Haddock/Backends/Hoogle.hs
@@ -17,7 +17,7 @@ module Haddock.Backends.Hoogle (
ppHoogle
) where
-import BasicTypes ( OverlapFlag(..), OverlapMode(..), SourceText(..)
+import GHC.Types.Basic ( OverlapFlag(..), OverlapMode(..), SourceText(..)
, PromotionFlag(..), TopLevelFlag(..) )
import GHC.Core.InstEnv (ClsInst(..))
import Documentation.Haddock.Markup
@@ -27,7 +27,7 @@ import Haddock.Utils hiding (out)
import GHC
import Outputable
-import NameSet
+import GHC.Types.Name.Set
import Data.Char
import Data.List
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker.hs b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
index 6d5b5b5d..8e0e4d54 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
@@ -22,9 +22,9 @@ import GHC.Iface.Ext.Types ( HieFile(..), HieASTs(..) )
import GHC.Iface.Ext.Binary ( readHieFile, hie_file_result)
import Data.Map as M
import FastString ( mkFastString )
-import Module ( Module, moduleName )
-import NameCache ( initNameCache )
-import UniqSupply ( mkSplitUniqSupply )
+import GHC.Types.Module ( Module, moduleName )
+import GHC.Types.Name.Cache ( initNameCache )
+import GHC.Types.Unique.Supply ( mkSplitUniqSupply )
-- | Generate hyperlinked source for given interfaces.
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
index af7662f1..82d15d62 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
@@ -9,7 +9,7 @@ import Data.List ( isPrefixOf, isSuffixOf )
import qualified Data.ByteString as BS
-import BasicTypes ( IntegralLit(..) )
+import GHC.Types.Basic ( IntegralLit(..) )
import GHC.Driver.Session
import ErrUtils ( emptyMessages, pprLocErrMsg )
import FastString ( mkFastString )
@@ -17,7 +17,7 @@ import Lexer ( P(..), ParseResult(..), PState(..), Token(..)
, mkPStatePure, lexer, mkParserFlags', getErrorMessages, addFatalError )
import Bag ( bagToList )
import Outputable ( showSDoc, panic, text, ($$) )
-import SrcLoc
+import GHC.Types.SrcLoc
import StringBuffer ( StringBuffer, atEnd )
import Haddock.Backends.Hyperlinker.Types as T
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
index 4f61e09e..a83c935c 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
@@ -13,10 +13,10 @@ import Haddock.Backends.Hyperlinker.Utils
import qualified Data.ByteString as BS
import GHC.Iface.Ext.Types
-import Module ( ModuleName, moduleNameString )
-import Name ( getOccString, isInternalName, Name, nameModule, nameUnique )
-import SrcLoc
-import Unique ( getKey )
+import GHC.Types.Module ( ModuleName, moduleNameString )
+import GHC.Types.Name ( getOccString, isInternalName, Name, nameModule, nameUnique )
+import GHC.Types.SrcLoc
+import GHC.Types.Unique ( getKey )
import Encoding ( utf8DecodeByteString )
import System.FilePath.Posix ((</>))
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
index 7696d072..b3ccf1be 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
@@ -20,9 +20,9 @@ import Haddock.Backends.Xhtml.Utils
import GHC
import GHC.Iface.Ext.Types ( HieAST(..), HieType(..), HieArgs(..), TypeIndex, HieTypeFlat )
import GHC.Iface.Type
-import Name ( getOccFS, getOccString )
-import Outputable ( showSDoc )
-import Var ( VarBndr(..) )
+import GHC.Types.Name ( getOccFS, getOccString )
+import Outputable ( showSDoc )
+import GHC.Types.Var ( VarBndr(..) )
import System.FilePath.Posix ((</>), (<.>))
diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs
index d29c195f..98b13756 100644
--- a/haddock-api/src/Haddock/Backends/LaTeX.hs
+++ b/haddock-api/src/Haddock/Backends/LaTeX.hs
@@ -24,11 +24,11 @@ import Haddock.GhcUtils
import Pretty hiding (Doc, quote)
import qualified Pretty
-import BasicTypes ( PromotionFlag(..) )
+import GHC.Types.Basic ( PromotionFlag(..) )
import GHC
-import OccName
-import Name ( nameOccName )
-import RdrName ( rdrNameOcc )
+import GHC.Types.Name.Occurrence
+import GHC.Types.Name ( nameOccName )
+import GHC.Types.Name.Reader ( rdrNameOcc )
import FastString ( unpackFS )
import Outputable ( panic)
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index 0ab35210..cfbaffc6 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -51,7 +51,7 @@ import Data.Ord ( comparing )
import GHC.Driver.Session (Language(..))
import GHC hiding ( NoLink, moduleInfo,LexicalFixity(..) )
-import Name
+import GHC.Types.Name
--------------------------------------------------------------------------------
-- * Generating HTML documentation
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index dce2366b..97db7b86 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -34,12 +34,12 @@ import qualified Data.Map as Map
import Data.Maybe
import Text.XHtml hiding ( name, title, p, quote )
-import BasicTypes (PromotionFlag(..), isPromoted)
+import GHC.Types.Basic (PromotionFlag(..), isPromoted)
import GHC hiding (LexicalFixity(..))
import GHC.Exts
-import Name
+import GHC.Types.Name
import BooleanFormula
-import RdrName ( rdrNameOcc )
+import GHC.Types.Name.Reader ( rdrNameOcc )
import Outputable ( panic )
-- | Pretty print a declaration
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs b/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
index 09aabc0c..ee90ad68 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
@@ -32,7 +32,7 @@ import Text.XHtml hiding ( name, p, quote )
import Data.Maybe (fromMaybe)
import GHC
-import Name
+import GHC.Types.Name
parHtmlMarkup :: Qualification -> Bool
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
index a3c20aa7..e08bf575 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
@@ -51,7 +51,7 @@ import Data.Maybe (fromMaybe)
import FastString ( unpackFS )
import GHC
-import Name (nameOccName)
+import GHC.Types.Name (nameOccName)
--------------------------------------------------------------------------------
-- * Sections of the document
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Names.hs b/haddock-api/src/Haddock/Backends/Xhtml/Names.hs
index 574045e0..6c5fecee 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Names.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Names.hs
@@ -27,8 +27,8 @@ import qualified Data.Map as M
import qualified Data.List as List
import GHC hiding (LexicalFixity(..))
-import Name
-import RdrName
+import GHC.Types.Name
+import GHC.Types.Name.Reader
import FastString (unpackFS)
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs b/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
index 3e1312d5..56fb63fa 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
@@ -38,9 +38,9 @@ import Data.Maybe
import Text.XHtml hiding ( name, title, p, quote )
import qualified Text.XHtml as XHtml
-import GHC ( SrcSpan(..), srcSpanStartLine, Name )
-import Module ( Module, ModuleName, moduleName, moduleNameString )
-import Name ( getOccString, nameOccName, isValOcc )
+import GHC ( SrcSpan(..), srcSpanStartLine, Name )
+import GHC.Types.Module ( Module, ModuleName, moduleName, moduleNameString )
+import GHC.Types.Name ( getOccString, nameOccName, isValOcc )
-- | Replace placeholder string elements with provided values.
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 011ead00..ac6858c4 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -20,7 +20,7 @@ module Haddock.Convert (
) where
import Bag ( emptyBag )
-import BasicTypes ( TupleSort(..), SourceText(..), LexicalFixity(..)
+import GHC.Types.Basic ( TupleSort(..), SourceText(..), LexicalFixity(..)
, PromotionFlag(..), DefMethSpec(..) )
import GHC.Core.Class
import GHC.Core.Coercion.Axiom
@@ -29,11 +29,11 @@ import Data.Either (lefts, rights)
import GHC.Core.DataCon
import GHC.Core.FamInstEnv
import GHC.Hs
-import Name
-import NameSet ( emptyNameSet )
-import RdrName ( mkVarUnqual )
+import GHC.Types.Name
+import GHC.Types.Name.Set ( emptyNameSet )
+import GHC.Types.Name.Reader ( mkVarUnqual )
import GHC.Core.PatSyn
-import SrcLoc ( Located, noLoc, unLoc, GenLocated(..), srcLocSpan )
+import GHC.Types.SrcLoc ( Located, noLoc, unLoc, GenLocated(..), srcLocSpan )
import TcType
import GHC.Core.TyCon
import GHC.Core.Type
@@ -43,10 +43,10 @@ import TysWiredIn ( eqTyConName, listTyConName, liftedTypeKindTyConName
, unitTy, promotedNilDataCon, promotedConsDataCon )
import PrelNames ( hasKey, eqTyConKey, ipClassKey, tYPETyConKey
, liftedRepDataConKey )
-import Unique ( getUnique )
+import GHC.Types.Unique ( getUnique )
import Util ( chkAppend,dropList, filterByList, filterOut )
-import Var
-import VarSet
+import GHC.Types.Var
+import GHC.Types.Var.Set
import Haddock.Types
import Haddock.Interface.Specialize
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index 75e3fa45..b83920ee 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -26,18 +26,18 @@ import Haddock.Types( DocName, DocNameI )
import Exception
import FV
import Outputable ( Outputable, panic, showPpr )
-import Name
-import NameSet
-import Module
+import GHC.Types.Name
+import GHC.Types.Name.Set
+import GHC.Types.Module
import GHC.Driver.Types
import GHC
import GHC.Core.Class
import GHC.Driver.Session
-import SrcLoc ( advanceSrcLoc )
-import Var ( VarBndr(..), TyVarBinder, tyVarKind, updateTyVarKind,
- isInvisibleArgFlag )
-import VarSet ( VarSet, emptyVarSet )
-import VarEnv ( TyVarEnv, extendVarEnv, elemVarEnv, emptyVarEnv )
+import GHC.Types.SrcLoc ( advanceSrcLoc )
+import GHC.Types.Var ( VarBndr(..), TyVarBinder, tyVarKind, updateTyVarKind,
+ isInvisibleArgFlag )
+import GHC.Types.Var.Set ( VarSet, emptyVarSet )
+import GHC.Types.Var.Env ( TyVarEnv, extendVarEnv, elemVarEnv, emptyVarEnv )
import GHC.Core.TyCo.Rep ( Type(..) )
import GHC.Core.Type ( isRuntimeRepVar )
import TysWiredIn( liftedRepDataConTyCon )
@@ -623,10 +623,10 @@ orderedFVs vs tys =
-- For example, 'tyCoVarsOfTypeList' reports an incorrect order for the type
-- of 'const :: a -> b -> a':
--
--- >>> import Name
+-- >>> import GHC.Types.Name
-- >>> import TyCoRep
-- >>> import TysPrim
--- >>> import Var
+-- >>> import GHC.Types.Var
-- >>> a = TyVarTy alphaTyVar
-- >>> b = TyVarTy betaTyVar
-- >>> constTy = mkFunTys [a, b] a
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs
index 4489bd2a..ef94cf5c 100644
--- a/haddock-api/src/Haddock/Interface.hs
+++ b/haddock-api/src/Haddock/Interface.hs
@@ -50,16 +50,16 @@ import qualified Data.Set as Set
import Distribution.Verbosity
import Text.Printf
-import Module (mkModuleSet, emptyModuleSet, unionModuleSet, ModuleSet)
+import GHC.Types.Module (mkModuleSet, emptyModuleSet, unionModuleSet, ModuleSet)
import Digraph
import GHC.Driver.Session hiding (verbosity)
import GHC hiding (verbosity)
import GHC.Driver.Types
import FastString (unpackFS)
import TcRnTypes (tcg_rdr_env)
-import Name (nameIsFromExternalPackage, nameOccName)
-import OccName (isTcOcc)
-import RdrName (unQualOK, gre_name, globalRdrEnvElts)
+import GHC.Types.Name (nameIsFromExternalPackage, nameOccName)
+import GHC.Types.Name.Occurrence (isTcOcc)
+import GHC.Types.Name.Reader (unQualOK, gre_name, globalRdrEnvElts)
import ErrUtils (withTimingD)
#if defined(mingw32_HOST_OS)
diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs
index 65deffd3..5bec4d34 100644
--- a/haddock-api/src/Haddock/Interface/AttachInstances.hs
+++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs
@@ -34,16 +34,16 @@ import ErrUtils
import GHC.Core.FamInstEnv
import GHC
import GHC.Core.InstEnv
-import Module ( ModuleSet, moduleSetElts )
+import GHC.Types.Module ( ModuleSet, moduleSetElts )
import MonadUtils (liftIO)
-import Name
-import NameEnv
+import GHC.Types.Name
+import GHC.Types.Name.Env
import Outputable (text, sep, (<+>))
-import SrcLoc
+import GHC.Types.SrcLoc
import GHC.Core.TyCon
import GHC.Core.TyCo.Rep
import TysPrim( funTyConName )
-import Var hiding (varName)
+import GHC.Types.Var hiding (varName)
type ExportedNames = Set.Set Name
type Modules = Set.Set Module
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index a606076d..6073f735 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -39,22 +39,22 @@ import Control.Applicative
import Control.Monad
import Data.Traversable
-import Avail hiding (avail)
-import qualified Avail
-import qualified Module
-import qualified SrcLoc
+import GHC.Types.Avail hiding (avail)
+import qualified GHC.Types.Avail as Avail
+import qualified GHC.Types.Module as Module
+import qualified GHC.Types.SrcLoc as SrcLoc
import GHC.Core.ConLike (ConLike(..))
import GHC
import GHC.Driver.Types
-import Name
-import NameSet
-import NameEnv
+import GHC.Types.Name
+import GHC.Types.Name.Set
+import GHC.Types.Name.Env
import GHC.Driver.Packages ( lookupModuleInAllPackages, PackageName(..) )
import Bag
-import RdrName
+import GHC.Types.Name.Reader
import TcRnTypes
import FastString ( unpackFS, bytesFS )
-import BasicTypes ( StringLiteral(..), SourceText(..), PromotionFlag(..) )
+import GHC.Types.Basic ( StringLiteral(..), SourceText(..), PromotionFlag(..) )
import qualified Outputable as O
@@ -869,7 +869,7 @@ availExportItem is_sig modMap thisMod semMod warnings exportedNames
constructor_names =
filter isDataConName (availSubordinates avail)
--- this heavily depends on the invariants stated in Avail
+-- this heavily depends on the invariants stated in GHC.Types.Avail
availExportsDecl :: AvailInfo -> Bool
availExportsDecl (AvailTC ty_name names _)
| n : _ <- names = ty_name == n
diff --git a/haddock-api/src/Haddock/Interface/Json.hs b/haddock-api/src/Haddock/Interface/Json.hs
index 636d3e19..88387edd 100644
--- a/haddock-api/src/Haddock/Interface/Json.hs
+++ b/haddock-api/src/Haddock/Interface/Json.hs
@@ -5,10 +5,10 @@ module Haddock.Interface.Json (
, renderJson
) where
-import BasicTypes
+import GHC.Types.Basic
import Json
-import Module
-import Name
+import GHC.Types.Module
+import GHC.Types.Name
import Outputable
import Control.Arrow
diff --git a/haddock-api/src/Haddock/Interface/LexParseRn.hs b/haddock-api/src/Haddock/Interface/LexParseRn.hs
index 7323e68e..22279614 100644
--- a/haddock-api/src/Haddock/Interface/LexParseRn.hs
+++ b/haddock-api/src/Haddock/Interface/LexParseRn.hs
@@ -19,7 +19,7 @@ module Haddock.Interface.LexParseRn
, processModuleHeader
) where
-import Avail
+import GHC.Types.Avail
import Control.Arrow
import Control.Monad
import Data.List
@@ -31,9 +31,9 @@ import GHC
import Haddock.Interface.ParseModuleHeader
import Haddock.Parser
import Haddock.Types
-import Name
+import GHC.Types.Name
import Outputable ( showPpr, showSDoc )
-import RdrName
+import GHC.Types.Name.Reader
import EnumSet
import GHC.Rename.Env (dataTcOccs)
diff --git a/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs b/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs
index 4e91e321..611d8b6f 100644
--- a/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs
+++ b/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs
@@ -16,7 +16,7 @@ import Data.Char
import GHC.Driver.Session
import Haddock.Parser
import Haddock.Types
-import RdrName
+import GHC.Types.Name.Reader
-- -----------------------------------------------------------------------------
-- Parsing module headers
diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs
index 5b96c0a0..47aeb31a 100644
--- a/haddock-api/src/Haddock/Interface/Rename.hs
+++ b/haddock-api/src/Haddock/Interface/Rename.hs
@@ -21,9 +21,9 @@ import Haddock.Types
import Bag (emptyBag)
import GHC hiding (NoLink)
-import Name
+import GHC.Types.Name
import Outputable ( panic )
-import RdrName (RdrName(Exact))
+import GHC.Types.Name.Reader (RdrName(Exact))
import TysWiredIn (eqTyCon_RDR)
import Control.Applicative
diff --git a/haddock-api/src/Haddock/Interface/Specialize.hs b/haddock-api/src/Haddock/Interface/Specialize.hs
index 03cc1b7e..92ad33d3 100644
--- a/haddock-api/src/Haddock/Interface/Specialize.hs
+++ b/haddock-api/src/Haddock/Interface/Specialize.hs
@@ -13,7 +13,7 @@ import Haddock.Syb
import Haddock.Types
import GHC
-import Name
+import GHC.Types.Name
import FastString
import TysPrim ( funTyConName )
import TysWiredIn ( listTyConName )
diff --git a/haddock-api/src/Haddock/InterfaceFile.hs b/haddock-api/src/Haddock/InterfaceFile.hs
index be9f4293..2e841fad 100644
--- a/haddock-api/src/Haddock/InterfaceFile.hs
+++ b/haddock-api/src/Haddock/InterfaceFile.hs
@@ -38,12 +38,12 @@ import FastString
import GHC hiding (NoLink)
import GHC.Driver.Monad (withSession)
import GHC.Driver.Types
-import NameCache
+import GHC.Types.Name.Cache
import GHC.Iface.Env
-import Name
-import UniqFM
-import UniqSupply
-import Unique
+import GHC.Types.Name
+import GHC.Types.Unique.FM
+import GHC.Types.Unique.Supply
+import GHC.Types.Unique
data InterfaceFile = InterfaceFile {
diff --git a/haddock-api/src/Haddock/ModuleTree.hs b/haddock-api/src/Haddock/ModuleTree.hs
index 6a3f0606..598e3f9a 100644
--- a/haddock-api/src/Haddock/ModuleTree.hs
+++ b/haddock-api/src/Haddock/ModuleTree.hs
@@ -14,8 +14,8 @@ module Haddock.ModuleTree ( ModuleTree(..), mkModuleTree ) where
import Haddock.Types ( MDoc )
-import GHC ( Name )
-import Module ( Module, moduleNameString, moduleName, moduleUnitId, unitIdString )
+import GHC ( Name )
+import GHC.Types.Module ( Module, moduleNameString, moduleName, moduleUnitId, unitIdString )
import GHC.Driver.Session ( DynFlags )
import GHC.Driver.Packages ( lookupUnit, sourcePackageIdString )
diff --git a/haddock-api/src/Haddock/Parser.hs b/haddock-api/src/Haddock/Parser.hs
index 3fb7eedd..f9bb445c 100644
--- a/haddock-api/src/Haddock/Parser.hs
+++ b/haddock-api/src/Haddock/Parser.hs
@@ -20,8 +20,8 @@ import GHC.Driver.Session ( DynFlags )
import FastString ( fsLit )
import Lexer ( mkPState, unP, ParseResult(POk) )
import Parser ( parseIdentifier )
-import RdrName ( RdrName )
-import SrcLoc ( mkRealSrcLoc, unLoc )
+import GHC.Types.Name.Reader ( RdrName )
+import GHC.Types.SrcLoc ( mkRealSrcLoc, unLoc )
import StringBuffer ( stringToStringBuffer )
parseParas :: DynFlags -> Maybe Package -> String -> MetaDoc mod RdrName
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index 2c46e14a..f30071b7 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -36,12 +36,12 @@ import Data.Typeable (Typeable)
import Data.Map (Map)
import Data.Data (Data)
import Documentation.Haddock.Types
-import BasicTypes (Fixity(..), PromotionFlag(..))
+import GHC.Types.Basic (Fixity(..), PromotionFlag(..))
import GHC
import GHC.Driver.Session (Language)
import qualified GHC.LanguageExtensions as LangExt
-import OccName
+import GHC.Types.Name.Occurrence
import Outputable
-----------------------------------------------------------------------------
diff --git a/haddock-api/src/Haddock/Utils.hs b/haddock-api/src/Haddock/Utils.hs
index 4e543b9a..a71c7504 100644
--- a/haddock-api/src/Haddock/Utils.hs
+++ b/haddock-api/src/Haddock/Utils.hs
@@ -61,10 +61,10 @@ import Documentation.Haddock.Doc (emptyMetaDoc)
import Haddock.Types
import Haddock.GhcUtils
-import BasicTypes ( PromotionFlag(..) )
+import GHC.Types.Basic ( PromotionFlag(..) )
import Exception (ExceptionMonad)
import GHC
-import Name
+import GHC.Types.Name
import Outputable ( panic )
import Control.Monad ( liftM )