From d926380d0f6e48fab034df5990c09563160dbcb0 Mon Sep 17 00:00:00 2001
From: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
Date: Wed, 30 Aug 2023 02:01:07 +0200
Subject: [PATCH] Fix typos

---
 .gitlab/ci.sh                                    |  2 +-
 .gitlab/rel_eng/upload.sh                        |  2 +-
 compiler/GHC/Builtin/Types.hs                    |  4 ++--
 compiler/GHC/Builtin/Types/Prim.hs               | 16 ++++++++--------
 compiler/GHC/CmmToAsm.hs                         |  2 +-
 compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs |  2 +-
 compiler/GHC/CmmToAsm/X86/Instr.hs               |  2 +-
 compiler/GHC/CmmToAsm/X86/Regs.hs                |  2 +-
 compiler/GHC/CmmToLlvm/Base.hs                   |  2 +-
 compiler/GHC/Core/Coercion/Opt.hs                |  4 ++--
 compiler/GHC/Core/Make.hs                        |  2 +-
 compiler/GHC/Core/Opt/CSE.hs                     |  2 +-
 compiler/GHC/Core/Opt/ConstantFold.hs            |  2 +-
 compiler/GHC/Core/Opt/DmdAnal.hs                 |  2 +-
 compiler/GHC/Core/Opt/SetLevels.hs               |  2 +-
 compiler/GHC/Core/Opt/Specialise.hs              |  2 +-
 compiler/GHC/Core/Stats.hs                       |  2 +-
 compiler/GHC/Core/TyCo/Rep.hs                    |  2 +-
 compiler/GHC/Core/TyCon.hs                       |  4 ++--
 compiler/GHC/Core/Type.hs                        |  6 +++---
 compiler/GHC/CoreToStg.hs                        |  2 +-
 compiler/GHC/Driver/Config/HsToCore.hs           |  2 +-
 compiler/GHC/Driver/Make.hs                      |  2 +-
 compiler/GHC/HsToCore/Usage.hs                   |  2 +-
 compiler/GHC/HsToCore/Utils.hs                   |  4 ++--
 compiler/GHC/Iface/Load.hs                       |  2 +-
 compiler/GHC/Linker/Deps.hs                      |  5 ++---
 compiler/GHC/Prelude/Basic.hs                    |  2 +-
 compiler/GHC/Rename/Bind.hs                      |  2 +-
 compiler/GHC/Rename/Names.hs                     |  2 +-
 compiler/GHC/Rename/Utils.hs                     |  2 +-
 compiler/GHC/Stg/BcPrep.hs                       |  2 +-
 compiler/GHC/Stg/Unarise.hs                      |  8 ++++----
 compiler/GHC/StgToByteCode.hs                    |  2 +-
 compiler/GHC/Tc/Deriv.hs                         |  2 +-
 compiler/GHC/Tc/Errors/Hole.hs                   |  4 ++--
 compiler/GHC/Tc/Gen/HsType.hs                    |  6 +++---
 compiler/GHC/Tc/Gen/Sig.hs                       |  2 +-
 compiler/GHC/Tc/TyCl.hs                          |  4 ++--
 compiler/GHC/Types/Basic.hs                      |  2 +-
 compiler/GHC/Types/Literal.hs                    |  4 ++--
 compiler/GHC/Types/Name.hs                       |  4 ++--
 compiler/GHC/Utils/Logger.hs                     |  2 +-
 docs/users_guide/exts/type_abstractions.rst      |  4 ++--
 docs/users_guide/ghci.rst                        |  2 +-
 docs/users_guide/using-optimisation.rst          |  2 +-
 ghc/GHCi/UI.hs                                   |  2 +-
 libraries/base/Unsafe/Coerce.hs                  |  2 +-
 testsuite/driver/runtests.py                     |  2 +-
 testsuite/tests/quantified-constraints/T23323.hs |  2 +-
 50 files changed, 74 insertions(+), 75 deletions(-)

diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index a8651c29542f..bfb13fcf5cec 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -642,7 +642,7 @@ function test_hadrian() {
     then
       test_compiler_backend=$(${test_compiler} -e "GHC.Num.Backend.backendName")
       if [ $test_compiler_backend != "\"$BIGNUM_BACKEND\"" ]; then
-        fail "Test compiler has a different BIGNUM_BACKEND ($test_compiler_backend) thean requested ($BIGNUM_BACKEND)"
+        fail "Test compiler has a different BIGNUM_BACKEND ($test_compiler_backend) than requested ($BIGNUM_BACKEND)"
       fi
     fi
 
diff --git a/.gitlab/rel_eng/upload.sh b/.gitlab/rel_eng/upload.sh
index 6d1dfa1d53ef..2b2655d392d8 100755
--- a/.gitlab/rel_eng/upload.sh
+++ b/.gitlab/rel_eng/upload.sh
@@ -19,7 +19,7 @@ set -e
 #                                    tarballs
 #
 #   upload.sh prepare_docs           (deprecated) prepare the documentation directory
-#                                    (this should be unecessary as the script which
+#                                    (this should be unnecessary as the script which
 #                                     fetches artifacts should create this folder from
 #                                     the doc-tarball job)
 #
diff --git a/compiler/GHC/Builtin/Types.hs b/compiler/GHC/Builtin/Types.hs
index c3acb93214cb..86d12d3ae75f 100644
--- a/compiler/GHC/Builtin/Types.hs
+++ b/compiler/GHC/Builtin/Types.hs
@@ -464,9 +464,9 @@ In order to compose these two terms as @length []@ a type
 application is required, but there is no constraint on the
 choice.  In this situation GHC uses 'Any',
 
-> length (Any *) ([] (Any *))
+> length @(Any @Type) ([] @(Any @Type))
 
-Above, we print kinds explicitly, as if with --fprint-explicit-kinds.
+Above, we print kinds explicitly, as if with -fprint-explicit-kinds.
 
 The Any tycon used to be quite magic, but we have since been able to
 implement it merely with an empty kind polymorphic type family. See #10886 for a
diff --git a/compiler/GHC/Builtin/Types/Prim.hs b/compiler/GHC/Builtin/Types/Prim.hs
index 323d033279e0..fed8a3a4b79c 100644
--- a/compiler/GHC/Builtin/Types/Prim.hs
+++ b/compiler/GHC/Builtin/Types/Prim.hs
@@ -420,8 +420,8 @@ mkTemplateKiTyVars
                              -- Result is anon arg kinds [ak1, .., akm]
     -> [TyVar]   -- [kv1:k1, ..., kvn:kn, av1:ak1, ..., avm:akm]
 -- Example: if you want the tyvars for
---   forall (r:RuntimeRep) (a:TYPE r) (b:*). blah
--- call mkTemplateKiTyVars [RuntimeRep] (\[r] -> [TYPE r, *])
+--   forall (r::RuntimeRep) (a::TYPE r) (b::Type). blah
+-- call mkTemplateKiTyVars [RuntimeRep] (\[r] -> [TYPE r, Type])
 mkTemplateKiTyVars kind_var_kinds mk_arg_kinds
   = kv_bndrs ++ tv_bndrs
   where
@@ -435,8 +435,8 @@ mkTemplateKiTyVar
                              -- Result is anon arg kinds [ak1, .., akm]
     -> [TyVar]   -- [kv1:k1, ..., kvn:kn, av1:ak1, ..., avm:akm]
 -- Example: if you want the tyvars for
---   forall (r:RuntimeRep) (a:TYPE r) (b:*). blah
--- call mkTemplateKiTyVar RuntimeRep (\r -> [TYPE r, *])
+--   forall (r::RuntimeRep) (a::TYPE r) (b::Type). blah
+-- call mkTemplateKiTyVar RuntimeRep (\r -> [TYPE r, Type])
 mkTemplateKiTyVar kind mk_arg_kinds
   = kv_bndr : tv_bndrs
   where
@@ -826,7 +826,7 @@ Wrinkles
      are not Apart. See the FunTy/FunTy case in GHC.Core.Unify.unify_ty.
 
 (W3) Are (TYPE IntRep) and (CONSTRAINT WordRep) apart?  In truth yes,
-     they are.  But it's easier to say that htey are not apart, by
+     they are.  But it's easier to say that they are not apart, by
      reporting "maybeApart" (which is always safe), rather than
      recurse into the arguments (whose kinds may be utterly different)
      to look for apartness inside them.  Again this is in
@@ -846,8 +846,8 @@ Wrinkles
 Note [RuntimeRep polymorphism]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Generally speaking, you can't be polymorphic in `RuntimeRep`.  E.g
-   f :: forall (rr:RuntimeRep) (a:TYPE rr). a -> [a]
-   f = /\(rr:RuntimeRep) (a:rr) \(a:rr). ...
+   f :: forall (rr::RuntimeRep) (a::TYPE rr). a -> [a]
+   f = /\(rr::RuntimeRep) (a::rr) \(a::rr). ...
 This is no good: we could not generate code for 'f', because the
 calling convention for 'f' varies depending on whether the argument is
 a a Int, Int#, or Float#.  (You could imagine generating specialised
@@ -856,7 +856,7 @@ code, one for each instantiation of 'rr', but we don't do that.)
 Certain functions CAN be runtime-rep-polymorphic, because the code
 generator never has to manipulate a value of type 'a :: TYPE rr'.
 
-* error :: forall (rr:RuntimeRep) (a:TYPE rr). String -> a
+* error :: forall (rr::RuntimeRep) (a::TYPE rr). String -> a
   Code generator never has to manipulate the return value.
 
 * unsafeCoerce#, defined in Desugar.mkUnsafeCoercePair:
diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs
index 15d09ec4212e..1d4891786738 100644
--- a/compiler/GHC/CmmToAsm.hs
+++ b/compiler/GHC/CmmToAsm.hs
@@ -67,7 +67,7 @@
 module GHC.CmmToAsm
    ( nativeCodeGen
 
-   -- * Test-only exports: see trac #12744
+   -- * Test-only exports: see #12744
    -- used by testGraphNoSpills, which needs to access
    -- the register allocator intermediate data structures
    -- cmmNativeGen emits
diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
index 9c401cca20fd..98501a9b276a 100644
--- a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
+++ b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
@@ -178,7 +178,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcDouble conflicts exclu
                             ArchX86_64    -> 10
                             -- in x86_64 there are 16 XMM registers
                             -- xmm0 .. xmm15, here 10 is a
-                            -- "dont need to solve conflicts" count that
+                            -- "don't need to solve conflicts" count that
                             -- was chosen at some point in the past.
                             ArchPPC       -> 26
                             ArchPPC_64 _  -> 20
diff --git a/compiler/GHC/CmmToAsm/X86/Instr.hs b/compiler/GHC/CmmToAsm/X86/Instr.hs
index b4e93a1c5d13..dfc6c094f7f6 100644
--- a/compiler/GHC/CmmToAsm/X86/Instr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Instr.hs
@@ -257,7 +257,7 @@ data Instr
         -- We need to support the FSTP (x87 store and pop) instruction
         -- so that we can correctly read off the return value of an
         -- x86 CDECL C function call when its floating point.
-        -- so we dont include a register argument, and just use st(0)
+        -- so we don't include a register argument, and just use st(0)
         -- this instruction is used ONLY for return values of C ffi calls
         -- in x86_32 abi
         | X87Store         Format  AddrMode -- st(0), dst
diff --git a/compiler/GHC/CmmToAsm/X86/Regs.hs b/compiler/GHC/CmmToAsm/X86/Regs.hs
index 25746f9debe6..c426868512a9 100644
--- a/compiler/GHC/CmmToAsm/X86/Regs.hs
+++ b/compiler/GHC/CmmToAsm/X86/Regs.hs
@@ -246,7 +246,7 @@ classOfRealReg platform reg
             | otherwise             -> panic "X86.Reg.classOfRealReg registerSingle too high"
 
 -- | Get the name of the register with this number.
--- NOTE: fixme, we dont track which "way" the XMM registers are used
+-- NOTE: fixme, we don't track which "way" the XMM registers are used
 showReg :: Platform -> RegNo -> String
 showReg platform n
         | n >= firstxmm && n <= lastxmm  platform = "%xmm" ++ show (n-firstxmm)
diff --git a/compiler/GHC/CmmToLlvm/Base.hs b/compiler/GHC/CmmToLlvm/Base.hs
index 43c9ef5ba0cd..fa10afb56ecb 100644
--- a/compiler/GHC/CmmToLlvm/Base.hs
+++ b/compiler/GHC/CmmToLlvm/Base.hs
@@ -412,7 +412,7 @@ getUniqMeta s = getEnv (flip lookupUFM s . envUniqMeta)
 -- so as to make sure they have the most general type in the case that
 -- user code also uses these functions but with a different type than GHC
 -- internally. (Main offender is treating return type as 'void' instead of
--- 'void *'). Fixes trac #5486.
+-- 'void *'). Fixes #5486.
 ghcInternalFunctions :: LlvmM ()
 ghcInternalFunctions = do
     platform <- getPlatform
diff --git a/compiler/GHC/Core/Coercion/Opt.hs b/compiler/GHC/Core/Coercion/Opt.hs
index 3cc6a1638df1..a69adb39c95e 100644
--- a/compiler/GHC/Core/Coercion/Opt.hs
+++ b/compiler/GHC/Core/Coercion/Opt.hs
@@ -528,8 +528,8 @@ of arguments in a `CoTyConApp` can differ. Consider
 
   Any :: forall k. k
 
-  Any * Int                      :: *
-  Any (*->*) Maybe Int  :: *
+  Any @Type Int                :: Type
+  Any @(Type->Type) Maybe Int  :: Type
 
 Hence the need to compare argument lengths; see #13658
 
diff --git a/compiler/GHC/Core/Make.hs b/compiler/GHC/Core/Make.hs
index a0f659f31841..c37de55bebbd 100644
--- a/compiler/GHC/Core/Make.hs
+++ b/compiler/GHC/Core/Make.hs
@@ -1251,7 +1251,7 @@ aBSENT_CONSTRAINT_ERROR_ID -- See Note [aBSENT_ERROR_ID]
 
 mkRuntimeErrorId :: TypeOrConstraint -> Name -> Id
 -- Error function
---   with type:  forall (r:RuntimeRep) (a:TYPE r). Addr# -> a
+--   with type:  forall (r::RuntimeRep) (a::TYPE r). Addr# -> a
 --   with arity: 1
 -- which diverges after being given one argument
 -- The Addr# is expected to be the address of
diff --git a/compiler/GHC/Core/Opt/CSE.hs b/compiler/GHC/Core/Opt/CSE.hs
index a70128bf102f..1ae0fb3335f8 100644
--- a/compiler/GHC/Core/Opt/CSE.hs
+++ b/compiler/GHC/Core/Opt/CSE.hs
@@ -43,7 +43,7 @@ and apply that to the rest of the program.
 When we then see
         y1 = C a b
         y2 = C y1 b
-we replace the C a b with x1.  But then we *dont* want to
+we replace the C a b with x1.  But then we *don't* want to
 add   x1 -> y1  to the mapping.  Rather, we want the reverse, y1 -> x1
 so that a subsequent binding
         y2 = C y1 b
diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs
index ea0f4b6569c2..3df7d093a023 100644
--- a/compiler/GHC/Core/Opt/ConstantFold.hs
+++ b/compiler/GHC/Core/Opt/ConstantFold.hs
@@ -2081,7 +2081,7 @@ Things to note
 * Why do we need a primop at all?  That is, instead of
       case seq# x s of (# x, s #) -> blah
   why not instead say this?
-      case x of { DEFAULT -> blah)
+      case x of { DEFAULT -> blah }
 
   Reason (see #5129): if we saw
     catch# (\s -> case x of { DEFAULT -> raiseIO# exn s }) handler
diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs
index 9fc9f5f4044f..1dbddda4b170 100644
--- a/compiler/GHC/Core/Opt/DmdAnal.hs
+++ b/compiler/GHC/Core/Opt/DmdAnal.hs
@@ -2160,7 +2160,7 @@ Wrinkle (DNB1): we /do/ want to unbox tuple dictionaries (#23398)
              in ...f @a (% sel1 d, sel2 d %)
   and all the tuple building and taking apart will disappear.
 
-Wrinkle (DNB2): we /do/ wnat to unbox equality dictionaries,
+Wrinkle (DNB2): we /do/ want to unbox equality dictionaries,
   for (~), (~~), and Coercible (#23398).  Their payload is a single unboxed
   coercion.  We never want to specialise on `(t1 ~ t2)`.  All that would do is
   to make a copy of the function's RHS with a particular coercion.  Unlike
diff --git a/compiler/GHC/Core/Opt/SetLevels.hs b/compiler/GHC/Core/Opt/SetLevels.hs
index 93e9bf073ef7..4ebe1ce2abca 100644
--- a/compiler/GHC/Core/Opt/SetLevels.hs
+++ b/compiler/GHC/Core/Opt/SetLevels.hs
@@ -529,7 +529,7 @@ Things to note:
 
  * The test we perform is exprIsHNF, and /not/ exprOkForSpeculation.
 
-     - exrpIsHNF catches the key case of an evaluated variable
+     - exprIsHNF catches the key case of an evaluated variable
 
      - exprOkForSpeculation is /false/ of an evaluated variable;
        See Note [exprOkForSpeculation and evaluated variables] in GHC.Core.Utils
diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs
index 7f78dff7e1a0..6e66400c9816 100644
--- a/compiler/GHC/Core/Opt/Specialise.hs
+++ b/compiler/GHC/Core/Opt/Specialise.hs
@@ -2903,7 +2903,7 @@ where
 is a top-level dictionary-former.  This actually happened in #22459,
 because of (MP1) of Note [Specialising polymorphic dictionaries].
 
-How can we speicalise $wsplit?  We might try
+How can we specialise $wsplit?  We might try
 
    RULE "SPEC" forall (d :: C T). $wsplit @T d = $s$wsplit
 
diff --git a/compiler/GHC/Core/Stats.hs b/compiler/GHC/Core/Stats.hs
index 04e6bc327421..30f4f1accc38 100644
--- a/compiler/GHC/Core/Stats.hs
+++ b/compiler/GHC/Core/Stats.hs
@@ -98,7 +98,7 @@ coStats :: Coercion -> CoreStats
 coStats co = zeroCS { cs_co = coercionSize co }
 
 coreBindsSize :: [CoreBind] -> Int
--- We use coreBindStats for user printout
+-- We use coreBindsStats for user printout
 -- but this one is a quick and dirty basis for
 -- the simplifier's tick limit
 coreBindsSize bs = sum (map bindSize bs)
diff --git a/compiler/GHC/Core/TyCo/Rep.hs b/compiler/GHC/Core/TyCo/Rep.hs
index f85ca8f90f0a..d57b18c25413 100644
--- a/compiler/GHC/Core/TyCo/Rep.hs
+++ b/compiler/GHC/Core/TyCo/Rep.hs
@@ -296,7 +296,7 @@ When treated as a user type,
     implicitly instantiated
 
   - Coercion types, and non-pred evidence types (i.e. not
-    of kind Constrain), are just regular old types, are
+    of kind Constraint), are just regular old types, are
     visible, and are not implicitly instantiated.
 
 In a FunTy { ft_af = af } and af = FTF_C_T or FTF_C_C, the argument
diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs
index 2afeae415599..fa987335baba 100644
--- a/compiler/GHC/Core/TyCon.hs
+++ b/compiler/GHC/Core/TyCon.hs
@@ -1337,7 +1337,7 @@ via the PromotedDataCon alternative in GHC.Core.TyCon.
 Note [Enumeration types]
 ~~~~~~~~~~~~~~~~~~~~~~~~
 We define datatypes with no constructors to *not* be
-enumerations; this fixes trac #2578,  Otherwise we
+enumerations; this fixes #2578,  Otherwise we
 end up generating an empty table for
   <mod>_<type>_closure_tbl
 which is used by tagToEnum# to map Int# to constructors
@@ -1869,7 +1869,7 @@ mkTcTyCon name binders res_kind scoped_tvs poly flav
 noTcTyConScopedTyVars :: [(Name, TcTyVar)]
 noTcTyConScopedTyVars = []
 
--- | Create an primitive 'TyCon', such as @Int#@, @Type@ or @RealWorld#@
+-- | Create an primitive 'TyCon', such as @Int#@, @Type@ or @RealWorld@
 -- Primitive TyCons are marshalable iff not lifted.
 -- If you'd like to change this, modify marshalablePrimTyCon.
 mkPrimTyCon :: Name -> [TyConBinder]
diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs
index 124ad34a1edb..d83b52541002 100644
--- a/compiler/GHC/Core/Type.hs
+++ b/compiler/GHC/Core/Type.hs
@@ -430,7 +430,7 @@ saturates _       0 = True
 saturates []      _ = False
 saturates (_:tys) n = assert( n >= 0 ) $ saturates tys (n-1)
                        -- Arities are always positive; the assertion just checks
-                       -- that, to avoid an ininite loop in the bad case
+                       -- that, to avoid an infinite loop in the bad case
 
 -- | A helper for 'expandSynTyConApp_maybe' to avoid inlining this cold path
 -- into call-sites.
@@ -816,7 +816,7 @@ runtimeRepLevity_maybe rep
             [lev] -> levityType_maybe lev
             _     -> Nothing  -- Type isn't of kind RuntimeRep
                      -- The latter case happens via the call to isLiftedRuntimeRep
-                     -- in GHC.Tc.Errors.Ppr.pprMisMatchMsg (#22742)
+                     -- in GHC.Tc.Errors.Ppr.pprMismatchMsg (#22742)
     else Just Unlifted
         -- Avoid searching all the unlifted RuntimeRep type cons
         -- In the RuntimeRep data type, only LiftedRep is lifted
@@ -1619,7 +1619,7 @@ splitTyConAppNoView_maybe ty
 -- of a 'FunTy' with an argument of unknown kind 'FunTy'
 -- (e.g. `FunTy (a :: k) Int`, since the kind of @a@ isn't of
 -- the form `TYPE rep`.  This isn't usually a problem but may
--- be temporarily the cas during canonicalization:
+-- be temporarily the case during canonicalization:
 --     see Note [Decomposing FunTy] in GHC.Tc.Solver.Equality
 --     and Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType,
 --         Wrinkle around FunTy
diff --git a/compiler/GHC/CoreToStg.hs b/compiler/GHC/CoreToStg.hs
index 2d62d4698798..33c9446dd872 100644
--- a/compiler/GHC/CoreToStg.hs
+++ b/compiler/GHC/CoreToStg.hs
@@ -558,7 +558,7 @@ coreToStgApp f args ticks = do
         tapp = foldr add_tick app (map (coreToStgTick res_ty) ticks ++ ticks')
 
     -- Forcing these fixes a leak in the code generator, noticed while
-    -- profiling for trac #4367
+    -- profiling for #4367
     app `seq` return tapp
 
 -- ---------------------------------------------------------------------------
diff --git a/compiler/GHC/Driver/Config/HsToCore.hs b/compiler/GHC/Driver/Config/HsToCore.hs
index 325a4546be2b..c2c1c9e98717 100644
--- a/compiler/GHC/Driver/Config/HsToCore.hs
+++ b/compiler/GHC/Driver/Config/HsToCore.hs
@@ -12,7 +12,7 @@ initBangOpts dflags = BangOpts
   { bang_opt_strict_data   = xopt LangExt.StrictData dflags
   , bang_opt_unbox_disable = gopt Opt_OmitInterfacePragmas dflags
       -- Don't unbox if we aren't optimising; rather arbitrarily,
-      -- we use -fomit-iface-pragmas as the indication
+      -- we use -fomit-interface-pragmas as the indication
   , bang_opt_unbox_strict  = gopt Opt_UnboxStrictFields dflags
   , bang_opt_unbox_small   = gopt Opt_UnboxSmallStrictFields dflags
   }
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index c3d69347efea..d3113601239c 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -742,7 +742,7 @@ load' mhmi_cache how_much diag_wrapper mHscMessage mod_graph = do
     checkHowMuch how_much $ do
 
     -- mg2_with_srcimps drops the hi-boot nodes, returning a
-    -- graph with cycles. It is just used for warning about unecessary source imports.
+    -- graph with cycles. It is just used for warning about unnecessary source imports.
     let mg2_with_srcimps :: [SCC ModuleGraphNode]
         mg2_with_srcimps = topSortModuleGraph True mod_graph Nothing
 
diff --git a/compiler/GHC/HsToCore/Usage.hs b/compiler/GHC/HsToCore/Usage.hs
index 59a8c0107350..64508e70a80b 100644
--- a/compiler/GHC/HsToCore/Usage.hs
+++ b/compiler/GHC/HsToCore/Usage.hs
@@ -235,7 +235,7 @@ mk_mod_usage_info uc home_unit home_unit_ids this_mod direct_imports used_names
                             else mod
                 -- This lambda function is really just a
                 -- specialised (++); originally came about to
-                -- avoid quadratic behaviour (trac #2680)
+                -- avoid quadratic behaviour (#2680)
                 in extendModuleEnvWith (\_ xs -> occ:xs) mv_map mod' [occ]
             where occ = nameOccName name
 
diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs
index e382755409af..3b96fd14a113 100644
--- a/compiler/GHC/HsToCore/Utils.hs
+++ b/compiler/GHC/HsToCore/Utils.hs
@@ -643,7 +643,7 @@ There are two cases.
     The 'Solo' is a one-tuple; see Note [One-tuples] in GHC.Builtin.Types
     Note that forcing 't' makes the pattern match happen,
     but does not force 'v'.  That's why we call `mkBigCoreVarTupSolo`
-    in `mkSeletcorBinds`
+    in `mkSelectorBinds`
 
   * The pattern binds no variables
         let !(True,False) = e in body
@@ -913,7 +913,7 @@ anyway, and the Void# doesn't do much harm.
 mkFailurePair :: CoreExpr       -- Result type of the whole case expression
               -> DsM (CoreBind, -- Binds the newly-created fail variable
                                 -- to \ _ -> expression
-                      CoreExpr) -- Fail variable applied to realWorld#
+                      CoreExpr) -- Fail variable applied to (# #)
 -- See Note [Failure thunks and CPR]
 mkFailurePair expr
   = do { fail_fun_var <- newFailLocalDs ManyTy (unboxedUnitTy `mkVisFunTyMany` ty)
diff --git a/compiler/GHC/Iface/Load.hs b/compiler/GHC/Iface/Load.hs
index 97aed71b8021..478b1a523f92 100644
--- a/compiler/GHC/Iface/Load.hs
+++ b/compiler/GHC/Iface/Load.hs
@@ -1064,7 +1064,7 @@ In order to disambiguate between identifiers from different modules, we qualify
 all names that don't originate in the current module. In order to keep visual
 noise as low as possible, we keep local names unqualified.
 
-For some background on this choice see trac #15269.
+For some background on this choice see #15269.
 -}
 
 -- | Read binary interface, and print it out
diff --git a/compiler/GHC/Linker/Deps.hs b/compiler/GHC/Linker/Deps.hs
index 64210b14789c..9bf46ea3c918 100644
--- a/compiler/GHC/Linker/Deps.hs
+++ b/compiler/GHC/Linker/Deps.hs
@@ -323,9 +323,8 @@ get_link_deps opts pls maybe_normal_osuf span mods = do
 {-
 Note [Using Byte Code rather than Object Code for Template Haskell]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 The `-fprefer-byte-code` flag allows a user to specify that they want to use
-byte code (if availble) rather than object code for home module dependenices
+byte code (if available) rather than object code for home module dependencies
 when executing Template Haskell splices.
 
 Why might you want to use byte code rather than object code?
@@ -336,7 +335,7 @@ Why might you want to use byte code rather than object code?
 So we allow the user to choose to use byte code rather than object files if they want to avoid these
 two pitfalls.
 
-When using `-fprefer-byte-code` you have to arrange to have the byte code availble.
+When using `-fprefer-byte-code` you have to arrange to have the byte code available.
 In normal --make mode it will not be produced unless you enable `-fbyte-code-and-object-code`.
 See Note [Home module build products] for some more information about that.
 
diff --git a/compiler/GHC/Prelude/Basic.hs b/compiler/GHC/Prelude/Basic.hs
index b3a311fdb765..8b0ff5109be0 100644
--- a/compiler/GHC/Prelude/Basic.hs
+++ b/compiler/GHC/Prelude/Basic.hs
@@ -13,7 +13,7 @@
 
 -- Every module in GHC
 --   * Is compiled with -XNoImplicitPrelude
---   * Explicitly imports GHC.BasicPrelude or GHC.Prelude
+--   * Explicitly imports GHC.Prelude.Basic or GHC.Prelude
 --   * The later provides some functionality with within ghc itself
 --     like pprTrace.
 
diff --git a/compiler/GHC/Rename/Bind.hs b/compiler/GHC/Rename/Bind.hs
index a633ccc98251..f1222f6b8f0a 100644
--- a/compiler/GHC/Rename/Bind.hs
+++ b/compiler/GHC/Rename/Bind.hs
@@ -618,7 +618,7 @@ and we seq fvs' before turning it as part of a record.
 The reason is that trim is sometimes something like
     \xs -> intersectNameSet (mkNameSet bound_names) xs
 and we don't want to retain the list bound_names. This showed up in
-trac ticket #1136.
+ticket #1136.
 -}
 
 {- *********************************************************************
diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs
index 18fab379095a..b1cb3392d6dd 100644
--- a/compiler/GHC/Rename/Names.hs
+++ b/compiler/GHC/Rename/Names.hs
@@ -1948,7 +1948,7 @@ warnUnusedImport rdr_env (L loc decl, used, unused)
   where
     -- In warning message, pretty-print identifiers unqualified unconditionally
     -- to improve the consistent for ambiguous/unambiguous identifiers.
-    -- See trac#14881.
+    -- See #14881.
     possible_field n =
       case lookupGRE_Name rdr_env n of
         Just (GRE { gre_par = par, gre_info = IAmRecField info }) ->
diff --git a/compiler/GHC/Rename/Utils.hs b/compiler/GHC/Rename/Utils.hs
index d8cda861d63f..e0ee22c55826 100644
--- a/compiler/GHC/Rename/Utils.hs
+++ b/compiler/GHC/Rename/Utils.hs
@@ -373,7 +373,7 @@ warnUnusedTopBinds gres
                             _        -> False
              -- Don't warn about unused bindings with parents in
              -- .hs-boot files, as you are sometimes required to give
-             -- unused bindings (trac #3449).
+             -- unused bindings (#3449).
              -- HOWEVER, in a signature file, you are never obligated to put a
              -- definition in the main text.  Thus, if you define something
              -- and forget to export it, we really DO want to warn.
diff --git a/compiler/GHC/Stg/BcPrep.hs b/compiler/GHC/Stg/BcPrep.hs
index e84fdf1fda95..8defb7730ced 100644
--- a/compiler/GHC/Stg/BcPrep.hs
+++ b/compiler/GHC/Stg/BcPrep.hs
@@ -170,7 +170,7 @@ opportunity here, but that is beyond the scope of my (Richard E's) Thursday.)
 
 We thus must have *some* strategy for dealing with representation-polymorphic
 and unlifted join points. Representation-polymorphic variables are generally
-not allowed (though representation -polymorphic join points *are*; see
+not allowed (though representation-polymorphic join points *are*; see
 Note [Invariants on join points] in GHC.Core, point 6), and we don't wish to
 evaluate unlifted join points eagerly.
 The questionable join points are *not-necessarily-lifted join points*
diff --git a/compiler/GHC/Stg/Unarise.hs b/compiler/GHC/Stg/Unarise.hs
index 24025605cbaa..0b28cc5cab27 100644
--- a/compiler/GHC/Stg/Unarise.hs
+++ b/compiler/GHC/Stg/Unarise.hs
@@ -896,7 +896,7 @@ mkUbxSum dc ty_args args0 us
       mkTupArg (arg_idx, arg_map, us, wrapper) slot
          | Just stg_arg <- IM.lookup arg_idx arg_map
          =  case castArg us slot stg_arg of
-              -- Slot and arg type missmatched, do a cast
+              -- Slot and arg type mismatched, do a cast
               Just (casted_arg,us',wrapper') ->
                 ( (arg_idx+1, arg_map, us', wrapper . wrapper')
                 , casted_arg)
@@ -963,13 +963,13 @@ For arguments (StgArg) and binders (Id) we have two kind of unarisation:
   - When unarising function arg binders and arguments, we don't want to remove
     void binders and arguments. For example,
 
-      f :: (# (# #), (# #) #) -> Void# -> RealWorld# -> ...
+      f :: (# (# #), (# #) #) -> Void# -> State# RealWorld -> ...
       f x y z = <body>
 
     Here after unarise we should still get a function with arity 3. Similarly
     in the call site we shouldn't remove void arguments:
 
-      f (# (# #), (# #) #) void# rw
+      f (# (# #), (# #) #) void# realWorld#
 
     When unarising <body>, we extend the environment with these binders:
 
@@ -1129,7 +1129,7 @@ voidArg :: StgArg
 voidArg = StgVarArg voidPrimId
 
 mkDefaultLitAlt :: [StgAlt] -> [StgAlt]
--- We have an exhauseive list of literal alternatives
+-- We have an exhaustive list of literal alternatives
 --    1# -> e1
 --    2# -> e2
 -- Since they are exhaustive, we can replace one with DEFAULT, to avoid
diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs
index 0ffaa2c10ca1..4b9947578c23 100644
--- a/compiler/GHC/StgToByteCode.hs
+++ b/compiler/GHC/StgToByteCode.hs
@@ -862,7 +862,7 @@ doCase d s p scrut bndr alts
         -- Are we dealing with an unboxed tuple with a tuple return frame?
         --
         -- 'Simple' tuples with at most one non-void component,
-        -- like (# Word# #) or (# Int#, State# RealWorld# #) do not have a
+        -- like (# Word# #) or (# Int#, State# RealWorld #) do not have a
         -- tuple return frame. This is because (# foo #) and (# foo, Void# #)
         -- have the same runtime rep. We have more efficient specialized
         -- return frames for the situations with one non-void element.
diff --git a/compiler/GHC/Tc/Deriv.hs b/compiler/GHC/Tc/Deriv.hs
index 2606e145bd0e..3d4ae7d201cb 100644
--- a/compiler/GHC/Tc/Deriv.hs
+++ b/compiler/GHC/Tc/Deriv.hs
@@ -1981,7 +1981,7 @@ doDerivInstErrorChecks1 mechanism =
     DerivSpecStock{dsm_stock_dit = dit}
       -> data_cons_in_scope_check dit
     -- No need to 'data_cons_in_scope_check' for newtype deriving.
-    -- Additionally, we also don't need to mark the constructos as
+    -- Additionally, we also don't need to mark the constructors as
     -- used because newtypes are handled separately elsewhere.
     -- See Note [Tracking unused binding and imports] in GHC.Tc.Types
     -- or #17328 for more.
diff --git a/compiler/GHC/Tc/Errors/Hole.hs b/compiler/GHC/Tc/Errors/Hole.hs
index 8d0c0fa9a9c3..189c115b032c 100644
--- a/compiler/GHC/Tc/Errors/Hole.hs
+++ b/compiler/GHC/Tc/Errors/Hole.hs
@@ -402,7 +402,7 @@ is discarded.
 
 Note [Speeding up valid hole-fits]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-To fix #16875 we noted that a lot of time was being spent on unecessary work.
+To fix #16875 we noted that a lot of time was being spent on unnecessary work.
 
 When we'd call `tcCheckHoleFit hole hole_ty ty`, we would end up by generating
 a constraint to show that `hole_ty ~ ty`, including any constraints in `ty`. For
@@ -956,7 +956,7 @@ tcSubsumes ty_a ty_b = fst <$> tcCheckHoleFit dummyHole ty_a ty_b
                               , th_implics      = []
                               , th_hole         = Nothing }
 
--- | A tcSubsumes which takes into account relevant constraints, to fix trac
+-- | A tcSubsumes which takes into account relevant constraints, to fix
 -- #14273. This makes sure that when checking whether a type fits the hole,
 -- the type has to be subsumed by type of the hole as well as fulfill all
 -- constraints on the type of the hole.
diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs
index a1c81c290f7c..e94d20b0bf21 100644
--- a/compiler/GHC/Tc/Gen/HsType.hs
+++ b/compiler/GHC/Tc/Gen/HsType.hs
@@ -2119,7 +2119,7 @@ The type desugarer is phase 2 of dealing with HsTypes.  Specifically:
 
   * It zonks any kinds.  The returned type should have no mutable kind
     or type variables (hence returning Type not TcType):
-      - any unconstrained kind variables are defaulted to (Any *) just
+      - any unconstrained kind variables are defaulted to (Any @Type) just
         as in GHC.Tc.Zonk.Type.
       - there are no mutable type variables because we are
         kind-checking a type
@@ -2130,7 +2130,7 @@ You might worry about nested scopes:
         ..a:kappa in scope..
             let f :: forall b. T '[a,b] -> Int
 In this case, f's type could have a mutable kind variable kappa in it;
-and we might then default it to (Any *) when dealing with f's type
+and we might then default it to (Any @Type) when dealing with f's type
 signature.  But we don't expect this to happen because we can't get a
 lexically scoped type variable with a mutable kind variable in it.  A
 delicate point, this.  If it becomes an issue we might need to
@@ -2155,7 +2155,7 @@ as if $(..blah..) :: forall k. k.
 In the e1 example, the context of the splice fixes kappa to *.  But
 in the e2 example, we'll desugar the type, zonking the kind unification
 variables as we go.  When we encounter the unconstrained kappa, we
-want to default it to '*', not to (Any *).
+want to default it to 'Type', not to (Any @Type).
 
 -}
 
diff --git a/compiler/GHC/Tc/Gen/Sig.hs b/compiler/GHC/Tc/Gen/Sig.hs
index fb199da379e6..f0804f023e42 100644
--- a/compiler/GHC/Tc/Gen/Sig.hs
+++ b/compiler/GHC/Tc/Gen/Sig.hs
@@ -777,7 +777,7 @@ Some wrinkles
 
 tcSpecPrags :: Id -> [LSig GhcRn]
             -> TcM [LTcSpecPrag]
--- Add INLINE and SPECIALSE pragmas
+-- Add INLINE and SPECIALISE pragmas
 --    INLINE prags are added to the (polymorphic) Id directly
 --    SPECIALISE prags are passed to the desugarer via TcSpecPrags
 -- Pre-condition: the poly_id is zonked
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index 6a359a68b903..a789f5c4924f 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -3402,7 +3402,7 @@ unravelFamInstPats fam_app
         -- The Nothing case cannot happen for type families, because
         -- we don't call unravelFamInstPats until we've solved the
         -- equalities. For data families, it shouldn't happen either,
-        -- we need to fail hard and early if it does. See trac issue #15905
+        -- we need to fail hard and early if it does. See issue #15905
         -- for an example of this happening.
 
 addConsistencyConstraints :: AssocInstInfo -> TcType -> TcM ()
@@ -4746,7 +4746,7 @@ checkValidDataCon dflags existential_ok tc con
 checkNewDataCon :: DataCon -> TcM ()
 -- Further checks for the data constructor of a newtype
 -- You might wonder if we need to check for an unlifted newtype
--- without -XUnliftedNewTypes, such as
+-- without -XUnliftedNewtypes, such as
 --   newtype C = MkC Int#
 -- But they are caught earlier, by GHC.Tc.Gen.HsType.checkDataKindSig
 checkNewDataCon con
diff --git a/compiler/GHC/Types/Basic.hs b/compiler/GHC/Types/Basic.hs
index 758b7f4abdbf..cb806eb425a6 100644
--- a/compiler/GHC/Types/Basic.hs
+++ b/compiler/GHC/Types/Basic.hs
@@ -2211,7 +2211,7 @@ GHC.Tc.Solver.applyDefaultingRules
 GHC.Iface.Type.defaultIfaceTyVarsOfKind
 
   This is a built-in defaulting mechanism that only applies when pretty-printing.
-  It defaults 'RuntimeRep'/'Levity' variables unless -fprint-explicit-kinds is enabled,
+  It defaults 'RuntimeRep'/'Levity' variables unless -fprint-explicit-runtime-reps is enabled,
   and 'Multiplicity' variables unless -XLinearTypes is enabled.
 
 -}
diff --git a/compiler/GHC/Types/Literal.hs b/compiler/GHC/Types/Literal.hs
index 1bb9ddb31b4d..a1e4f63f124b 100644
--- a/compiler/GHC/Types/Literal.hs
+++ b/compiler/GHC/Types/Literal.hs
@@ -136,8 +136,8 @@ data Literal
   | LitRubbish                  -- ^ A nonsense value; See Note [Rubbish literals].
       TypeOrConstraint          -- t_or_c: whether this is a type or a constraint
       RuntimeRepType            -- rr: a type of kind RuntimeRep
-      -- The type of the literal is forall (a:TYPE rr). a
-      --                         or forall (a:CONSTRAINT rr). a
+      -- The type of the literal is forall (a::TYPE rr). a
+      --                         or forall (a::CONSTRAINT rr). a
       --
       -- INVARIANT: the Type has no free variables
       --    and so substitution etc can ignore it
diff --git a/compiler/GHC/Types/Name.hs b/compiler/GHC/Types/Name.hs
index 703a973752aa..9d5fdd5f5403 100644
--- a/compiler/GHC/Types/Name.hs
+++ b/compiler/GHC/Types/Name.hs
@@ -199,7 +199,7 @@ So a comparison like `x == int8TyConName` will turn into `getUnique x ==
 int8TyConKey`, nice and efficient.  But if the `n_occ` field is strict, that
 definition will look like:
 
-   int8TyCOnName = case (mkOccName..."Int8") of occ ->
+   int8TyConName = case (mkOccName..."Int8") of occ ->
                    Name gHC_INT occ int8TyConKey
 
 and now the comparison will not optimise.  This matters even more when there are
@@ -606,7 +606,7 @@ instance Eq Name where
 -- | __Caution__: This instance is implemented via `nonDetCmpUnique`, which
 -- means that the ordering is not stable across deserialization or rebuilds.
 --
--- See `nonDetCmpUnique` for further information, and trac #15240 for a bug
+-- See `nonDetCmpUnique` for further information, and #15240 for a bug
 -- caused by improper use of this instance.
 
 -- For a deterministic lexicographic ordering, use `stableNameCmp`.
diff --git a/compiler/GHC/Utils/Logger.hs b/compiler/GHC/Utils/Logger.hs
index 9d8370d297ca..e1fc3832c312 100644
--- a/compiler/GHC/Utils/Logger.hs
+++ b/compiler/GHC/Utils/Logger.hs
@@ -505,7 +505,7 @@ chooseDumpFile logflags ways flag
 
     getPrefix
          -- dump file location is being forced
-         --      by the --ddump-file-prefix flag.
+         --      by the -ddump-file-prefix flag.
        | Just prefix <- log_dump_prefix_override logflags
           = prefix
          -- dump file locations, module specified to [modulename] set by
diff --git a/docs/users_guide/exts/type_abstractions.rst b/docs/users_guide/exts/type_abstractions.rst
index 2e5e8ecab7a0..67f4c0823530 100644
--- a/docs/users_guide/exts/type_abstractions.rst
+++ b/docs/users_guide/exts/type_abstractions.rst
@@ -43,7 +43,7 @@ a GADT data constructor as in the following example::
     main :: IO ()
     main = print $ test (Foo @Float)
 
-In this example, the case in ``test``` is binding an existential variable introduced
+In this example, the case in ``test`` is binding an existential variable introduced
 by ``Foo`` that otherwise could not be named and used.
 
 It's possible to bind variables to any part of the type arguments to a constructor;
@@ -188,4 +188,4 @@ signature. The inferred ``forall k.`` does not float to the left; the order of
 quantifiers continues to match the order of binders in the header::
 
     -- Inferred kind: forall k. k -> forall j. j -> Type
-    data B @(k :: Type) (a :: k) @(j :: Type) (b :: j)
\ No newline at end of file
+    data B @(k :: Type) (a :: k) @(j :: Type) (b :: j)
diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst
index a2966b1d147d..2fa4062b70a5 100644
--- a/docs/users_guide/ghci.rst
+++ b/docs/users_guide/ghci.rst
@@ -2860,7 +2860,7 @@ commonly used commands.
     Sets the function to be used for the prompt displaying in GHCi. The
     function should be of the type ``[String] -> Int -> IO String``. This
     function is called each time the prompt is being made. The first argument
-    stands for the names of the modules currently in scope(the name of the
+    stands for the names of the modules currently in scope (the name of the
     "topmost" module  will begin with a ``*``; see  :ref:`ghci-scope` for
     more information). The second arguments is the line number (as referenced
     in compiler  messages) of the current prompt.
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 849d81605e94..5a6c8efeffdb 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -372,7 +372,7 @@ as such you shouldn't need to set any of them explicitly. A flag
         sumIO :: [Int] -> IO Int
         sumIO xs = IO $ \s -> case $wsum xs s of
           (# s', r #) -> (# s', I# r #)
-        $wsumIO :: [Int] -> (# RealWorld#, Int# #)
+        $wsumIO :: [Int] -> (# State# RealWorld, Int# #)
         $wsumIO []        s = (# s, 0# #)
         $wsumIO (I# x:xs) s = case $wsumIO xs of
           (# s', r #) -> (# s', x +# r#)
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index f412467c70d6..f32c636d6528 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -2677,7 +2677,7 @@ browseModule bang modl exports_only = do
             -- annotate groups of imports with their import modules
             -- the default ordering is somewhat arbitrary, so we group
             -- by header and sort groups; the names themselves should
-            -- really come in order of source appearance.. (trac #1799)
+            -- really come in order of source appearance.. (#1799)
             annotate mts = concatMap (\(m,ts)->labels m:ts)
                          $ sortBy cmpQualifiers $ grp mts
               where cmpQualifiers =
diff --git a/libraries/base/Unsafe/Coerce.hs b/libraries/base/Unsafe/Coerce.hs
index 33cfcc9bc1a9..8e2c569aea53 100644
--- a/libraries/base/Unsafe/Coerce.hs
+++ b/libraries/base/Unsafe/Coerce.hs
@@ -180,7 +180,7 @@ several ways
      no longer does that.  So we need a separate map/unsafeCoerce
      RULE, in this module.
 
-     Adding these RULES means we must delay inlinine unsafeCoerce
+     Adding these RULES means we must delay inlining unsafeCoerce
      until the RULES have had a chance to fire; hence the INLINE[1]
      pragma on unsafeCoerce.  (Side note: this has the coincidental
      benefit of making the unsafeCoerce-based version of the `reflection`
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index fc0c38360cf5..4c63141a7151 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -88,7 +88,7 @@ perf_group.add_argument("--only-perf-tests", action="store_true", help="Only do
 parser.add_argument("--ignore-perf-failures", choices=['increases','decreases','all'],
                         help="Do not fail due to out-of-tolerance perf tests")
 parser.add_argument("--only-report-hadrian-deps", type=argparse.FileType('w'),
-                        help="Dry run the testsuite and report all extra hadrian depenedencies needed on the given file")
+                        help="Dry run the testsuite and report all extra hadrian dependencies needed on the given file")
 
 args = parser.parse_args()
 
diff --git a/testsuite/tests/quantified-constraints/T23323.hs b/testsuite/tests/quantified-constraints/T23323.hs
index 5cb82e30abca..29410a890a7b 100644
--- a/testsuite/tests/quantified-constraints/T23323.hs
+++ b/testsuite/tests/quantified-constraints/T23323.hs
@@ -13,5 +13,5 @@ foo :: forall f c. (forall a. c a => Show (f a)) => Proxy c -> f Int -> Int
 foo = foo
 
 bar = foo @T @Eq
--- We dont' want to report a redundance (Eq a) constraint
+-- We don't want to report a redundant (Eq a) constraint
 
-- 
GitLab