summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r--compiler/GHC/Core/Opt/Simplify.hs2
-rw-r--r--compiler/GHC/Core/Opt/Specialise.hs2
-rw-r--r--compiler/GHC/Core/Subst.hs6
-rw-r--r--compiler/GHC/Core/TyCo/FVs.hs2
-rw-r--r--compiler/GHC/Core/TyCo/Ppr.hs8
-rw-r--r--compiler/GHC/Core/TyCo/Subst.hs4
-rw-r--r--compiler/GHC/Core/TyCon.hs4
-rw-r--r--compiler/GHC/Core/Unfold.hs4
-rw-r--r--compiler/GHC/Core/Unfold/Make.hs2
-rw-r--r--compiler/GHC/Core/Utils.hs2
10 files changed, 15 insertions, 21 deletions
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs
index c5fd3dfef1..0ea3c1f3f6 100644
--- a/compiler/GHC/Core/Opt/Simplify.hs
+++ b/compiler/GHC/Core/Opt/Simplify.hs
@@ -4169,7 +4169,7 @@ Wrinkles
GHC.Core.Opt.Simplify.Utils
* Don't eta-expand a trivial expr, else each pass will eta-reduce it,
- and then eta-expand again. See Note [Do not eta-expand trivial expressions]
+ and then eta-expand again. See Note [Which RHSs do we eta-expand?]
in GHC.Core.Opt.Simplify.Utils.
* Don't eta-expand join points; see Note [Do not eta-expand join points]
diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs
index 5fb3b077ea..3fa9790c6a 100644
--- a/compiler/GHC/Core/Opt/Specialise.hs
+++ b/compiler/GHC/Core/Opt/Specialise.hs
@@ -1657,7 +1657,7 @@ we simply extend the CallKey with trailing UnspecArgs, so we'll
generate a rule that completely saturates the DFun.
There is an ASSERT that checks this, in the DFunUnfolding case of
-GHC.Core.Unfold.specUnfolding.
+GHC.Core.Unfold.Make.specUnfolding.
Note [Specialisation Must Preserve Sharing]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/GHC/Core/Subst.hs b/compiler/GHC/Core/Subst.hs
index e6f0237f32..be658384b0 100644
--- a/compiler/GHC/Core/Subst.hs
+++ b/compiler/GHC/Core/Subst.hs
@@ -97,8 +97,8 @@ data Subst
-- This is what lets us deal with name capture properly
-- It's a hard invariant to check...
--
- -- INVARIANT 2: The substitution is apply-once; see Note [Apply once] with
- -- Types.TvSubstEnv
+ -- INVARIANT 2: The substitution is apply-once;
+ -- see Note [Substitutions apply only once] in GHC.Core.TyCo.Subst
--
-- INVARIANT 3: See Note [Extending the Subst]
@@ -108,7 +108,7 @@ Note [Extending the Subst]
For a core Subst, which binds Ids as well, we make a different choice for Ids
than we do for TyVars.
-For TyVars, see Note [Extending the TCvSubst] in GHC.Core.TyCo.Subst.
+For TyVars, see Note [Extending the TCvSubstEnv] in GHC.Core.TyCo.Subst.
For Ids, we have a different invariant
The IdSubstEnv is extended *only* when the Unique on an Id changes
diff --git a/compiler/GHC/Core/TyCo/FVs.hs b/compiler/GHC/Core/TyCo/FVs.hs
index e837132fc0..b40d930b3c 100644
--- a/compiler/GHC/Core/TyCo/FVs.hs
+++ b/compiler/GHC/Core/TyCo/FVs.hs
@@ -283,7 +283,7 @@ tyCoVarsOfTypes tys = runTyCoVars (deep_tys tys)
-- tyCoVarsOfTypes tys = closeOverKinds (shallowTyCoVarsOfTypes tys)
tyCoVarsOfCo :: Coercion -> TyCoVarSet
--- See Note [Free variables of Coercions]
+-- See Note [Free variables of types]
tyCoVarsOfCo co = runTyCoVars (deep_co co)
tyCoVarsOfMCo :: MCoercion -> TyCoVarSet
diff --git a/compiler/GHC/Core/TyCo/Ppr.hs b/compiler/GHC/Core/TyCo/Ppr.hs
index 2929474d84..5f1a802dfe 100644
--- a/compiler/GHC/Core/TyCo/Ppr.hs
+++ b/compiler/GHC/Core/TyCo/Ppr.hs
@@ -68,17 +68,11 @@ parens around the type, except for the atomic cases. @pprParendType@
works just by setting the initial context precedence very high.
Note that any function which pretty-prints a @Type@ first converts the @Type@
-to an @IfaceType@. See Note [IfaceType and pretty-printing] in GHC.Iface.Type.
+to an @IfaceType@. See Note [Pretty printing via Iface syntax] in GHC.Types.TyThing.Ppr.
See Note [Precedence in types] in GHC.Types.Basic.
-}
---------------------------------------------------------
--- When pretty-printing types, we convert to IfaceType,
--- and pretty-print that.
--- See Note [Pretty printing via Iface syntax] in GHC.Types.TyThing.Ppr
---------------------------------------------------------
-
pprType, pprParendType, pprTidiedType :: Type -> SDoc
pprType = pprPrecType topPrec
pprParendType = pprPrecType appPrec
diff --git a/compiler/GHC/Core/TyCo/Subst.hs b/compiler/GHC/Core/TyCo/Subst.hs
index a5cb32e38e..7322ff5e03 100644
--- a/compiler/GHC/Core/TyCo/Subst.hs
+++ b/compiler/GHC/Core/TyCo/Subst.hs
@@ -781,7 +781,7 @@ substTyCoVar subst tv
| otherwise = CoercionTy $ substCoVar subst tv
lookupTyVar :: TCvSubst -> TyVar -> Maybe Type
- -- See Note [Extending the TCvSubst]
+ -- See Note [Extending the TCvSubstEnv]
lookupTyVar (TCvSubst _ tenv _) tv
= assert (isTyVar tv )
lookupVarEnv tenv tv
@@ -998,7 +998,7 @@ substTyVarBndrUsing subst_fn subst@(TCvSubst in_scope tenv cenv) old_var
no_change = no_kind_change && (new_var == old_var)
-- no_change means that the new_var is identical in
-- all respects to the old_var (same unique, same kind)
- -- See Note [Extending the TCvSubst]
+ -- See Note [Extending the TCvSubstEnv]
--
-- In that case we don't need to extend the substitution
-- to map old to new. But instead we must zap any
diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs
index 48da8e8275..ab30175cb2 100644
--- a/compiler/GHC/Core/TyCon.hs
+++ b/compiler/GHC/Core/TyCon.hs
@@ -958,7 +958,7 @@ data TyCon
-- See Note [The binders/kind/arity fields of a TyCon]
tyConBinders :: [TyConTyCoBinder], -- ^ Full binders
- -- TyConTyCoBinder: see Note [Promoted GADT data construtors]
+ -- TyConTyCoBinder: see Note [Promoted GADT data constructors]
tyConResKind :: Kind, -- ^ Result kind
tyConKind :: Kind, -- ^ Kind of this TyCon
tyConArity :: Arity, -- ^ Arity
@@ -2439,7 +2439,7 @@ setTcTyConKind :: TyCon -> Kind -> TyCon
-- See Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType
setTcTyConKind tc@(TcTyCon {}) kind = let tc' = tc { tyConKind = kind
, tyConNullaryTy = mkNakedTyConTy tc'
- -- see Note [Sharing nullary TyCons]
+ -- see Note [Sharing nullary TyConApps]
}
in tc'
setTcTyConKind tc _ = pprPanic "setTcTyConKind" (ppr tc)
diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs
index cd9944c0a0..0ff846d79e 100644
--- a/compiler/GHC/Core/Unfold.hs
+++ b/compiler/GHC/Core/Unfold.hs
@@ -1173,7 +1173,7 @@ tryUnfolding logger opts !case_depth id lone_variable
UnfWhen { ug_arity = uf_arity, ug_unsat_ok = unsat_ok, ug_boring_ok = boring_ok }
| enough_args && (boring_ok || some_benefit || unfoldingVeryAggressive opts)
- -- See Note [INLINE for small functions (3)]
+ -- See Note [INLINE for small functions] (3)
-> traceInline logger opts id str (mk_doc some_benefit empty True) (Just unf_template)
| otherwise
-> traceInline logger opts id str (mk_doc some_benefit empty False) Nothing
@@ -1244,7 +1244,7 @@ tryUnfolding logger opts !case_depth id lone_variable
= case cont_info of
CaseCtxt -> not (lone_variable && is_exp) -- Note [Lone variables]
ValAppCtxt -> True -- Note [Cast then apply]
- RuleArgCtxt -> uf_arity > 0 -- See Note [Unfold info lazy contexts]
+ RuleArgCtxt -> uf_arity > 0 -- See Note [Unfold into lazy contexts]
DiscArgCtxt -> uf_arity > 0 -- Note [Inlining in ArgCtxt]
RhsCtxt -> uf_arity > 0 --
_other -> False -- See Note [Nested functions]
diff --git a/compiler/GHC/Core/Unfold/Make.hs b/compiler/GHC/Core/Unfold/Make.hs
index 44aa6ba1db..134c8bce69 100644
--- a/compiler/GHC/Core/Unfold/Make.hs
+++ b/compiler/GHC/Core/Unfold/Make.hs
@@ -154,7 +154,7 @@ specUnfolding opts spec_bndrs spec_app rule_lhs_args
df@(DFunUnfolding { df_bndrs = old_bndrs, df_con = con, df_args = args })
= assertPpr (rule_lhs_args `equalLength` old_bndrs)
(ppr df $$ ppr rule_lhs_args) $
- -- For this ASSERT see Note [DFunUnfoldings] in GHC.Core.Opt.Specialise
+ -- For this ASSERT see Note [Specialising DFuns] in GHC.Core.Opt.Specialise
mkDFunUnfolding spec_bndrs con (map spec_arg args)
-- For DFunUnfoldings we transform
-- \obs. MkD <op1> ... <opn>
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index d6653fd387..8caaf95a99 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -946,7 +946,7 @@ combineIdenticalAlts imposs_deflt_cons (Alt con1 bndrs1 rhs1 : rest_alts)
imposs_deflt_cons' = imposs_deflt_cons `minusList` elim_cons
elim_cons = elim_con1 ++ map (\(Alt con _ _) -> con) elim_rest
elim_con1 = case con1 of -- Don't forget con1!
- DEFAULT -> [] -- See Note [
+ DEFAULT -> []
_ -> [con1]
cheapEqTicked e1 e2 = cheapEqExpr' tickishFloatable e1 e2