aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-04-29 12:36:37 -0400
committerGitHub <noreply@github.com>2020-04-29 12:36:37 -0400
commit66faa532d4e3d93e87c5b042bef82d631dc74eb5 (patch)
tree971e9594725d0c6c798161aaee22054b9c696356 /haddock-api/src/Haddock/Backends
parent7c34f89d801bafba3162bc091dd486cbb9e9fd5b (diff)
parenta61dbdb0a7420e15e978bce6c09de1ce99290f44 (diff)
Merge pull request #1183 from hsyl20/wip/hsyl20/unitid
Refactoring of Unit code
Diffstat (limited to 'haddock-api/src/Haddock/Backends')
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Layout.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Types.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Utils.hs2
5 files changed, 5 insertions, 5 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker.hs b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
index fb238995..7b66c566 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
@@ -22,7 +22,7 @@ import GHC.Iface.Ext.Types ( HieFile(..), HieASTs(..) )
import GHC.Iface.Ext.Binary ( readHieFile, hie_file_result)
import Data.Map as M
import GHC.Data.FastString ( mkFastString )
-import GHC.Types.Module ( Module, moduleName )
+import GHC.Unit.Module ( Module, moduleName )
import GHC.Types.Name.Cache ( initNameCache )
import GHC.Types.Unique.Supply ( mkSplitUniqSupply )
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
index a6134cd2..e01d7114 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
@@ -13,7 +13,7 @@ import Haddock.Backends.Hyperlinker.Utils
import qualified Data.ByteString as BS
import GHC.Iface.Ext.Types
-import GHC.Types.Module ( ModuleName, moduleNameString )
+import GHC.Unit.Module ( ModuleName, moduleNameString )
import GHC.Types.Name ( getOccString, isInternalName, Name, nameModule, nameUnique )
import GHC.Types.SrcLoc
import GHC.Types.Unique ( getKey )
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
index 21d544cd..dd8b0b18 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
@@ -306,7 +306,7 @@ links ((_,_,sourceMap,lineMap), (_,_,maybe_wiki_url)) loc splice mdl' docName@(D
-- 'mdl'' is a way of "overriding" the module. Without it, instances
-- will point to the module defining the class/family, which is wrong.
origMod = fromMaybe (nameModule n) mdl'
- origPkg = moduleUnitId origMod
+ origPkg = moduleUnit origMod
fname = case loc of
RealSrcSpan l _ -> unpackFS (srcSpanFile l)
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Types.hs b/haddock-api/src/Haddock/Backends/Xhtml/Types.hs
index d1561791..e3fd2d5a 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Types.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Types.hs
@@ -23,7 +23,7 @@ import GHC
-- the base, module and entity URLs for the source code and wiki links.
-type SourceURLs = (Maybe FilePath, Maybe FilePath, Map UnitId FilePath, Map UnitId FilePath)
+type SourceURLs = (Maybe FilePath, Maybe FilePath, Map Unit FilePath, Map Unit FilePath)
type WikiURLs = (Maybe FilePath, Maybe FilePath, Maybe FilePath)
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs b/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
index 56fb63fa..f5f64f51 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
@@ -39,7 +39,7 @@ import Text.XHtml hiding ( name, title, p, quote )
import qualified Text.XHtml as XHtml
import GHC ( SrcSpan(..), srcSpanStartLine, Name )
-import GHC.Types.Module ( Module, ModuleName, moduleName, moduleNameString )
+import GHC.Unit.Module ( Module, ModuleName, moduleName, moduleNameString )
import GHC.Types.Name ( getOccString, nameOccName, isValOcc )