summaryrefslogtreecommitdiff
path: root/compiler/GHC/Unit
diff options
context:
space:
mode:
authorTakenobu Tani <takenobu.hs@gmail.com>2020-06-09 22:59:05 +0900
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-25 03:54:44 -0400
commit1eb997a84669f158de9dd16a9e54d279cec22293 (patch)
tree0c917f73815f01bdb4a3055f6eb173429160a723 /compiler/GHC/Unit
parentc7dd6da7e066872a949be7c914cc700182307cd2 (diff)
downloadhaskell-1eb997a84669f158de9dd16a9e54d279cec22293.tar.gz
Clean up haddock hyperlinks of GHC.* (part2)
This updates haddock comments only. This patch focuses to update for hyperlinks in GHC API's haddock comments, because broken links especially discourage newcomers. This includes the following hierarchies: - GHC.Iface.* - GHC.Llvm.* - GHC.Rename.* - GHC.Tc.* - GHC.HsToCore.* - GHC.StgToCmm.* - GHC.CmmToAsm.* - GHC.Runtime.* - GHC.Unit.* - GHC.Utils.* - GHC.SysTools.*
Diffstat (limited to 'compiler/GHC/Unit')
-rw-r--r--compiler/GHC/Unit/Info.hs2
-rw-r--r--compiler/GHC/Unit/State.hs20
2 files changed, 11 insertions, 11 deletions
diff --git a/compiler/GHC/Unit/Info.hs b/compiler/GHC/Unit/Info.hs
index b99a9327dc..ee51086e13 100644
--- a/compiler/GHC/Unit/Info.hs
+++ b/compiler/GHC/Unit/Info.hs
@@ -43,7 +43,7 @@ import GHC.Unit.Ppr
-- * UnitId: identifier used to generate code (cf 'UnitInfo')
--
-- These two identifiers are different for wired-in packages. See Note [About
--- Units] in GHC.Unit
+-- Units] in "GHC.Unit"
type GenUnitInfo unit = GenericUnitInfo (Indefinite unit) PackageId PackageName unit ModuleName (GenModule (GenUnit unit))
-- | A unit key in the database
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs
index aa1318ad5d..5413990b81 100644
--- a/compiler/GHC/Unit/State.hs
+++ b/compiler/GHC/Unit/State.hs
@@ -124,11 +124,11 @@ import qualified Data.Set as Set
-- The unit state is computed by 'initUnits', and kept in DynFlags.
-- It is influenced by various command-line flags:
--
--- * @-package <pkg>@ and @-package-id <pkg>@ cause @<pkg>@ to become exposed.
+-- * @-package \<pkg>@ and @-package-id \<pkg>@ cause @\<pkg>@ to become exposed.
-- If @-hide-all-packages@ was not specified, these commands also cause
-- all other packages with the same name to become hidden.
--
--- * @-hide-package <pkg>@ causes @<pkg>@ to become hidden.
+-- * @-hide-package \<pkg>@ causes @\<pkg>@ to become hidden.
--
-- * (there are a few more flags, check below for their semantics)
--
@@ -431,9 +431,9 @@ data UnitState = UnitState {
-- | A map saying, for each requirement, what interfaces must be merged
-- together when we use them. For example, if our dependencies
- -- are @p[A=<A>]@ and @q[A=<A>,B=r[C=<A>]:B]@, then the interfaces
- -- to merge for A are @p[A=<A>]:A@, @q[A=<A>,B=r[C=<A>]:B]:A@
- -- and @r[C=<A>]:C@.
+ -- are @p[A=\<A>]@ and @q[A=\<A>,B=r[C=\<A>]:B]@, then the interfaces
+ -- to merge for A are @p[A=\<A>]:A@, @q[A=\<A>,B=r[C=\<A>]:B]:A@
+ -- and @r[C=\<A>]:C@.
--
-- There's an entry in this map for each hole in our home library.
requirementContext :: Map ModuleName [InstantiatedModule],
@@ -2215,20 +2215,20 @@ type ShHoleSubst = ModuleNameEnv Module
-- | Substitutes holes in a 'Module'. NOT suitable for being called
-- directly on a 'nameModule', see Note [Representation of module/name variable].
--- @p[A=<A>]:B@ maps to @p[A=q():A]:B@ with @A=q():A@;
--- similarly, @<A>@ maps to @q():A@.
+-- @p[A=\<A>]:B@ maps to @p[A=q():A]:B@ with @A=q():A@;
+-- similarly, @\<A>@ maps to @q():A@.
renameHoleModule :: UnitState -> ShHoleSubst -> Module -> Module
renameHoleModule state = renameHoleModule' (unitInfoMap state) (preloadClosure state)
-- | Substitutes holes in a 'Unit', suitable for renaming when
-- an include occurs; see Note [Representation of module/name variable].
--
--- @p[A=<A>]@ maps to @p[A=<B>]@ with @A=<B>@.
+-- @p[A=\<A>]@ maps to @p[A=\<B>]@ with @A=\<B>@.
renameHoleUnit :: UnitState -> ShHoleSubst -> Unit -> Unit
renameHoleUnit state = renameHoleUnit' (unitInfoMap state) (preloadClosure state)
-- | Like 'renameHoleModule', but requires only 'ClosureUnitInfoMap'
--- so it can be used by "Packages".
+-- so it can be used by "GHC.Unit.State".
renameHoleModule' :: UnitInfoMap -> PreloadUnitClosure -> ShHoleSubst -> Module -> Module
renameHoleModule' pkg_map closure env m
| not (isHoleModule m) =
@@ -2239,7 +2239,7 @@ renameHoleModule' pkg_map closure env m
| otherwise = m
-- | Like 'renameHoleUnit, but requires only 'ClosureUnitInfoMap'
--- so it can be used by "Packages".
+-- so it can be used by "GHC.Unit.State".
renameHoleUnit' :: UnitInfoMap -> PreloadUnitClosure -> ShHoleSubst -> Unit -> Unit
renameHoleUnit' pkg_map closure env uid =
case uid of