aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Utils/GHC.hs
diff options
context:
space:
mode:
authorDavid Waern <unknown>2007-08-16 16:48:55 +0000
committerDavid Waern <unknown>2007-08-16 16:48:55 +0000
commitfe4e174edc080f0e288eb51adaec732e4102408f (patch)
tree1161623146f98427725d59134f1020c55900b139 /src/Haddock/Utils/GHC.hs
parent1be867d0a2e2d5982b7c97964e171e6a37da1abb (diff)
Finalize support for links to other packages
Diffstat (limited to 'src/Haddock/Utils/GHC.hs')
-rw-r--r--src/Haddock/Utils/GHC.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Haddock/Utils/GHC.hs b/src/Haddock/Utils/GHC.hs
index b6fb54d4..4799734e 100644
--- a/src/Haddock/Utils/GHC.hs
+++ b/src/Haddock/Utils/GHC.hs
@@ -7,6 +7,9 @@ import HsSyn
import SrcLoc
import HscTypes
import Outputable
+import Packages
+import UniqFM
+import Name
getMainDeclBinder :: HsDecl name -> Maybe name
getMainDeclBinder (TyClD d) = Just (tcdName d)
@@ -24,3 +27,13 @@ getMainDeclBinder _ = Nothing
--modInfoMod = mi_module . minf_iface
trace_ppr x y = trace (showSDoc (ppr x)) y
+
+-- names
+
+nameSetMod n newMod =
+ mkExternalName (nameUnique n) newMod (nameOccName n) (nameSrcSpan n)
+
+nameSetPkg pkgId n =
+ mkExternalName (nameUnique n) (mkModule pkgId (moduleName mod))
+ (nameOccName n) (nameSrcSpan n)
+ where mod = nameModule n