summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Builtin/Names.hs1
-rw-r--r--compiler/GHC/CmmToAsm/X86/CodeGen.hs2
-rw-r--r--compiler/GHC/CmmToC.hs2
-rw-r--r--compiler/GHC/CmmToLlvm/Config.hs2
-rw-r--r--compiler/GHC/Core.hs2
-rw-r--r--compiler/GHC/Core/Coercion/Axiom.hs2
-rw-r--r--compiler/GHC/Core/Lint.hs4
-rw-r--r--compiler/GHC/Core/Make.hs2
-rw-r--r--compiler/GHC/Core/Opt/Arity.hs2
-rw-r--r--compiler/GHC/Core/Opt/CSE.hs4
-rw-r--r--compiler/GHC/Core/Opt/FloatIn.hs2
-rw-r--r--compiler/GHC/Core/Opt/OccurAnal.hs8
-rw-r--r--compiler/GHC/Core/Opt/Pipeline.hs8
-rw-r--r--compiler/GHC/Core/Opt/Simplify.hs4
-rw-r--r--compiler/GHC/Core/Opt/Simplify/Utils.hs14
-rw-r--r--compiler/GHC/Core/Rules.hs4
-rw-r--r--compiler/GHC/Core/TyCo/Subst.hs4
-rw-r--r--compiler/GHC/Driver/Session.hs4
-rw-r--r--compiler/GHC/HsToCore/Expr.hs1
-rw-r--r--compiler/GHC/HsToCore/Pmc/Desugar.hs2
-rw-r--r--compiler/GHC/HsToCore/Utils.hs2
-rw-r--r--compiler/GHC/Iface/Type.hs-boot2
-rw-r--r--compiler/GHC/Linker/Types.hs2
-rw-r--r--compiler/GHC/Rename/HsType.hs4
-rw-r--r--compiler/GHC/Rename/Unbound.hs2
-rw-r--r--compiler/GHC/StgToCmm/DataCon.hs2
-rw-r--r--compiler/GHC/StgToCmm/Expr.hs4
-rw-r--r--compiler/GHC/StgToCmm/Foreign.hs2
-rw-r--r--compiler/GHC/Tc/Deriv/Utils.hs2
-rw-r--r--compiler/GHC/Tc/Errors/Hole.hs4
-rw-r--r--compiler/GHC/Tc/Errors/Types.hs2
-rw-r--r--compiler/GHC/Tc/Gen/HsType.hs4
-rw-r--r--compiler/GHC/Tc/Gen/Pat.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Sig.hs2
-rw-r--r--compiler/GHC/Tc/Module.hs2
-rw-r--r--compiler/GHC/Tc/Solver/Canonical.hs4
-rw-r--r--compiler/GHC/Tc/Solver/Monad.hs2
-rw-r--r--compiler/GHC/Tc/Types.hs4
-rw-r--r--compiler/GHC/Tc/Utils/TcMType.hs2
-rw-r--r--compiler/GHC/Tc/Utils/Zonk.hs2
-rw-r--r--compiler/GHC/Types/SourceText.hs2
-rw-r--r--compiler/GHC/Unit/Info.hs2
-rw-r--r--compiler/GHC/Unit/Module/Deps.hs2
-rw-r--r--compiler/GHC/Unit/State.hs2
-rw-r--r--compiler/GHC/Utils/Monad.hs2
-rw-r--r--compiler/Language/Haskell/Syntax/Expr.hs4
-rw-r--r--compiler/Language/Haskell/Syntax/Extension.hs2
47 files changed, 70 insertions, 72 deletions
diff --git a/compiler/GHC/Builtin/Names.hs b/compiler/GHC/Builtin/Names.hs
index c0ebb2929b..905fb6c8dc 100644
--- a/compiler/GHC/Builtin/Names.hs
+++ b/compiler/GHC/Builtin/Names.hs
@@ -219,7 +219,6 @@ basicKnownKeyNames
monoidClassName, memptyName, mappendName, mconcatName,
-- The IO type
- -- See Note [TyConRepNames for non-wired-in TyCons]
ioTyConName, ioDataConName,
runMainIOName,
runRWName,
diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs
index bf799590cd..21a094008e 100644
--- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs
+++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs
@@ -3245,7 +3245,7 @@ genCCall64' target dest_regs args = do
-- Align stack to 16n for calls, assuming a starting stack
-- alignment of 16n - word_size on procedure entry. Which we
- -- maintain. See Note [rts/StgCRun.c : Stack Alignment on X86]
+ -- maintain. See Note [Stack Alignment on X86] in rts/StgCRun.c
let word_size = platformWordSizeInBytes platform
(real_size, adjust_rsp) <-
if (tot_arg_size + word_size) `rem` 16 == 0
diff --git a/compiler/GHC/CmmToC.hs b/compiler/GHC/CmmToC.hs
index 9539208883..60059124b2 100644
--- a/compiler/GHC/CmmToC.hs
+++ b/compiler/GHC/CmmToC.hs
@@ -497,7 +497,7 @@ machOpNeedsCast platform mop args
-- resultRepOfMachOp says).
| isComparisonMachOp mop = Just mkW_
- -- See Note [Zero-extended sub-word signed results]
+ -- See Note [Zero-extending sub-word signed results]
| signedOp mop
, res_ty <- machOpResultType platform mop args
, not $ isFloatType res_ty -- only integer operations, not MO_SF_Conv
diff --git a/compiler/GHC/CmmToLlvm/Config.hs b/compiler/GHC/CmmToLlvm/Config.hs
index 5f5fedc9a7..84455a8b2c 100644
--- a/compiler/GHC/CmmToLlvm/Config.hs
+++ b/compiler/GHC/CmmToLlvm/Config.hs
@@ -26,6 +26,6 @@ data LlvmCgConfig = LlvmCgConfig
, llvmCgDoWarn :: !Bool -- ^ True ==> warn unsupported Llvm version
, llvmCgLlvmTarget :: !String -- ^ target triple passed to LLVM
, llvmCgLlvmConfig :: !LlvmConfig -- ^ mirror DynFlags LlvmConfig.
- -- see Note [LLVM Configuration] in "GHC.SysTools". This can be strict since
+ -- see Note [LLVM configuration] in "GHC.SysTools". This can be strict since
-- GHC.Driver.Config.CmmToLlvm.initLlvmCgConfig verifies the files are present.
}
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs
index 15a0674e38..4fac9ce8e1 100644
--- a/compiler/GHC/Core.hs
+++ b/compiler/GHC/Core.hs
@@ -1120,7 +1120,7 @@ data CoreRule
-- arguments, it simply discards them; the returned 'CoreExpr'
-- is just the rewrite of 'ru_fn' applied to the first 'ru_nargs' args
}
- -- See Note [Extra args in rule matching] in GHC.Core.Rules
+ -- See Note [Extra args in the target] in GHC.Core.Rules
-- | Rule options
data RuleOpts = RuleOpts
diff --git a/compiler/GHC/Core/Coercion/Axiom.hs b/compiler/GHC/Core/Coercion/Axiom.hs
index 2476cfd7cc..4e0aa45abc 100644
--- a/compiler/GHC/Core/Coercion/Axiom.hs
+++ b/compiler/GHC/Core/Coercion/Axiom.hs
@@ -323,7 +323,7 @@ isImplicitCoAxiom = co_ax_implicit
coAxBranchIncomps :: CoAxBranch -> [CoAxBranch]
coAxBranchIncomps = cab_incomps
--- See Note [Compatibility checking] in GHC.Core.FamInstEnv
+-- See Note [Compatibility] in GHC.Core.FamInstEnv
placeHolderIncomps :: [CoAxBranch]
placeHolderIncomps = panic "placeHolderIncomps"
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index c79ce8be1d..b93df23356 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -486,7 +486,7 @@ lintCoreBindings dflags pass local_in_scope binds
-- we have eta-expanded data constructors with representation-polymorphic
-- bindings; so we switch off the representation-polymorphism checks.
-- The very simple optimiser will beta-reduce them away.
- -- See Note [Checking representation-polymorphic data constructors]
+ -- See Note [Checking for representation-polymorphic built-ins]
-- in GHC.HsToCore.Expr.
check_fixed_rep = case pass of
CoreDesugar -> False
@@ -1920,7 +1920,7 @@ conceivably we could allow it. But we can always eta-expand such an
"undersaturated" rule (see 'GHC.Core.Opt.Arity.etaExpandToJoinPointRule'), and in fact
the simplifier would have to in order to deal with the RHS. So we take a
conservative view and don't allow undersaturated rules for join points. See
-Note [Rules and join points] in "GHC.Core.Opt.OccurAnal" for further discussion.
+Note [Join points and unfoldings/rules] in "GHC.Core.Opt.OccurAnal" for further discussion.
-}
{-
diff --git a/compiler/GHC/Core/Make.hs b/compiler/GHC/Core/Make.hs
index 06cb867c94..200847134b 100644
--- a/compiler/GHC/Core/Make.hs
+++ b/compiler/GHC/Core/Make.hs
@@ -1031,7 +1031,7 @@ the first. But the stable-unfolding for f looks like
\x. case x of MkT a b -> g ($WMkT b a)
where $WMkT is the wrapper for MkT that evaluates its arguments. We
apply the same w/w split to this unfolding (see Note [Worker/wrapper
-for INLINEABLE functions] in GHC.Core.Opt.WorkWrap) so the template ends up like
+for INLINABLE functions] in GHC.Core.Opt.WorkWrap) so the template ends up like
\b. let a = absentError "blah"
x = MkT a b
in case x of MkT a b -> g ($WMkT b a)
diff --git a/compiler/GHC/Core/Opt/Arity.hs b/compiler/GHC/Core/Opt/Arity.hs
index ceef44afbf..ab38be413c 100644
--- a/compiler/GHC/Core/Opt/Arity.hs
+++ b/compiler/GHC/Core/Opt/Arity.hs
@@ -1495,7 +1495,7 @@ etaInfoApp in_scope expr eis
= go subst e (EI bs mco')
where
mco' = checkReflexiveMCo (Core.substCo subst co `mkTransMCoR` mco)
- -- See Note [Check for reflexive casts in eta-expansion]
+ -- See Note [Check for reflexive casts in eta expansion]
go subst (Case e b ty alts) eis
= Case (Core.substExprSC subst e) b1 ty' alts'
diff --git a/compiler/GHC/Core/Opt/CSE.hs b/compiler/GHC/Core/Opt/CSE.hs
index 08d4ce193b..4f6917d554 100644
--- a/compiler/GHC/Core/Opt/CSE.hs
+++ b/compiler/GHC/Core/Opt/CSE.hs
@@ -435,8 +435,8 @@ addBinding :: CSEnv -- Includes InId->OutId cloning
-- Extend the CSE env with a mapping [rhs -> out-id]
-- unless we can instead just substitute [in-id -> rhs]
--
--- It's possible for the binder to be a type variable (see
--- Note [Type-let] in GHC.Core), in which case we can just substitute.
+-- It's possible for the binder to be a type variable,
+-- in which case we can just substitute.
addBinding env in_id out_id rhs' cse_done
| not (isId in_id) = (extendCSSubst env in_id rhs', out_id)
| noCSE in_id = (env, out_id)
diff --git a/compiler/GHC/Core/Opt/FloatIn.hs b/compiler/GHC/Core/Opt/FloatIn.hs
index 37cb23e338..abd56abdf0 100644
--- a/compiler/GHC/Core/Opt/FloatIn.hs
+++ b/compiler/GHC/Core/Opt/FloatIn.hs
@@ -541,7 +541,7 @@ fiBind platform to_drop (AnnRec bindings) body_fvs
(ids, rhss) = unzip bindings
rhss_fvs = map freeVarsOf rhss
- -- See Note [extra_fvs (1,2)]
+ -- See Note [extra_fvs (1)] and Note [extra_fvs (2)]
rule_fvs = mapUnionDVarSet bndrRuleAndUnfoldingVarsDSet ids
extra_fvs = rule_fvs `unionDVarSet`
unionDVarSets [ rhs_fvs | (bndr, (rhs_fvs, rhs)) <- bindings
diff --git a/compiler/GHC/Core/Opt/OccurAnal.hs b/compiler/GHC/Core/Opt/OccurAnal.hs
index c5e4dee1a0..901bc83077 100644
--- a/compiler/GHC/Core/Opt/OccurAnal.hs
+++ b/compiler/GHC/Core/Opt/OccurAnal.hs
@@ -341,7 +341,7 @@ something at the bottom:
RULE: B.f @Int = $sf
Applying this rule makes foo refer to $sf, although foo doesn't appear to
-depend on $sf. (And, as in Note [Rules for imported functions], the
+depend on $sf. (And, as in Note [IMP-RULES: local rules for imported functions], the
dependency might be more indirect. For example, foo might mention C.t
rather than B.f, where C.t eventually inlines to B.f.)
@@ -573,13 +573,13 @@ Consider this group, which is typical of what SpecConstr builds:
So 'f' and 'fs' are in the same Rec group (since f refers to fs via its RULE).
But watch out! If 'fs' is not chosen as a loop breaker, we may get an infinite loop:
- - the RULE is applied in f's RHS (see Note [Self-recursive rules] in GHC.Core.Opt.Simplify
+ - the RULE is applied in f's RHS (see Note [Rules for recursive functions] in GHC.Core.Opt.Simplify
- fs is inlined (say it's small)
- now there's another opportunity to apply the RULE
This showed up when compiling Control.Concurrent.Chan.getChanContents.
Hence the transitive rule_fv_env stuff described in
-Note [Rules and loop breakers].
+Note [Rules and loop breakers].
------------------------------------------------------------
Note [Finding join points]
@@ -1735,7 +1735,7 @@ lambda and casts, e.g.
* Why do we take care to account for intervening casts? Answer:
currently we don't do eta-expansion and cast-swizzling in a stable
- unfolding (see Note [Eta-expansion inside stable unfoldings]).
+ unfolding (see Note [Eta-expansion in stable unfoldings]).
So we can get
f = \x. ((\y. ...x...y...) |> co)
Now, since the lambdas aren't together, the occurrence analyser will
diff --git a/compiler/GHC/Core/Opt/Pipeline.hs b/compiler/GHC/Core/Opt/Pipeline.hs
index 3f8e3fc186..1320d9d3ec 100644
--- a/compiler/GHC/Core/Opt/Pipeline.hs
+++ b/compiler/GHC/Core/Opt/Pipeline.hs
@@ -621,7 +621,7 @@ simplExprGently :: SimplEnv -> CoreExpr -> SimplM CoreExpr
-- enforce that; it just simplifies the expression twice
-- It's important that simplExprGently does eta reduction; see
--- Note [Simplifying the left-hand side of a RULE] above. The
+-- Note [Simplify rule LHS] above. The
-- simplifier does indeed do eta reduction (it's in GHC.Core.Opt.Simplify.completeLam)
-- but only if -O is on.
@@ -934,7 +934,7 @@ type IndEnv = IdEnv (Id, [CoreTickish]) -- Maps local_id -> exported_id, ticks
shortOutIndirections :: CoreProgram -> CoreProgram
shortOutIndirections binds
| isEmptyVarEnv ind_env = binds
- | no_need_to_flatten = binds' -- See Note [Rules and indirect-zapping]
+ | no_need_to_flatten = binds' -- See Note [Rules and indirection-zapping]
| otherwise = [Rec (flattenBinds binds')] -- for this no_need_to_flatten stuff
where
ind_env = makeIndEnv binds
@@ -996,7 +996,7 @@ shortMeOut ind_env exported_id local_id
not (local_id `elemVarEnv` ind_env) -- Only if not already substituted for
then
if hasShortableIdInfo exported_id
- then True -- See Note [Messing up the exported Id's IdInfo]
+ then True -- See Note [Messing up the exported Id's RULES]
else warnPprTrace True "Not shorting out" (ppr exported_id) False
else
False
@@ -1005,7 +1005,7 @@ shortMeOut ind_env exported_id local_id
hasShortableIdInfo :: Id -> Bool
-- True if there is no user-attached IdInfo on exported_id,
-- so we can safely discard it
--- See Note [Messing up the exported Id's IdInfo]
+-- See Note [Messing up the exported Id's RULES]
hasShortableIdInfo id
= isEmptyRuleInfo (ruleInfo info)
&& isDefaultInlinePragma (inlinePragInfo info)
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs
index 575512b7c8..f77411e0b1 100644
--- a/compiler/GHC/Core/Opt/Simplify.hs
+++ b/compiler/GHC/Core/Opt/Simplify.hs
@@ -669,7 +669,7 @@ mkCastWrapperInlinePrag :: InlinePragma -> InlinePragma
-- See Note [Cast worker/wrapper]
mkCastWrapperInlinePrag (InlinePragma { inl_act = act, inl_rule = rule_info })
= InlinePragma { inl_src = SourceText "{-# INLINE"
- , inl_inline = NoUserInlinePrag -- See Note [Wrapper NoUserInline]
+ , inl_inline = NoUserInlinePrag -- See Note [Wrapper NoUserInlinePrag]
, inl_sat = Nothing -- in GHC.Core.Opt.WorkWrap
, inl_act = wrap_act -- See Note [Wrapper activation]
, inl_rule = rule_info } -- in GHC.Core.Opt.WorkWrap
@@ -2087,7 +2087,7 @@ rebuildCall env info@(ArgInfo { ai_fun = fun, ai_args = rev_args
| nr_wanted == 0 || no_more_args
, let info' = info { ai_rules = Nothing }
= -- We've accumulated a simplified call in <fun,rev_args>
- -- so try rewrite rules; see Note [RULEs apply to simplified arguments]
+ -- so try rewrite rules; see Note [RULES apply to simplified arguments]
-- See also Note [Rules for recursive functions]
do { mb_match <- tryRules env rules fun (reverse rev_args) cont
; case mb_match of
diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs
index 13a8a1b853..ec26ba89fb 100644
--- a/compiler/GHC/Core/Opt/Simplify/Utils.hs
+++ b/compiler/GHC/Core/Opt/Simplify/Utils.hs
@@ -130,7 +130,7 @@ data SimplCont
| ApplyToVal -- (ApplyToVal arg K)[e] = K[ e arg ]
{ sc_dup :: DupFlag -- See Note [DupFlag invariants]
, sc_hole_ty :: OutType -- Type of the function, presumably (forall a. blah)
- -- See Note [The hole type in ApplyToTy/Val]
+ -- See Note [The hole type in ApplyToTy]
, sc_arg :: InExpr -- The argument,
, sc_env :: StaticEnv -- see Note [StaticEnv invariant]
, sc_cont :: SimplCont }
@@ -138,7 +138,7 @@ data SimplCont
| ApplyToTy -- (ApplyToTy ty K)[e] = K[ e ty ]
{ sc_arg_ty :: OutType -- Argument type
, sc_hole_ty :: OutType -- Type of the function, presumably (forall a. blah)
- -- See Note [The hole type in ApplyToTy/Val]
+ -- See Note [The hole type in ApplyToTy]
, sc_cont :: SimplCont }
| Select -- (Select alts K)[e] = K[ case e of alts ]
@@ -453,7 +453,7 @@ contHoleType (StrictBind { sc_bndr = b, sc_dup = dup, sc_env = se })
= perhapsSubstTy dup se (idType b)
contHoleType (StrictArg { sc_fun_ty = ty }) = funArgTy ty
contHoleType (ApplyToTy { sc_hole_ty = ty }) = ty -- See Note [The hole type in ApplyToTy]
-contHoleType (ApplyToVal { sc_hole_ty = ty }) = ty -- See Note [The hole type in ApplyToTy/Val]
+contHoleType (ApplyToVal { sc_hole_ty = ty }) = ty -- See Note [The hole type in ApplyToTy]
contHoleType (Select { sc_dup = d, sc_bndr = b, sc_env = se })
= perhapsSubstTy d se (idType b)
@@ -1621,7 +1621,7 @@ mkLam env bndrs body cont
= do { tick (EtaReduction (head bndrs))
; return etad_lam }
- | not (contIsRhs cont) -- See Note [Eta-expanding lambdas]
+ | not (contIsRhs cont) -- See Note [Eta expanding lambdas]
, sm_eta_expand mode
, any isRuntimeVar bndrs
, let body_arity = {-# SCC "eta" #-} exprEtaExpandArity dflags body
@@ -2192,9 +2192,9 @@ prepareAlts scrut case_bndr' alts
mkCase tries these things
-* Note [Merge nested cases]
-* Note [Eliminate identity case]
-* Note [Scrutinee constant folding]
+* Note [Merge Nested Cases]
+* Note [Eliminate Identity Case]
+* Note [Scrutinee Constant Folding]
Note [Merge Nested Cases]
~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/GHC/Core/Rules.hs b/compiler/GHC/Core/Rules.hs
index 93ab0608a8..2eabc1db0c 100644
--- a/compiler/GHC/Core/Rules.hs
+++ b/compiler/GHC/Core/Rules.hs
@@ -882,7 +882,7 @@ match renv subst (Type ty1) (Type ty2) _mco
= match_ty renv subst ty1 ty2
------------------------ Coercions ---------------------
--- See Note [Coercion argument] for why this isn't really right
+-- See Note [Coercion arguments] for why this isn't really right
match renv subst (Coercion co1) (Coercion co2) MRefl
= match_co renv subst co1 co2
-- The MCo case corresponds to matching co ~ (co2 |> co3)
@@ -1054,7 +1054,7 @@ eta_reduce renv e@(Lam {})
eta_reduce _ _ = Nothing
-{- Note [Eta reduction the target]
+{- Note [Eta reduction in the target]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppose we are faced with this (#19790)
Template {x} f x
diff --git a/compiler/GHC/Core/TyCo/Subst.hs b/compiler/GHC/Core/TyCo/Subst.hs
index 32817ca6c7..a5cb32e38e 100644
--- a/compiler/GHC/Core/TyCo/Subst.hs
+++ b/compiler/GHC/Core/TyCo/Subst.hs
@@ -113,7 +113,7 @@ data TCvSubst
TvSubstEnv -- Substitutes both type and kind variables
CvSubstEnv -- Substitutes coercion variables
-- See Note [Substitutions apply only once]
- -- and Note [Extending the TvSubstEnv]
+ -- and Note [Extending the TCvSubstEnv]
-- and Note [Substituting types and coercions]
-- and Note [The substitution invariant]
@@ -258,7 +258,7 @@ mkEmptyTCvSubst :: InScopeSet -> TCvSubst
mkEmptyTCvSubst is = TCvSubst is emptyTvSubstEnv emptyCvSubstEnv
isEmptyTCvSubst :: TCvSubst -> Bool
- -- See Note [Extending the TvSubstEnv]
+ -- See Note [Extending the TCvSubstEnv]
isEmptyTCvSubst (TCvSubst _ tenv cenv) = isEmptyVarEnv tenv && isEmptyVarEnv cenv
mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 838f0bf3b7..c3375ea114 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -449,7 +449,7 @@ data DynFlags = DynFlags {
llvmConfig :: LlvmConfig,
-- ^ N.B. It's important that this field is lazy since we load the LLVM
- -- configuration lazily. See Note [LLVM Configuration] in "GHC.SysTools".
+ -- configuration lazily. See Note [LLVM configuration] in "GHC.SysTools".
llvmOptLevel :: Int, -- ^ LLVM optimisation level
verbosity :: Int, -- ^ Verbosity level: see Note [Verbosity levels]
debugLevel :: Int, -- ^ How much debug information to produce
@@ -773,7 +773,7 @@ data LlvmTarget = LlvmTarget
, lAttributes :: [String]
}
--- | See Note [LLVM Configuration] in "GHC.SysTools".
+-- | See Note [LLVM configuration] in "GHC.SysTools".
data LlvmConfig = LlvmConfig { llvmTargets :: [(String, LlvmTarget)]
, llvmPasses :: [(Int, String)]
}
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs
index 4e4eca8cef..973d7f204f 100644
--- a/compiler/GHC/HsToCore/Expr.hs
+++ b/compiler/GHC/HsToCore/Expr.hs
@@ -1042,7 +1042,6 @@ dsConLike con tvbs tys
= do { ds_con <- dsHsConLike con
; ids <- newSysLocalsDs tys
-- newSysLocalDs: /can/ be lev-poly; see
- -- Note [Checking representation-polymorphic data constructors]
; return (mkLams tvs $
mkLams ids $
ds_con `mkTyApps` mkTyVarTys tvs
diff --git a/compiler/GHC/HsToCore/Pmc/Desugar.hs b/compiler/GHC/HsToCore/Pmc/Desugar.hs
index 629f32f3cd..7cba784245 100644
--- a/compiler/GHC/HsToCore/Pmc/Desugar.hs
+++ b/compiler/GHC/HsToCore/Pmc/Desugar.hs
@@ -74,7 +74,7 @@ vanillaConGrd scrut con arg_ids =
-- where @b@ and @c@ are freshly allocated in @mkListGrds@ and @a@ is the match
-- variable.
mkListGrds :: Id -> [(Id, [PmGrd])] -> DsM [PmGrd]
--- See Note [Order of guards matter] for why we need to intertwine guards
+-- See Note [Order of guards matters] for why we need to intertwine guards
-- on list elements.
mkListGrds a [] = pure [vanillaConGrd a nilDataCon []]
mkListGrds a ((x, head_grds):xs) = do
diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs
index 2ea1bb3cbe..17b2b42917 100644
--- a/compiler/GHC/HsToCore/Utils.hs
+++ b/compiler/GHC/HsToCore/Utils.hs
@@ -183,7 +183,7 @@ In fact, even GHC.Core.Subst.simplOptExpr will do this, and simpleOptExpr
runs on the output of the desugarer, so all is well by the end of
the desugaring pass.
-See also Note [MatchIds] in GHC.HsToCore.Match
+See also Note [Match Ids] in GHC.HsToCore.Match
************************************************************************
* *
diff --git a/compiler/GHC/Iface/Type.hs-boot b/compiler/GHC/Iface/Type.hs-boot
index c840f9af51..9c10f29ed5 100644
--- a/compiler/GHC/Iface/Type.hs-boot
+++ b/compiler/GHC/Iface/Type.hs-boot
@@ -5,7 +5,7 @@ module GHC.Iface.Type
where
-- Empty import to influence the compilation ordering.
--- See Note [Depend on GHC.Integer] in GHC.Base
+-- See Note [Depend on GHC.Num.Integer] in GHC.Base
import GHC.Base ()
data IfaceAppArgs
diff --git a/compiler/GHC/Linker/Types.hs b/compiler/GHC/Linker/Types.hs
index d1131a70f0..17bb46feb9 100644
--- a/compiler/GHC/Linker/Types.hs
+++ b/compiler/GHC/Linker/Types.hs
@@ -125,7 +125,7 @@ data Unlinked
[SptEntry] -- ^ A byte-code object, lives only in memory. Also
-- carries some static pointer table entries which
-- should be loaded along with the BCOs.
- -- See Note [Grant plan for static forms] in
+ -- See Note [Grand plan for static forms] in
-- "GHC.Iface.Tidy.StaticPtrTable".
instance Outputable Unlinked where
diff --git a/compiler/GHC/Rename/HsType.hs b/compiler/GHC/Rename/HsType.hs
index 145e6f08ec..1e1a0b538f 100644
--- a/compiler/GHC/Rename/HsType.hs
+++ b/compiler/GHC/Rename/HsType.hs
@@ -961,8 +961,8 @@ bindHsQTyVars :: forall a b.
-> (LHsQTyVars GhcRn -> Bool -> RnM (b, FreeVars))
-- The Bool is True <=> all kind variables used in the
-- kind signature are bound on the left. Reason:
- -- the last clause of Note [CUSKs: Complete user-supplied
- -- kind signatures] in GHC.Hs.Decls
+ -- the last clause of Note [CUSKs: complete user-supplied kind signatures]
+ -- in GHC.Hs.Decls
-> RnM (b, FreeVars)
-- See Note [bindHsQTyVars examples]
diff --git a/compiler/GHC/Rename/Unbound.hs b/compiler/GHC/Rename/Unbound.hs
index 6d48ea3074..5639d2a6c6 100644
--- a/compiler/GHC/Rename/Unbound.hs
+++ b/compiler/GHC/Rename/Unbound.hs
@@ -401,7 +401,7 @@ nameSpacesRelated dflags what_looking ns ns'
promoted_datacons = [(dataName, [WL_Constructor]) | data_kinds]
{-
-Note [Related name space]
+Note [Related name spaces]
~~~~~~~~~~~~~~~~~~~~~~~~~
Name spaces are related if there is a chance to mean the one when one writes
the other, i.e. variables <-> data constructors and type variables <-> type
diff --git a/compiler/GHC/StgToCmm/DataCon.hs b/compiler/GHC/StgToCmm/DataCon.hs
index 6a25562f6a..bed2f164eb 100644
--- a/compiler/GHC/StgToCmm/DataCon.hs
+++ b/compiler/GHC/StgToCmm/DataCon.hs
@@ -227,7 +227,7 @@ buildDynCon' binder mn actually_bound ccs con args
For Char/Int closures there are some value closures
built into the RTS. This is the case for all values in
the range mINT_INTLIKE .. mAX_INTLIKE (or CHARLIKE).
-See Note [CHARLIKE and INTLIKE closures.] in the RTS code.
+See Note [CHARLIKE and INTLIKE closures] in the RTS code.
Similarly zero-arity constructors have a closure
in their defining Module we can use.
diff --git a/compiler/GHC/StgToCmm/Expr.hs b/compiler/GHC/StgToCmm/Expr.hs
index d82c9f6ff4..3a3c1db647 100644
--- a/compiler/GHC/StgToCmm/Expr.hs
+++ b/compiler/GHC/StgToCmm/Expr.hs
@@ -71,7 +71,7 @@ cgExpr (StgOpApp (StgPrimOp SeqOp) [StgVarArg a, _] _res_ty) =
cgIdApp a []
-- dataToTag# :: a -> Int#
--- See Note [dataToTag# magic] in primops.txt.pp
+-- See Note [dataToTag# magic] in GHC.Core.Opt.ConstantFold
cgExpr (StgOpApp (StgPrimOp DataToTagOp) [StgVarArg a] _res_ty) = do
platform <- getPlatform
emitComment (mkFastString "dataToTag#")
@@ -538,7 +538,7 @@ isSimpleScrut _ _ = return False
isSimpleOp :: StgOp -> [StgArg] -> FCode Bool
-- True iff the op cannot block or allocate
isSimpleOp (StgFCallOp (CCall (CCallSpec _ _ safe)) _) _ = return $! not (playSafe safe)
--- dataToTag# evaluates its argument, see Note [dataToTag#] in primops.txt.pp
+-- dataToTag# evaluates its argument, see Note [dataToTag# magic] in GHC.Core.Opt.ConstantFold
isSimpleOp (StgPrimOp DataToTagOp) _ = return False
isSimpleOp (StgPrimOp op) stg_args = do
arg_exprs <- getNonVoidArgAmodes stg_args
diff --git a/compiler/GHC/StgToCmm/Foreign.hs b/compiler/GHC/StgToCmm/Foreign.hs
index cc33576240..e71c418530 100644
--- a/compiler/GHC/StgToCmm/Foreign.hs
+++ b/compiler/GHC/StgToCmm/Foreign.hs
@@ -174,7 +174,7 @@ We will now generate this:
L2:
... r ...
-And when the safe foreign call is lowered later (see Note [lower safe
+And when the safe foreign call is lowered later (see Note [Lower safe
foreign calls]) we get this:
suspendThread()
diff --git a/compiler/GHC/Tc/Deriv/Utils.hs b/compiler/GHC/Tc/Deriv/Utils.hs
index 91a11c9af6..8a5b376767 100644
--- a/compiler/GHC/Tc/Deriv/Utils.hs
+++ b/compiler/GHC/Tc/Deriv/Utils.hs
@@ -625,7 +625,7 @@ Currently, the only three stock derived classes that require this are Read,
Show, and Generic, as their derived code all depend on the record selectors
of the derived data type's constructors.
-See also Note [Newtype deriving and unused constructors] in GHC.Tc.Deriv for
+See also Note [Unused constructors and deriving clauses] in GHC.Tc.Deriv for
another example of a similar trick.
-}
diff --git a/compiler/GHC/Tc/Errors/Hole.hs b/compiler/GHC/Tc/Errors/Hole.hs
index 7d1388c112..4115d6b198 100644
--- a/compiler/GHC/Tc/Errors/Hole.hs
+++ b/compiler/GHC/Tc/Errors/Hole.hs
@@ -205,7 +205,7 @@ When we now check whether `x :: a_a1pa[sk:2]` fits the hole in
`tcCheckHoleFit`, the call to `tcSubType` will end up unifying the meta type
variable `a0_a1pd[tau:2] := a_a1pa[sk:2]`. By wrapping the wanted constraints
needed by tcSubType_NC and the relevant constraints (see Note [Relevant
-Constraints] for more details) in the nested implications, we can pass the
+constraints] for more details) in the nested implications, we can pass the
information in the givens along to the simplifier. For our example, we end up
needing to check whether the following constraints are soluble.
@@ -982,7 +982,7 @@ tcCheckHoleFit (TypedHole {..}) hole_ty ty = discardErrs $
-- the wanteds, because they are freshly generated by the
-- call to`tcSubtype_NC`.
; traceTc "final_wc is: " $ ppr final_wc
- -- See Note [Speeding up valid-hole fits]
+ -- See Note [Speeding up valid hole-fits]
; (rem, _) <- tryTc $ runTcSDerivedsEarlyAbort $ simplifyTopWanteds final_wc
; traceTc "}" empty
; return (any isSolvedWC rem, wrap)
diff --git a/compiler/GHC/Tc/Errors/Types.hs b/compiler/GHC/Tc/Errors/Types.hs
index 04b3acefa0..e292d864d8 100644
--- a/compiler/GHC/Tc/Errors/Types.hs
+++ b/compiler/GHC/Tc/Errors/Types.hs
@@ -125,7 +125,7 @@ existence of these two types, which for now remain a "necessary evil".
-}
-- The majority of TcRn messages come with extra context about the error,
--- and this newtype captures it. See Note [Migrating TcM messages].
+-- and this newtype captures it. See Note [Migrating TcM Messages].
data ErrInfo = ErrInfo {
errInfoContext :: !SDoc
-- ^ Extra context associated to the error.
diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs
index 2a3ef6fd10..204edcb0b0 100644
--- a/compiler/GHC/Tc/Gen/HsType.hs
+++ b/compiler/GHC/Tc/Gen/HsType.hs
@@ -1177,7 +1177,7 @@ tc_hs_type mode (HsForAllTy { hst_tele = tele, hst_body = ty }) exp_kind
-- Pass on the mode from the type, to any wildcards
-- in kind signatures on the forall'd variables
-- e.g. f :: _ -> Int -> forall (a :: _). blah
- -- Why exp_kind? See Note [Body kind of HsForAllTy]
+ -- Why exp_kind? See Note [Body kind of a HsForAllTy]
-- Do not kind-generalise here! See Note [Kind generalisation]
@@ -3149,7 +3149,7 @@ tcOuterTKBndrs skol_info
, sm_tvtv = SMDSkolemTv skol_info })
skol_info
-- Do not clone the outer binders
- -- See Note [Cloning for type variable binder] under "must not"
+ -- See Note [Cloning for type variable binders] under "must not"
tcOuterTKBndrsX :: OutputableBndrFlag flag 'Renamed
=> SkolemMode -> SkolemInfo
diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs
index 132f58b7b4..ae9667804d 100644
--- a/compiler/GHC/Tc/Gen/Pat.hs
+++ b/compiler/GHC/Tc/Gen/Pat.hs
@@ -918,7 +918,7 @@ tcDataConPat penv (L con_span con_name) data_con pat_ty_scaled
; (tenv, ex_tvs') <- tcInstSuperSkolTyVarsX skol_info tenv1 ex_tvs
-- Get location from monad, not from ex_tvs
-- This freshens: See Note [Freshen existentials]
- -- Why "super"? See Note [Binding when lookup up instances]
+ -- Why "super"? See Note [Binding when looking up instances]
-- in GHC.Core.InstEnv.
; let arg_tys' = substScaledTys tenv arg_tys
diff --git a/compiler/GHC/Tc/Gen/Sig.hs b/compiler/GHC/Tc/Gen/Sig.hs
index 82a3290e4c..ed1833c1e7 100644
--- a/compiler/GHC/Tc/Gen/Sig.hs
+++ b/compiler/GHC/Tc/Gen/Sig.hs
@@ -409,7 +409,7 @@ tcPatSynSig name sig_ty@(L _ (HsSig{sig_bndrs = hs_outer_bndrs, sig_body = hs_ty
; skol_info <- mkSkolemInfo (DataConSkol name)
; (tclvl, wanted, (outer_bndrs, (ex_bndrs, (req, prov, body_ty))))
<- pushLevelAndSolveEqualitiesX "tcPatSynSig" $
- -- See Note [solveEqualities in tcPatSynSig]
+ -- See Note [Report unsolved equalities in tcPatSynSig]
tcOuterTKBndrs skol_info hs_outer_bndrs $
tcExplicitTKBndrs skol_info ex_hs_tvbndrs $
do { req <- tcHsContext hs_req
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index c8f65e2453..34a02e70ec 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -1898,7 +1898,7 @@ generateMainBinding tcg_env main_name = do
; (ev_binds, main_expr) <- setMainCtxt main_name io_ty $
tcCheckMonoExpr main_expr_rn io_ty
- -- See Note [Root-main Id]
+ -- See Note [Root-main id]
-- Construct the binding
-- :Main.main :: IO res_ty = runMainIO res_ty main
; run_main_id <- tcLookupId runMainIOName
diff --git a/compiler/GHC/Tc/Solver/Canonical.hs b/compiler/GHC/Tc/Solver/Canonical.hs
index 347696f874..1643a0ef46 100644
--- a/compiler/GHC/Tc/Solver/Canonical.hs
+++ b/compiler/GHC/Tc/Solver/Canonical.hs
@@ -496,7 +496,7 @@ the sc_theta_ids at all. So our final construction is
-}
makeSuperClasses :: [Ct] -> TcS [Ct]
--- Returns strict superclasses, transitively, see Note [The superclasses story]
+-- Returns strict superclasses, transitively, see Note [The superclass story]
-- See Note [The superclass story]
-- The loop-breaking here follows Note [Expanding superclasses] in GHC.Tc.Utils.TcType
-- Specifically, for an incoming (C t) constraint, we return all of (C t)'s
@@ -1392,7 +1392,7 @@ can_eq_nc_forall ev eq_rel s1 s2
| otherwise
= do { traceTcS "Omitting decomposition of given polytype equality" $
- pprEq s1 s2 -- See Note [Do not decompose given polytype equalities]
+ pprEq s1 s2 -- See Note [Do not decompose Given polytype equalities]
; stopWith ev "Discard given polytype equality" }
where
diff --git a/compiler/GHC/Tc/Solver/Monad.hs b/compiler/GHC/Tc/Solver/Monad.hs
index 963768ca47..2cd004053d 100644
--- a/compiler/GHC/Tc/Solver/Monad.hs
+++ b/compiler/GHC/Tc/Solver/Monad.hs
@@ -1340,7 +1340,7 @@ runTcSDeriveds tcs
-- | This variant of 'runTcSDeriveds' will immediatley fail upon encountering an
--- insoluble ct. See Note [Speeding up valid-hole fits]
+-- insoluble ct. See Note [Speeding up valid hole-fits]
runTcSDerivedsEarlyAbort :: TcS a -> TcM a
runTcSDerivedsEarlyAbort tcs
= do { ev_binds_var <- TcM.newTcEvBinds
diff --git a/compiler/GHC/Tc/Types.hs b/compiler/GHC/Tc/Types.hs
index a784eb5719..97f11c8a0b 100644
--- a/compiler/GHC/Tc/Types.hs
+++ b/compiler/GHC/Tc/Types.hs
@@ -1169,7 +1169,7 @@ instance Outputable TcTyThing where -- Debugging only
-- b) to figure out when a nested binding can be generalised,
-- in 'GHC.Tc.Gen.Bind.decideGeneralisationPlan'.
--
-data IdBindingInfo -- See Note [Meaning of IdBindingInfo and ClosedTypeId]
+data IdBindingInfo -- See Note [Meaning of IdBindingInfo]
= NotLetBound
| ClosedLet
| NonClosedLet
@@ -1192,7 +1192,7 @@ type RhsNames = NameSet -- Names of variables, mentioned on the RHS of
-- a definition, that are not Global or ClosedLet
type ClosedTypeId = Bool
- -- See Note [Meaning of IdBindingInfo and ClosedTypeId]
+ -- See Note [Meaning of IdBindingInfo]
{- Note [Meaning of IdBindingInfo]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/GHC/Tc/Utils/TcMType.hs b/compiler/GHC/Tc/Utils/TcMType.hs
index 22f9b14d26..1ece974166 100644
--- a/compiler/GHC/Tc/Utils/TcMType.hs
+++ b/compiler/GHC/Tc/Utils/TcMType.hs
@@ -1971,7 +1971,7 @@ skolemiseUnboundMetaTyVar skol_info tv
; return final_tv }
where
check_empty tv -- [Sept 04] Check for non-empty.
- = when debugIsOn $ -- See Note [Silly Type Synonym]
+ = when debugIsOn $ -- See Note [Silly Type Synonyms]
do { cts <- readMetaTyVar tv
; case cts of
Flexi -> return ()
diff --git a/compiler/GHC/Tc/Utils/Zonk.hs b/compiler/GHC/Tc/Utils/Zonk.hs
index 805d6a483d..436543b095 100644
--- a/compiler/GHC/Tc/Utils/Zonk.hs
+++ b/compiler/GHC/Tc/Utils/Zonk.hs
@@ -872,7 +872,7 @@ zonkExpr env expr@(RecordCon { rcon_ext = con_expr, rcon_flds = rbinds })
, rcon_flds = new_rbinds }) }
-- Record updates via dot syntax are replaced by desugared expressions
--- in the renamer. See Note [Rebindable Syntax and HsExpansion]. This
+-- in the renamer. See Note [Rebindable syntax and HsExpansion]. This
-- is why we match on 'rupd_flds = Left rbinds' here and panic otherwise.
zonkExpr env (RecordUpd { rupd_flds = Left rbinds
, rupd_expr = expr
diff --git a/compiler/GHC/Types/SourceText.hs b/compiler/GHC/Types/SourceText.hs
index 9faba4460b..725637e9d7 100644
--- a/compiler/GHC/Types/SourceText.hs
+++ b/compiler/GHC/Types/SourceText.hs
@@ -175,7 +175,7 @@ data FractionalLit = FL
, fl_neg :: Bool -- See Note [Negative zero]
, fl_signi :: Rational -- The significand component of the literal
, fl_exp :: Integer -- The exponent component of the literal
- , fl_exp_base :: FractionalExponentBase -- See Note [Fractional exponent bases]
+ , fl_exp_base :: FractionalExponentBase -- See Note [fractional exponent bases]
}
deriving (Data, Show)
-- The Show instance is required for the derived GHC.Parser.Lexer.Token instance when DEBUG is on
diff --git a/compiler/GHC/Unit/Info.hs b/compiler/GHC/Unit/Info.hs
index b8a238927b..db00a9b91a 100644
--- a/compiler/GHC/Unit/Info.hs
+++ b/compiler/GHC/Unit/Info.hs
@@ -59,7 +59,7 @@ import Data.List (isPrefixOf, stripPrefix)
-- * 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 PackageId PackageName unit ModuleName (GenModule (GenUnit unit))
-- | Information about an installed unit (units are identified by their database
diff --git a/compiler/GHC/Unit/Module/Deps.hs b/compiler/GHC/Unit/Module/Deps.hs
index 3a59703f88..0bab72763b 100644
--- a/compiler/GHC/Unit/Module/Deps.hs
+++ b/compiler/GHC/Unit/Module/Deps.hs
@@ -420,7 +420,7 @@ hash of the module. The export hash is computed in `GHC.Iface.Recomp.addFingerpr
-}
{-
-Note [Structure of mod_boot_deps]
+Note [Structure of dep_boot_deps]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In `-c` mode we always need to know whether to load the normal or boot version of
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs
index 3e74ae9936..cda5c80963 100644
--- a/compiler/GHC/Unit/State.hs
+++ b/compiler/GHC/Unit/State.hs
@@ -2173,7 +2173,7 @@ instUnitToUnit state iuid =
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].
+-- directly on a 'nameModule', see Note [Representation of module/name variables].
-- @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
diff --git a/compiler/GHC/Utils/Monad.hs b/compiler/GHC/Utils/Monad.hs
index a6ada16c41..59964b8024 100644
--- a/compiler/GHC/Utils/Monad.hs
+++ b/compiler/GHC/Utils/Monad.hs
@@ -426,7 +426,7 @@ The magic `inline` function does two things
* It helps ensure that 'm' really does inline.
-Note that 'inline' evaporates in phase 0. See Note [inlineIdMagic]
+Note that 'inline' evaporates in phase 0. See Note [inlineId magic]
in GHC.Core.Opt.ConstantFold.match_inline.
The INLINE pragma on multiShotM is very important, else the
diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs
index 049d511318..0abd64d0d8 100644
--- a/compiler/Language/Haskell/Syntax/Expr.hs
+++ b/compiler/Language/Haskell/Syntax/Expr.hs
@@ -539,7 +539,7 @@ data HsExpr p
-- For details on above see Note [exact print annotations] in GHC.Parser.Annotation
-- This case only arises when the OverloadedRecordDot langauge
- -- extension is enabled. See Note [Record Selectors in the AST].
+ -- extension is enabled. See Note [Record selectors in the AST].
| HsGetField {
gf_ext :: XGetField p
, gf_expr :: LHsExpr p
@@ -549,7 +549,7 @@ data HsExpr p
-- | Record field selector. e.g. @(.x)@ or @(.x.y)@
--
-- This case only arises when the OverloadedRecordDot langauge
- -- extensions is enabled. See Note [Record Selectors in the AST].
+ -- extensions is enabled. See Note [Record selectors in the AST].
-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpenP'
-- 'GHC.Parser.Annotation.AnnDot', 'GHC.Parser.Annotation.AnnCloseP'
diff --git a/compiler/Language/Haskell/Syntax/Extension.hs b/compiler/Language/Haskell/Syntax/Extension.hs
index 9c0cc0408b..6a33787d87 100644
--- a/compiler/Language/Haskell/Syntax/Extension.hs
+++ b/compiler/Language/Haskell/Syntax/Extension.hs
@@ -114,7 +114,7 @@ data DataConCantHappen
instance Outputable DataConCantHappen where
ppr = dataConCantHappen
--- | Eliminate a 'DataConCantHappen'. See Note [Constructor cannot happen].
+-- | Eliminate a 'DataConCantHappen'. See Note [Constructor cannot occur].
dataConCantHappen :: DataConCantHappen -> a
dataConCantHappen x = case x of {}