summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-02-03 17:15:05 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-08 05:28:42 -0500
commit38c6e301165777b88cc172aafed1b33d6f42099b (patch)
treebb97c29f4d2701c32811ae98e7ea523da0bc0a2a /compiler/GHC/Tc
parentbc5cbce61b57f57cadf5c25fa3e60cf34c3b98ea (diff)
downloadhaskell-38c6e301165777b88cc172aafed1b33d6f42099b.tar.gz
Fix some notes
Diffstat (limited to 'compiler/GHC/Tc')
-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
12 files changed, 16 insertions, 16 deletions
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