diff --git a/HACKING.md b/HACKING.md
index cb68889904a21c24021ef5304908c4424a14197e..0a532b4effb8255e8007cf1e4b30b399448ec16a 100644
--- a/HACKING.md
+++ b/HACKING.md
@@ -8,9 +8,9 @@ information to help you get started right away.
 The GHC Developer's Wiki
 ========================
 
-The home for GHC hackers is our Trac instance, located here:
+The home for GHC hackers is our GitLab instance, located here:
 
-<http://ghc.haskell.org/trac/ghc>
+<https://gitlab.haskell.org/ghc/ghc>
 
 From here, you can file bugs (or look them up,) use the wiki, view the
 `git` history, among other things. Of particular note is the building
@@ -64,8 +64,8 @@ Now, hack on your copy and rebuild (with `make`) as necessary.
 Then start by making your commits however you want. When you're done, you can submit
  a pull request on Github for small changes. For larger changes the patch needs to be
  submitted to [Phabricator](https://phabricator.haskell.org/) for code review.
- The GHC Trac Wiki has a good summary for the [overall process](https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/FixingBugs)
- as well as a guide on 
+ The GHC Wiki has a good summary for the [overall process](https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/FixingBugs)
+ as well as a guide on
  [how to use Phabricator/arcanist](https://ghc.haskell.org/trac/ghc/wiki/Phabricator).
 
 
diff --git a/Makefile b/Makefile
index 73dc7ed8be0e008a0ad082700ab2471d494319bf..f172ab0b3f5f9f6880e0e0cfdc4770e2f9ff0480 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ MAKEFLAGS += --no-builtin-rules
 # -----------------------------------------------------------------------------
 # Sanitize environment
 
-# See Trac #11530
+# See #11530
 export GREP_OPTIONS :=
 
 ifneq "$(filter maintainer-clean distclean clean clean_% help,$(MAKECMDGOALS))" ""
diff --git a/README.md b/README.md
index 02bf4a8f1ab376dae1ccaf321703a93402dbe867..ef6652a0ed343a2c670ac348f933ebdd07faee82 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ environment for the Haskell functional programming language.
 
 For more information, visit [GHC's web site][1].
 
-Information for developers of GHC can be found on the [GHC Trac][2].
+Information for developers of GHC can be found on the [GHC issue tracker][2].
 
 
 Getting the Source
diff --git a/aclocal.m4 b/aclocal.m4
index 1647119e034c0bf0d5460a16287110428a4d67d1..1d19b30789f535c2af71ceec589b3d4651989c1f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1483,7 +1483,7 @@ AC_SUBST([GhcPkgCmd])
 # to compile .hc code.
 #
 # -fwrapv is needed for gcc to emit well-behaved code in the presence of
-# integer wrap around. (Trac #952)
+# integer wrap around. (#952)
 #
 AC_DEFUN([FP_GCC_EXTRA_FLAGS],
 [AC_REQUIRE([FP_GCC_VERSION])
diff --git a/compiler/basicTypes/Demand.hs b/compiler/basicTypes/Demand.hs
index 52bdf67c636ed92f702f93c841832f034b08935f..184f3d5f3991ebffe4a3648273f2a894813cc72f 100644
--- a/compiler/basicTypes/Demand.hs
+++ b/compiler/basicTypes/Demand.hs
@@ -124,7 +124,7 @@ mkJointDmds ss as = zipWithEqual "mkJointDmds" mkJointDmd ss as
 Note [Exceptions and strictness]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 We used to smart about catching exceptions, but we aren't anymore.
-See Trac #14998 for the way it's resolved at the moment.
+See #14998 for the way it's resolved at the moment.
 
 Here's a historic breakdown:
 
@@ -138,17 +138,17 @@ their argument, which is useful information for usage analysis. Still with a
 
 In 7c0fff4 (July 15), Simon argued that giving `catch#` et al. a
 'strictApply1Dmd' leads to substantial performance gains. That was at the cost
-of correctness, as Trac #10712 proved. So, back to 'lazyApply1Dmd' in
+of correctness, as #10712 proved. So, back to 'lazyApply1Dmd' in
 28638dfe79e (Dec 15).
 
-Motivated to reproduce the gains of 7c0fff4 without the breakage of Trac #10712,
-Ben opened Trac #11222. Simon made the demand analyser "understand catch" in
+Motivated to reproduce the gains of 7c0fff4 without the breakage of #10712,
+Ben opened #11222. Simon made the demand analyser "understand catch" in
 9915b656 (Jan 16) by adding a new 'catchArgDmd', which basically said to call
 its argument strictly, but also swallow any thrown exceptions in
 'postProcessDmdResult'. This was realized by extending the 'Str' constructor of
 'ArgStr' with a 'ExnStr' field, indicating that it catches the exception, and
 adding a 'ThrowsExn' constructor to the 'Termination' lattice as an element
-between 'Dunno' and 'Diverges'. Then along came Trac #11555 and finally #13330,
+between 'Dunno' and 'Diverges'. Then along came #11555 and finally #13330,
 so we had to revert to 'lazyApply1Dmd' again in 701256df88c (Mar 17).
 
 This left the other variants like 'catchRetry#' having 'catchArgDmd', which is
@@ -159,10 +159,10 @@ there was none. We removed the last usages of 'catchArgDmd' in 00b8ecb7
 removed in ef6b283 (Jan 19): We got rid of 'ThrowsExn' and 'ExnStr' again and
 removed any code that was dealing with the peculiarities.
 
-Where did the speed-ups vanish to? In Trac #14998, item 3 established that
+Where did the speed-ups vanish to? In #14998, item 3 established that
 turning 'catch#' strict in its first argument didn't bring back any of the
 alleged performance benefits. Item 2 of that ticket finally found out that it
-was entirely due to 'catchException's new (since Trac #11555) definition, which
+was entirely due to 'catchException's new (since #11555) definition, which
 was simply
 
     catchException !io handler = catch io handler
@@ -312,7 +312,7 @@ splitStrProdDmd n (SProd ds) = WARN( not (ds `lengthIs` n),
                                Just ds
 splitStrProdDmd _ (SCall {}) = Nothing
       -- This can happen when the programmer uses unsafeCoerce,
-      -- and we don't then want to crash the compiler (Trac #9208)
+      -- and we don't then want to crash the compiler (#9208)
 
 {-
 ************************************************************************
@@ -482,7 +482,7 @@ addCaseBndrDmd (JD { sd = ms, ud = mu }) alt_dmds
 The demand on a binder in a case alternative comes
   (a) From the demand on the binder itself
   (b) From the demand on the case binder
-Forgetting (b) led directly to Trac #10148.
+Forgetting (b) led directly to #10148.
 
 Example. Source code:
   f x@(p,_) = if p then foo x else True
@@ -500,7 +500,7 @@ After strictness analysis:
         True -> foo wild_X7 }
 
 It's true that ds_dnz is *itself* absent, but the use of wild_X7 means
-that it is very much alive and demanded.  See Trac #10148 for how the
+that it is very much alive and demanded.  See #10148 for how the
 consequences play out.
 
 This is needed even for non-product types, in case the case-binder
@@ -603,7 +603,7 @@ splitUseProdDmd n (UProd ds)  = WARN( not (ds `lengthIs` n),
                                 Just ds
 splitUseProdDmd _ (UCall _ _) = Nothing
       -- This can happen when the programmer uses unsafeCoerce,
-      -- and we don't then want to crash the compiler (Trac #9208)
+      -- and we don't then want to crash the compiler (#9208)
 
 useCount :: Use u -> Count
 useCount Abs         = One
@@ -627,7 +627,7 @@ isStrictDmd returns true only of demands that are
    both strict
    and  used
 In particular, it is False for <HyperStr, Abs>, which can and does
-arise in, say (Trac #7319)
+arise in, say (#7319)
    f x = raise# <some exception>
 Then 'x' is not used, so f gets strictness <HyperStr,Abs> -> .
 Now the w/w generates
@@ -637,7 +637,7 @@ At this point we really don't want to convert to
    fx = case absentError "unused" of x -> raise <some exception>
 Since the program is going to diverge, this swaps one error for another,
 but it's really a bad idea to *ever* evaluate an absent argument.
-In Trac #7319 we get
+In #7319 we get
    T7319.exe: Oops!  Entered absent arg w_s1Hd{v} [lid] [base:GHC.Base.String{tc 36u}]
 
 Note [Dealing with call demands]
@@ -844,7 +844,7 @@ Consider this:
 where A,B are the constructors of a GADT.  We'll get a U(U,U) demand
 on x from the A branch, but that's a stupid demand for x itself, which
 has type 'a'. Indeed we get ASSERTs going off (notably in
-splitUseProdDmd, Trac #8569).
+splitUseProdDmd, #8569).
 
 Bottom line: we really don't want to have a binder whose demand is more
 deeply-nested than its type.  There are various ways to tackle this.
@@ -1501,7 +1501,7 @@ There are several wrinkles:
 
 * In a previous incarnation of GHC we needed to be extra careful in the
   case of an *unlifted type*, because unlifted values are evaluated
-  even if they are not used.  Example (see Trac #9254):
+  even if they are not used.  Example (see #9254):
      f :: (() -> (# Int#, () #)) -> ()
           -- Strictness signature is
           --    <C(S(LS)), 1*C1(U(A,1*U()))>
@@ -1696,7 +1696,7 @@ That's fine: if we are doing strictness analysis we are also doing inlining,
 so we'll have inlined 'op' into a cast.  So we can bale out in a conservative
 way, returning nopDmdType.
 
-It is (just.. Trac #8329) possible to be running strictness analysis *without*
+It is (just.. #8329) possible to be running strictness analysis *without*
 having inlined class ops from single-method classes.  Suppose you are using
 ghc --make; and the first module has a local -O0 flag.  So you may load a class
 without interface pragmas, ie (currently) without an unfolding for the class
diff --git a/compiler/basicTypes/Id.hs b/compiler/basicTypes/Id.hs
index 199842ceb186d2ef6dbc71b33d2f0be8f58cbdbe..04840c193f9a0267d2825b113c35d6594d617659 100644
--- a/compiler/basicTypes/Id.hs
+++ b/compiler/basicTypes/Id.hs
@@ -386,7 +386,7 @@ of reasons:
  * Look them up in the current substitution when we come across
    occurrences of them (in Subst.lookupIdSubst). Lacking this we
    can get an out-of-date unfolding, which can in turn make the
-   simplifier go into an infinite loop (Trac #9857)
+   simplifier go into an infinite loop (#9857)
 
  * Ensure that for dfuns that the specialiser does not float dict uses
    above their defns, which would prevent good simplifications happening.
@@ -560,7 +560,7 @@ un-saturated.  Example:
 
 This has a compulsory unfolding because we can't lambda-bind those
 arguments.  But the compulsory unfolding may leave levity-polymorphic
-lambdas if it is not applied to enough arguments; e.g. (Trac #14561)
+lambdas if it is not applied to enough arguments; e.g. (#14561)
   bad :: forall (a :: TYPE r). a -> a
   bad = unsafeCoerce#
 
@@ -569,7 +569,7 @@ And we want that magic to apply to levity-polymorphic compulsory-inline things.
 The easiest way to do this is for hasNoBinding to return True of all things
 that have compulsory unfolding.  A very Ids with a compulsory unfolding also
 have a binding, but it does not harm to say they don't here, and its a very
-simple way to fix Trac #14561.
+simple way to fix #14561.
 
 Note [Primop wrappers]
 ~~~~~~~~~~~~~~~~~~~~~~
@@ -942,7 +942,7 @@ where the '*' means 'LoopBreaker'.  Then if we float we must get
 
 where g' is also marked as LoopBreaker.  If not, terrible things
 can happen if we re-simplify the binding (and the Simplifier does
-sometimes simplify a term twice); see Trac #4345.
+sometimes simplify a term twice); see #4345.
 
 It's not so simple to retain
   * worker info
diff --git a/compiler/basicTypes/Lexeme.hs b/compiler/basicTypes/Lexeme.hs
index d397deaea8af642d77515141532a17d475b08ec4..00559ab1c7cb3f91b8cf99fa73236906e6ef1d39 100644
--- a/compiler/basicTypes/Lexeme.hs
+++ b/compiler/basicTypes/Lexeme.hs
@@ -159,9 +159,9 @@ okConIdOcc str = okIdOcc str ||
                  is_tuple_name1 True  str ||
                    -- Is it a boxed tuple...
                  is_tuple_name1 False str ||
-                   -- ...or an unboxed tuple (Trac #12407)...
+                   -- ...or an unboxed tuple (#12407)...
                  is_sum_name1 str
-                   -- ...or an unboxed sum (Trac #12514)?
+                   -- ...or an unboxed sum (#12514)?
   where
     -- check for tuple name, starting at the beginning
     is_tuple_name1 True  ('(' : rest)       = is_tuple_name2 True  rest
diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs
index e3b928c4c72ba2e55d693777db1f261382f90101..85e4905305f15c19d9e0092d03562d36376f09ce 100644
--- a/compiler/basicTypes/MkId.hs
+++ b/compiler/basicTypes/MkId.hs
@@ -746,7 +746,7 @@ constructor has no wrapper, but whether a constructor has a wrapper depends, for
 instance, on the order of type argument of that constructors. Therefore changing
 the order of type argument could make previously working RULEs fail.
 
-See also https://ghc.haskell.org/trac/ghc/ticket/15840 .
+See also https://gitlab.haskell.org/ghc/ghc/issues/15840 .
 
 
 Note [Bangs on imported data constructors]
@@ -778,7 +778,7 @@ We certainly do not want to make a wrapper
 For a start, it's still to generate a no-op.  But worse, since wrappers
 are currently injected at TidyCore, we don't even optimise it away!
 So the stupid case expression stays there.  This actually happened for
-the Integer data type (see Trac #1600 comment:66)!
+the Integer data type (see #1600 comment:66)!
 
 Note [Data con wrappers and GADT syntax]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -821,7 +821,7 @@ strictness/unpackedness to use for the fields of a data type constructor. But
 there is an exception to this rule: newtype constructors. You might not think
 that newtypes would pose a challenge, since newtypes are seemingly forbidden
 from having strictness annotations in the first place. But consider this
-(from Trac #16141):
+(from #16141):
 
   {-# LANGUAGE StrictData #-}
   {-# OPTIONS_GHC -O #-}
@@ -1045,7 +1045,7 @@ And it'd be fine to unpack a product type with existential components
 too, but that would require a bit more plumbing, so currently we don't.
 
 So for now we require: null (dataConExTyCoVars data_con)
-See Trac #14978
+See #14978
 
 Note [Unpack one-wide fields]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1175,7 +1175,7 @@ mkPrimOpId prim_op
                -- We give PrimOps a NOINLINE pragma so that we don't
                -- get silly warnings from Desugar.dsRule (the inline_shadows_rule
                -- test) about a RULE conflicting with a possible inlining
-               -- cf Trac #7287
+               -- cf #7287
 
 -- For each ccall we manufacture a separate CCallOpId, giving it
 -- a fresh unique, a type that is correct for this particular ccall,
@@ -1209,7 +1209,7 @@ mkFCallId dflags uniq fcall ty
     strict_sig = mkClosedStrictSig (replicate arity topDmd) topRes
     -- the call does not claim to be strict in its arguments, since they
     -- may be lifted (foreign import prim) and the called code doesn't
-    -- necessarily force them. See Trac #11076.
+    -- necessarily force them. See #11076.
 {-
 ************************************************************************
 *                                                                      *
@@ -1499,7 +1499,7 @@ are truly used call-by-need, with no code motion.  Key examples:
   Again, it's clear that 'a' will be evaluated strictly (and indeed
   applied to a state token) but we want to make sure that any exceptions
   arising from the evaluation of 'a' are caught by the catch (see
-  Trac #11555).
+  #11555).
 
 Implementing 'lazy' is a bit tricky:
 
@@ -1513,7 +1513,7 @@ Implementing 'lazy' is a bit tricky:
   are exposed in the interface file.  Otherwise, the unfolding for
   (say) pseq in the interface file will not mention 'lazy', so if we
   inline 'pseq' we'll totally miss the very thing that 'lazy' was
-  there for in the first place. See Trac #3259 for a real world
+  there for in the first place. See #3259 for a real world
   example.
 
 * Suppose CorePrep sees (catch# (lazy e) b).  At all costs we must
@@ -1550,7 +1550,7 @@ if library authors could explicitly tell the compiler that a certain lambda is
 called at most once. The oneShot function allows that.
 
 'oneShot' is levity-polymorphic, i.e. the type variables can refer to unlifted
-types as well (Trac #10744); e.g.
+types as well (#10744); e.g.
    oneShot (\x:Int# -> x +# 1#)
 
 Like most magic functions it has a compulsory unfolding, so there is no need
diff --git a/compiler/basicTypes/Module.hs b/compiler/basicTypes/Module.hs
index ec3a9462cf5c6835118fe0612cceeacb2d8433f9..9c9547fef1c190b59c3e2e4e6100b82dab32e875 100644
--- a/compiler/basicTypes/Module.hs
+++ b/compiler/basicTypes/Module.hs
@@ -199,7 +199,7 @@ import {-# SOURCE #-} Packages (componentIdString, improveUnitId, PackageConfigM
 --        only ever ComponentIds, and some ComponentIds happen to have
 --        more information (UnitIds).
 --      - Same as Language.Haskell.TH.Syntax:PkgName, see
---          https://ghc.haskell.org/trac/ghc/ticket/10279
+--          https://gitlab.haskell.org/ghc/ghc/issues/10279
 --      - The same as PackageKey in GHC 7.10 (we renamed it because
 --        they don't necessarily identify packages anymore.)
 --      - Same as -this-package-key/-package-name flags
@@ -217,7 +217,7 @@ import {-# SOURCE #-} Packages (componentIdString, improveUnitId, PackageConfigM
 -- PackageName: The "name" field in a Cabal file, something like "lens".
 --      - Same as Distribution.Package.PackageName
 --      - DIFFERENT FROM Language.Haskell.TH.Syntax:PkgName, see
---          https://ghc.haskell.org/trac/ghc/ticket/10279
+--          https://gitlab.haskell.org/ghc/ghc/issues/10279
 --      - DIFFERENT FROM -package-name flag
 --      - DIFFERENT FROM the 'name' field in an installed package
 --        information.  This field could more accurately be described
diff --git a/compiler/basicTypes/NameCache.hs b/compiler/basicTypes/NameCache.hs
index 13fb1f57fe85896364f34175bd6af911d3d5c88f..f845bc9562857f02d0e293658288b48cdeee3b65 100644
--- a/compiler/basicTypes/NameCache.hs
+++ b/compiler/basicTypes/NameCache.hs
@@ -68,7 +68,7 @@ are two reasons why we might look up an Orig RdrName for built-in syntax,
   * Template Haskell turns a BuiltInSyntax Name into a TH.NameG
     (DsMeta.globalVar), and parses a NameG into an Orig RdrName
     (Convert.thRdrName).  So, e.g. $(do { reify '(,); ... }) will
-    go this route (Trac #8954).
+    go this route (#8954).
 
 -}
 
diff --git a/compiler/basicTypes/OccName.hs b/compiler/basicTypes/OccName.hs
index cb846f74ec4e3f01e5504dce6dc621930e103118..bbd40f85a5b021cc3f38a844a0c1f8d37550e6af 100644
--- a/compiler/basicTypes/OccName.hs
+++ b/compiler/basicTypes/OccName.hs
@@ -790,7 +790,7 @@ type TidyOccEnv = UniqFM Int
      - We use trailing digits to subtly indicate a unification variable
        in typechecker error message; see TypeRep.tidyTyVarBndr
 
-We have to take care though! Consider a machine-generated module (Trac #10370)
+We have to take care though! Consider a machine-generated module (#10370)
   module Foo where
      a1 = e1
      a2 = e2
diff --git a/compiler/basicTypes/PatSyn.hs b/compiler/basicTypes/PatSyn.hs
index 2f8cee414938cea14b1855d050bf3c87795828f8..fe296bf05400fba7ecbf6293e07a8579ff41bec4 100644
--- a/compiler/basicTypes/PatSyn.hs
+++ b/compiler/basicTypes/PatSyn.hs
@@ -118,7 +118,7 @@ In a pattern synonym signature we write
 Note that the "required" context comes first, then the "provided"
 context.  Moreover, the "required" context must not mention
 existentially-bound type variables; that is, ones not mentioned in
-res_ty.  See lots of discussion in Trac #10928.
+res_ty.  See lots of discussion in #10928.
 
 If there is no "provided" context, you can omit it; but you
 can't omit the "required" part (unless you omit both).
diff --git a/compiler/basicTypes/RdrName.hs b/compiler/basicTypes/RdrName.hs
index 60e4e8476f1cd705eb2a1f7f6408216bacd75498..3dfe916b83e3ee4d61b1a1995a9258f34b7c9849 100644
--- a/compiler/basicTypes/RdrName.hs
+++ b/compiler/basicTypes/RdrName.hs
@@ -509,7 +509,7 @@ gre_lcl is True, or gre_imp is non-empty.
 
 It is just possible to have *both* if there is a module loop: a Name
 is defined locally in A, and also brought into scope by importing a
-module that SOURCE-imported A.  Exapmle (Trac #7672):
+module that SOURCE-imported A.  Exapmle (#7672):
 
  A.hs-boot   module A where
                data T
@@ -1256,7 +1256,7 @@ Rationale for (a).  Consider
 The unqualified 'x' can only come from import #2.  The qualified 'M.x'
 could come from either, but bestImport picks import #2, because it is
 more likely to be useful in other imports, as indeed it is in this
-case (see Trac #5211 for a concrete example).
+case (see #5211 for a concrete example).
 
 But the rules are not perfect; consider
    import qualified M  -- Import #1
diff --git a/compiler/cmm/CmmSink.hs b/compiler/cmm/CmmSink.hs
index 6317cfe92990c226b04c2da85d65b735bda78641..26d0a6fd9a8d75f9b91fcee634ea5bc2b6fd4c1b 100644
--- a/compiler/cmm/CmmSink.hs
+++ b/compiler/cmm/CmmSink.hs
@@ -133,7 +133,7 @@ elemLRegSet l = IntSet.member (getKey (getUnique l))
 --
 -- a nice loop, but we didn't eliminate the silly assignment at the end.
 -- See Note [dependent assignments], which would probably fix this.
--- This is #8336 on Trac.
+-- This is #8336.
 --
 -- -----------
 -- (2) From stg_atomically_frame in PrimOps.cmm
diff --git a/compiler/cmm/CmmUtils.hs b/compiler/cmm/CmmUtils.hs
index 5cfc5f482e32d999832e79f8f30ada5828ad9c92..8a3b857ed994dfceec6ce4a2216ad3ecc95ee307 100644
--- a/compiler/cmm/CmmUtils.hs
+++ b/compiler/cmm/CmmUtils.hs
@@ -448,7 +448,7 @@ regsOverlap _ reg reg' = reg == reg'
 --
 -- We must check for overlapping registers and not just equal
 -- registers here, otherwise CmmSink may incorrectly reorder
--- assignments that conflict due to overlap. See Trac #10521 and Note
+-- assignments that conflict due to overlap. See #10521 and Note
 -- [Overlapping global registers].
 regUsedIn :: DynFlags -> CmmReg -> CmmExpr -> Bool
 regUsedIn dflags = regUsedIn_ where
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index 4763c5db3107815e44b98d0fb03fe5e0d1499358..bd019b13a8bd63f119a2879072b51e03fd074890 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -179,7 +179,7 @@ pprAlignment words =
 --
 -- It's a reasonable assumption also known as natural alignment.
 -- Although some architectures have different alignment rules.
--- One of known exceptions is m68k (Trac #11395, comment:16) where:
+-- One of known exceptions is m68k (#11395, comment:16) where:
 --   __alignof__(StgWord) == 2, sizeof(StgWord) == 4
 --
 -- Thus we explicitly increase alignment by using
diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index 8a32a7fff9621a6151fd9a2e79dc17c6b81bd88e..fff2078237e5901ffcefee750efc1fad418830f6 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -732,7 +732,7 @@ blackHoleOnEntry cl_info
 {- Note [Black-holing non-updatable thunks]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 We must not black-hole non-updatable (single-entry) thunks otherwise
-we run into issues like Trac #10414. Specifically:
+we run into issues like #10414. Specifically:
 
   * There is no reason to black-hole a non-updatable thunk: it should
     not be competed for by multiple threads
@@ -745,7 +745,7 @@ we run into issues like Trac #10414. Specifically:
      - is not updated (of course)
      - hence, if it is black-holed and another thread tries to evaluate
        it, that thread will block forever
-    This actually happened in Trac #10414.  So we do not black-hole
+    This actually happened in #10414.  So we do not black-hole
     non-updatable thunks.
 
   * How could two threads evaluate the same non-updatable (single-entry)
@@ -755,7 +755,7 @@ we run into issues like Trac #10414. Specifically:
     thunk, because lazy black-holing only affects thunks with an
     update frame on the stack.
 
-Here is and example due to Reid Barton (Trac #10414):
+Here is and example due to Reid Barton (#10414):
     x = \u []  concat [[1], []]
 with the following definitions,
 
diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs
index 5ad2e98abc031c9cf1eff7cf42547d5f2f6913ce..70a044a7ab5c3dfbb5dc35e0012657a64f528dbc 100644
--- a/compiler/codeGen/StgCmmExpr.hs
+++ b/compiler/codeGen/StgCmmExpr.hs
@@ -375,7 +375,7 @@ Suppose we have this STG code:
    f = \[s : State# RealWorld] ->
        case s of _ -> blah
 This is very odd.  Why are we scrutinising a state token?  But it
-can arise with bizarre NOINLINE pragmas (Trac #9964)
+can arise with bizarre NOINLINE pragmas (#9964)
     crash :: IO ()
     crash = IO (\s -> let {-# NOINLINE s' #-}
                           s' = s
@@ -532,7 +532,7 @@ See Note [case on bool]
 
 It's odd, and it's flagrantly inconsistent with the rules described
 Note [Compiling case expressions].  However, after eliminating the
-tagToEnum# (Trac #13397) we will have:
+tagToEnum# (#13397) we will have:
    case (a>b) of ...
 Rather than make it behave quite differently, I am testing for a
 comparison operator here in in the general case as well.
diff --git a/compiler/codeGen/StgCmmHeap.hs b/compiler/codeGen/StgCmmHeap.hs
index 3b170eb3a1e1015ed1d262ac1727a8c8313d0620..da9e85f1e706de48178f93abbb7250c84e2741af 100644
--- a/compiler/codeGen/StgCmmHeap.hs
+++ b/compiler/codeGen/StgCmmHeap.hs
@@ -519,7 +519,7 @@ heapCheck checkStack checkYield do_gc code
                     [" Trying to allocate more than "++show mBLOCK_SIZE++" bytes.",
                      "",
                      "This is currently not possible due to a limitation of GHC's code generator.",
-                     "See http://ghc.haskell.org/trac/ghc/ticket/4505 for details.",
+                     "See https://gitlab.haskell.org/ghc/ghc/issues/4505 for details.",
                      "Suggestion: read data from a file instead of having large static data",
                      "structures in code."]
                  | hpHw > 0  = Just (mkIntExpr dflags (hpHw * (wORD_SIZE dflags)))
diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs
index afd6759571cd463c1817e256b0ce0ff1a3c20323..5f7f5593ba04f291401fab270ef2cf845aab10f5 100644
--- a/compiler/coreSyn/CoreArity.hs
+++ b/compiler/coreSyn/CoreArity.hs
@@ -220,7 +220,7 @@ Now suppose we have:
 Now we want the built-in op/$dfList rule will fire to give
    blah = $copList dCInt
 
-But with eta-expansion 'blah' might (and in Trac #3772, which is
+But with eta-expansion 'blah' might (and in #3772, which is
 slightly more complicated, does) turn into
 
    blah = op (\eta. ($dfList dCInt |> sym co) eta)
@@ -302,7 +302,7 @@ This isn't really right in the presence of seq.  Consider
 This should diverge!  But if we eta-expand, it won't.  We ignore this
 "problem" (unless -fpedantic-bottoms is on), because being scrupulous
 would lose an important transformation for many programs. (See
-Trac #5587 for an example.)
+#5587 for an example.)
 
 Consider also
         f = \x -> error "foo"
@@ -322,7 +322,7 @@ this transformation.  So we try to limit it as much as possible:
 
  (1) Do NOT move a lambda outside a known-bottom case expression
        case undefined of { (a,b) -> \y -> e }
-     This showed up in Trac #5557
+     This showed up in #5557
 
  (2) Do NOT move a lambda outside a case if all the branches of
      the case are known to return bottom.
@@ -334,7 +334,7 @@ this transformation.  So we try to limit it as much as possible:
  (3) Do NOT move a lambda outside a case unless
      (a) The scrutinee is ok-for-speculation, or
      (b) more liberally: the scrutinee is cheap (e.g. a variable), and
-         -fpedantic-bottoms is not enforced (see Trac #2915 for an example)
+         -fpedantic-bottoms is not enforced (see #2915 for an example)
 
 Of course both (1) and (2) are readily defeated by disguising the bottoms.
 
@@ -381,7 +381,7 @@ See also Id.isOneShotBndr.
 Note [State hack and bottoming functions]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 It's a terrible idea to use the state hack on a bottoming function.
-Here's what happens (Trac #2861):
+Here's what happens (#2861):
 
   f :: String -> IO T
   f = \p. error "..."
@@ -410,7 +410,7 @@ Extrude g1.g3
 And now we can repeat the whole loop.  Aargh!  The bug is in applying the
 state hack to a function which then swallows the argument.
 
-This arose in another guise in Trac #3959.  Here we had
+This arose in another guise in #3959.  Here we had
 
      catch# (throw exn >> return ())
 
@@ -590,7 +590,7 @@ says it has arity "infinity" the first time round.
 
 This example happens a lot; it first showed up in Andy Gill's thesis,
 fifteen years ago!  It also shows up in the code for 'rnf' on lists
-in Trac #4138.
+in #4138.
 
 The analysis is easy to achieve because exprEtaExpandArity takes an
 argument
@@ -726,7 +726,7 @@ arityType env (Cast e co)
     -- See Note [exprArity invariant] (2); must be true of
     -- arityType too, since that is how we compute the arity
     -- of variables, and they in turn affect result of exprArity
-    -- Trac #5441 is a nice demo
+    -- #5441 is a nice demo
     -- However, do make sure that ATop -> ATop and ABot -> ABot!
     --   Casts don't affect that part. Getting this wrong provoked #5475
 
diff --git a/compiler/coreSyn/CoreFVs.hs b/compiler/coreSyn/CoreFVs.hs
index 18e109a74577ec9c0f3bf8df60aba19c632e4b07..4674b21978da8337f264cb7d06a4fca7d1fd3ec9 100644
--- a/compiler/coreSyn/CoreFVs.hs
+++ b/compiler/coreSyn/CoreFVs.hs
@@ -346,14 +346,14 @@ orphNamesOfTyCon tycon = unitNameSet (getName tycon) `unionNameSet` case tyConCl
 
 orphNamesOfType :: Type -> NameSet
 orphNamesOfType ty | Just ty' <- coreView ty = orphNamesOfType ty'
-                -- Look through type synonyms (Trac #4912)
+                -- Look through type synonyms (#4912)
 orphNamesOfType (TyVarTy _)          = emptyNameSet
 orphNamesOfType (LitTy {})           = emptyNameSet
 orphNamesOfType (TyConApp tycon tys) = orphNamesOfTyCon tycon
                                        `unionNameSet` orphNamesOfTypes tys
 orphNamesOfType (ForAllTy bndr res)  = orphNamesOfType (binderType bndr)
                                        `unionNameSet` orphNamesOfType res
-orphNamesOfType (FunTy _ arg res)    = unitNameSet funTyConName    -- NB!  See Trac #8535
+orphNamesOfType (FunTy _ arg res)    = unitNameSet funTyConName    -- NB!  See #8535
                                        `unionNameSet` orphNamesOfType arg
                                        `unionNameSet` orphNamesOfType res
 orphNamesOfType (AppTy fun arg)      = orphNamesOfType fun `unionNameSet` orphNamesOfType arg
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 62ddb9f410e83d24823d43bb3f914623b4202875..c29c113b543c408b69b96768bd1d3f27614cede0 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -373,7 +373,7 @@ interactiveInScope :: HscEnv -> [Var]
 -- When we are not in GHCi, the interactive context (hsc_IC hsc_env) is empty
 -- so this is a (cheap) no-op.
 --
--- See Trac #8215 for an example
+-- See #8215 for an example
 interactiveInScope hsc_env
   = tyvars ++ ids
   where
@@ -806,7 +806,7 @@ lintCoreExpr e@(Case scrut var alt_ty alts) =
      ; checkL (not $ isFloatingTy scrut_ty && any isLitPat alts)
          (ptext (sLit $ "Lint warning: Scrutinising floating-point " ++
                         "expression with literal pattern in case " ++
-                        "analysis (see Trac #9238).")
+                        "analysis (see #9238).")
           $$ text "scrut" <+> ppr scrut)
 
      ; case tyConAppTyCon_maybe (idType var) of
@@ -927,7 +927,7 @@ checkJoinOcc var n_args
 Note [No alternatives lint check]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Case expressions with no alternatives are odd beasts, and it would seem
-like they would worth be looking at in the linter (cf Trac #10180). We
+like they would worth be looking at in the linter (cf #10180). We
 used to check two things:
 
 * exprIsHNF is false: it would *seem* to be terribly wrong if
@@ -937,7 +937,7 @@ used to check two things:
   scrutinee is diverging for sure.
 
 It was already known that the second test was not entirely reliable.
-Unfortunately (Trac #13990), the first test turned out not to be reliable
+Unfortunately (#13990), the first test turned out not to be reliable
 either. Getting the checks right turns out to be somewhat complicated.
 
 For example, suppose we have (comment 8)
@@ -1395,7 +1395,7 @@ lintType (CoercionTy co)
 
 {- Note [Stupid type synonyms]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #14939)
+Consider (#14939)
    type Alg cls ob = ob
    f :: forall (cls :: * -> Constraint) (b :: Alg cls *). b
 
@@ -1572,18 +1572,18 @@ lintCoreRule fun fun_ty rule@(Rule { ru_name = name, ru_bndrs = bndrs
 It's very bad if simplifying a rule means that one of the template
 variables (ru_bndrs) that /is/ mentioned on the RHS becomes
 not-mentioned in the LHS (ru_args).  How can that happen?  Well, in
-Trac #10602, SpecConstr stupidly constructed a rule like
+#10602, SpecConstr stupidly constructed a rule like
 
   forall x,c1,c2.
      f (x |> c1 |> c2) = ....
 
 But simplExpr collapses those coercions into one.  (Indeed in
-Trac #10602, it collapsed to the identity and was removed altogether.)
+#10602, it collapsed to the identity and was removed altogether.)
 
 We don't have a great story for what to do here, but at least
 this check will nail it.
 
-NB (Trac #11643): it's possible that a variable listed in the
+NB (#11643): it's possible that a variable listed in the
 binders becomes not-mentioned on both LHS and RHS.  Here's a silly
 example:
    RULE forall x y. f (g x y) = g (x+1) (y-1)
@@ -2088,7 +2088,7 @@ type WarnsAndErrs = (Bag MsgDoc, Bag MsgDoc)
 {- Note [Checking for global Ids]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Before CoreTidy, all locally-bound Ids must be LocalIds, even
-top-level ones. See Note [Exported LocalIds] and Trac #9857.
+top-level ones. See Note [Exported LocalIds] and #9857.
 
 Note [Checking StaticPtrs]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2124,7 +2124,7 @@ Note [Linting type synonym applications]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 When linting a type-synonym, or type-family, application
   S ty1 .. tyn
-we behave as follows (Trac #15057, #T15664):
+we behave as follows (#15057, #T15664):
 
 * If lf_report_unsat_syns = True, and S has arity < n,
   complain about an unsaturated type synonym or type family
diff --git a/compiler/coreSyn/CoreMap.hs b/compiler/coreSyn/CoreMap.hs
index 3d0693466a3023e3be9a3bf64e6a53d6ef328ec3..d50dcbf1bc1de8be28e7adcd428d97225f287bf7 100644
--- a/compiler/coreSyn/CoreMap.hs
+++ b/compiler/coreSyn/CoreMap.hs
@@ -133,7 +133,7 @@ Note [Empty case alternatives]
 * For a key (Case e b ty []) we MUST look at the return type 'ty', because
   otherwise (Case (error () "urk") _ Int  []) would compare equal to
             (Case (error () "urk") _ Bool [])
-  which is utterly wrong (Trac #6097)
+  which is utterly wrong (#6097)
 
 We could compare the return type regardless, but the wildly common case
 is that it's unnecessary, so we have two fields (cm_case and cm_ecase)
diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs
index d0dba81e3e55926b8cb2f5816b2d21330bde7738..0f7f5fbf20c54d55133755e083db210bb33a9867 100644
--- a/compiler/coreSyn/CoreOpt.hs
+++ b/compiler/coreSyn/CoreOpt.hs
@@ -312,7 +312,7 @@ simple_app env (Tick t e) as
 -- The let might appear there as a result of inlining
 -- e.g.   let f = let x = e in b
 --        in f a1 a2
--- (Trac #13208)
+-- (#13208)
 simple_app env (Let bind body) as
   = case simple_opt_bind env bind of
       (env', Nothing)   -> simple_app env' body as
@@ -490,7 +490,7 @@ rhss here.
 Note [Preserve join-binding arity]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Be careful /not/ to eta-reduce the RHS of a join point, lest we lose
-the join-point arity invariant.  Trac #15108 was caused by simplifying
+the join-point arity invariant.  #15108 was caused by simplifying
 the RHS with simple_opt_expr, which does eta-reduction.  Solution:
 simplify the RHS of a join point by simplifying under the lambdas
 (which of course should be there).
@@ -710,7 +710,7 @@ A more common case is when
 
    f = \x. error ".."
 
-and again its arity increses (Trac #15517)
+and again its arity increses (#15517)
 -}
 
 {- *********************************************************************
@@ -759,7 +759,7 @@ dealWithStringLiteral.
 
 Note [Push coercions in exprIsConApp_maybe]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-In Trac #13025 I found a case where we had
+In #13025 I found a case where we had
     op (df @t1 @t2)     -- op is a ClassOp
 where
     df = (/\a b. K e1 e2) |> g
@@ -1181,7 +1181,7 @@ pushCoTyArg :: CoercionR -> Type -> Maybe (Type, MCoercionR)
 -- it's faster not to compute it, though.
 pushCoTyArg co ty
   -- The following is inefficient - don't do `eqType` here, the coercion
-  -- optimizer will take care of it. See Trac #14737.
+  -- optimizer will take care of it. See #14737.
   -- -- | tyL `eqType` tyR
   -- -- = Just (ty, Nothing)
 
@@ -1219,7 +1219,7 @@ pushCoValArg :: CoercionR -> Maybe (Coercion, MCoercion)
 -- the returned coercion would have been reflexive.
 pushCoValArg co
   -- The following is inefficient - don't do `eqType` here, the coercion
-  -- optimizer will take care of it. See Trac #14737.
+  -- optimizer will take care of it. See #14737.
   -- -- | tyL `eqType` tyR
   -- -- = Just (mkRepReflCo arg, Nothing)
 
diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs
index cf37a8d93b607b08a9fc0d44fbca2d722380ad5a..bf6182bc89bf1e0e9860afb400f4ef1ca2267ab6 100644
--- a/compiler/coreSyn/CorePrep.hs
+++ b/compiler/coreSyn/CorePrep.hs
@@ -344,7 +344,7 @@ partial applications. But it's easier to let them through.
 
 Note [Dead code in CorePrep]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Imagine that we got an input program like this (see Trac #4962):
+Imagine that we got an input program like this (see #4962):
 
   f :: Show b => Int -> (Int, b -> Maybe Int -> Int)
   f x = (g True (Just x) + g () (Just x), g)
@@ -790,7 +790,7 @@ data ArgInfo = CpeApp  CoreArg
 ~~~~~~~~~~~~~~~~~~~
 If we got, say
    runRW# (case bot of {})
-which happened in Trac #11291, we do /not/ want to turn it into
+which happened in #11291, we do /not/ want to turn it into
    (case bot of {}) realWorldPrimId#
 because that gives a panic in CoreToStg.myCollectArgs, which expects
 only variables in function position.  But if we are sure to make
@@ -1051,7 +1051,7 @@ Note [Floating unlifted arguments]
 Consider    C (let v* = expensive in v)
 
 where the "*" indicates "will be demanded".  Usually v will have been
-inlined by now, but let's suppose it hasn't (see Trac #2756).  Then we
+inlined by now, but let's suppose it hasn't (see #2756).  Then we
 do *not* want to get
 
      let v* = expensive in C v
@@ -1183,7 +1183,7 @@ tryEtaReducePrep bndrs (Let bind@(NonRec _ r) body)
 -- Otherwise we risk reducing
 --       \x. (Tick (Breakpoint {x}) f x)
 --   ==> Tick (breakpoint {x}) f
--- which is bogus (Trac #17228)
+-- which is bogus (#17228)
 -- tryEtaReducePrep bndrs (Tick tickish e)
 --   = fmap (mkTick tickish) $ tryEtaReducePrep bndrs e
 
diff --git a/compiler/coreSyn/CoreSubst.hs b/compiler/coreSyn/CoreSubst.hs
index 2df3fb1b520dbd1520e459bd07aa6256541edba4..8ba2e684464018ed9972e6f668f072d35b63e95f 100644
--- a/compiler/coreSyn/CoreSubst.hs
+++ b/compiler/coreSyn/CoreSubst.hs
@@ -718,7 +718,7 @@ substTickish _subst other = other
 The functions that substitute over IdInfo must be pretty lazy, because
 they are knot-tied by substRecBndrs.
 
-One case in point was Trac #10627 in which a rule for a function 'f'
+One case in point was #10627 in which a rule for a function 'f'
 referred to 'f' (at a different type) on the RHS.  But instead of just
 substituting in the rhs of the rule, we were calling simpleOptExpr, which
 looked at the idInfo for 'f'; result <<loop>>.
diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs
index c4fedbbad7e81e8739544a88240ca501a2b33099..f48fef568ebd8f76bd472dae63541dc96956652a 100644
--- a/compiler/coreSyn/CoreSyn.hs
+++ b/compiler/coreSyn/CoreSyn.hs
@@ -233,7 +233,7 @@ These data types are the heart of the compiler
 --       can't be @Red@ at that program point.
 --
 --    5. Floating-point values must not be scrutinised against literals.
---       See Trac #9238 and Note [Rules for floating-point comparisons]
+--       See #9238 and Note [Rules for floating-point comparisons]
 --       in PrelRules for rationale.
 --
 -- *  Cast an expression to a particular type.
@@ -338,7 +338,7 @@ Note [Literal alternatives]
 Literal alternatives (LitAlt lit) are always for *un-lifted* literals.
 We have one literal, a literal Integer, that is lifted, and we don't
 allow in a LitAlt, because LitAlt cases don't do any evaluation. Also
-(see Trac #5603) if you say
+(see #5603) if you say
     case 3 of
       S# x -> ...
       J# _ _ -> ...
@@ -348,7 +348,7 @@ literals are an opaque encoding of an algebraic data type, not of
 an unlifted literal, like all the others.
 
 Also, we do not permit case analysis with literal patterns on floating-point
-types. See Trac #9238 and Note [Rules for floating-point comparisons] in
+types. See #9238 and Note [Rules for floating-point comparisons] in
 PrelRules for the rationale for this restriction.
 
 -------------------------- CoreSyn INVARIANTS ---------------------------
@@ -386,7 +386,7 @@ Consider,
 
 In order to be able to inline `f`, we would like to float `a` to the top.
 Another option would be to inline `a`, but that would lead to duplicating string
-literals, which we want to avoid. See Trac #8472.
+literals, which we want to avoid. See #8472.
 
 The solution is simply to allow top-level unlifted binders. We can't allow
 arbitrary unlifted expression at the top-level though, unlifted binders cannot
@@ -395,7 +395,7 @@ be thunks, so we just allow string literals.
 We allow the top-level primitive string literals to be wrapped in Ticks
 in the same way they can be wrapped when nested in an expression.
 CoreToSTG currently discards Ticks around top-level primitive string literals.
-See Trac #14779.
+See #14779.
 
 Also see Note [Compilation plan for top-level string literals].
 
@@ -518,7 +518,7 @@ this exhaustive list can be empty!
   we do NOT want to replace
     case (x::T) of Bool {}   -->   error Bool "Inaccessible case"
   because x might raise an exception, and *that*'s what we want to see!
-  (Trac #6067 is an example.) To preserve semantics we'd have to say
+  (#6067 is an example.) To preserve semantics we'd have to say
      x `seq` error Bool "Inaccessible case"
   but the 'seq' is just a case, so we are back to square 1.  Or I suppose
   we could say
@@ -626,7 +626,7 @@ However, join points have simpler invariants in other ways
 
   6. A join point can have a levity-polymorphic RHS
      e.g.  let j :: r :: TYPE l = fail void# in ...
-     This happened in an intermediate program Trac #13394
+     This happened in an intermediate program #13394
 
 Examples:
 
@@ -1113,7 +1113,7 @@ chooseOrphanAnchor :: NameSet -> IsOrphan
 -- Something (rule, instance) is relate to all the Names in this
 -- list. Choose one of them to be an "anchor" for the orphan.  We make
 -- the choice deterministic to avoid gratuitious changes in the ABI
--- hash (Trac #4012).  Specifically, use lexicographic comparison of
+-- hash (#4012).  Specifically, use lexicographic comparison of
 -- OccName rather than comparing Uniques
 --
 -- NB: 'minimum' use Ord, and (Ord OccName) works lexicographically
@@ -1641,7 +1641,7 @@ ones are
 
    OtherCon {}    If we know this binder (say a lambda binder) will be
                   bound to an evaluated thing, we want to retain that
-                  info in simpleOptExpr; see Trac #13077.
+                  info in simpleOptExpr; see #13077.
 
 We consider even a StableUnfolding as fragile, because it needs substitution.
 
diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs
index e55e12487beed048a0ffb5ef11225fbf78e1f614..1e4e39e289013d3757aff97e4b1a603bfaf2011e 100644
--- a/compiler/coreSyn/CoreUnfold.hs
+++ b/compiler/coreSyn/CoreUnfold.hs
@@ -260,7 +260,7 @@ the `UnfoldingGuidance`.)
 
 In the example, x's ug_arity is 0, so we should inline it at every use
 site.  It's rare to have such an INLINE pragma (usually INLINE Is on
-functions), but it's occasionally very important (Trac #15578, #15519).
+functions), but it's occasionally very important (#15578, #15519).
 In #15519 we had something like
    x = case (g a b) of I# r -> T r
    {-# INLINE x #-}
@@ -357,7 +357,7 @@ But given this decision it's vital that we do
 where g* is (for some strange reason) the loop breaker.  If we don't
 occ-anal it when reading it in, we won't mark g as a loop breaker, and
 we may inline g entirely in body, dropping its binding, and leaving
-the occurrence in f out of scope. This happened in Trac #8892, where
+the occurrence in f out of scope. This happened in #8892, where
 the unfolding in question was a DFun unfolding.
 
 But more generally, the simplifier is designed on the
@@ -395,7 +395,7 @@ GlobalIds.  That seems (just) tolerable for the occurrence analysis that happens
 just before the Simplifier, but not for unfoldings, which are Linted
 independently.
 As a quick workaround, we disable binder swap in this module.
-See Trac #16288 and #16296 for further plans.
+See #16288 and #16296 for further plans.
 
 Note [Calculate unfolding guidance on the non-occ-anal'd expression]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -910,7 +910,7 @@ Simon M tried a MUCH bigger discount: (10 * (10 + n_val_args)),
 and said it was an "unambiguous win", but its terribly dangerous
 because a function with many many case branches, each finishing with
 a constructor, can have an arbitrarily large discount.  This led to
-terrible code bloat: see Trac #6099.
+terrible code bloat: see #6099.
 
 Note [Unboxed tuple size and result discount]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -936,10 +936,10 @@ monadic combinators with continuation arguments, where inlining is
 quite important.
 
 But we don't want a big discount when a function is called many times
-(see the detailed comments with Trac #6048) because if the function is
+(see the detailed comments with #6048) because if the function is
 big it won't be inlined at its many call sites and no benefit results.
 Indeed, we can get exponentially big inlinings this way; that is what
-Trac #6048 is about.
+#6048 is about.
 
 On the other hand, for data-valued arguments, if there are lots of
 case expressions in the body, each one will get smaller if we apply
@@ -1170,7 +1170,7 @@ certainlyWillInline dflags fn_info
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Don't claim that thunks will certainly inline, because that risks work
 duplication.  Even if the work duplication is not great (eg is_cheap
-holds), it can make a big difference in an inner loop In Trac #5623 we
+holds), it can make a big difference in an inner loop In #5623 we
 found that the WorkWrap phase thought that
        y = case x of F# v -> F# (v +# v)
 was certainlyWillInline, so the addition got duplicated.
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index 5b161995eae0adeeb11758b17da1bb973d4fe9b5..8e298adf6a6d9ae13905de62e81d2f2b905d3fb0 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -190,7 +190,7 @@ not much used, except in the output of the desugarer.
 Example:
      let a = Int in (\x:a. x)
 Given this, exprType must be careful to substitute 'a' in the
-result type (Trac #8522).
+result type (#8522).
 
 Note [Existential variables and silly type synonyms]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -202,7 +202,7 @@ Consider
 
 Now, the type of 'x' is (Funny a), where 'a' is existentially quantified.
 That means that 'exprType' and 'coreAltsType' may give a result that *appears*
-to mention an out-of-scope type variable.  See Trac #3409 for a more real-world
+to mention an out-of-scope type variable.  See #3409 for a more real-world
 example.
 
 Various possibilities suggest themselves:
@@ -571,7 +571,7 @@ that cannot match.  For example:
 
 Suppose that for some silly reason, x isn't substituted in the case
 expression.  (Perhaps there's a NOINLINE on it, or profiling SCC stuff
-gets in the way; cf Trac #3118.)  Then the full-lazines pass might produce
+gets in the way; cf #3118.)  Then the full-lazines pass might produce
 this
 
      x = Red
@@ -827,11 +827,11 @@ and similarly in cascade for all the join points!
 NB: it's important that all this is done in [InAlt], *before* we work
 on the alternatives themselves, because Simplify.simplAlt may zap the
 occurrence info on the binders in the alternatives, which in turn
-defeats combineIdenticalAlts (see Trac #7360).
+defeats combineIdenticalAlts (see #7360).
 
 Note [Care with impossible-constructors when combining alternatives]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Suppose we have (Trac #10538)
+Suppose we have (#10538)
    data T = A | B | C | D
 
       case x::T of   (Imposs-default-cons {A,B})
@@ -867,7 +867,7 @@ Then when combining the A and C alternatives we get
 
 Note that we have a new DEFAULT branch that we didn't have before.  So
 we need delete from the "impossible-default-constructors" all the
-known-con alternatives that we have eliminated. (In Trac #11172 we
+known-con alternatives that we have eliminated. (In #11172 we
 missed the first one.)
 
 -}
@@ -950,7 +950,7 @@ it as trivial we may land up with let-bindings like
    let v = case x of {} in ...
 and after CoreToSTG that gives
    let v = x in ...
-and that confuses the code generator (Trac #11155). So best to kill
+and that confuses the code generator (#11155). So best to kill
 it off at source.
 -}
 
@@ -1102,7 +1102,7 @@ dupAppSize :: Int
 dupAppSize = 8   -- Size of term we are prepared to duplicate
                  -- This is *just* big enough to make test MethSharing
                  -- inline enough join points.  Really it should be
-                 -- smaller, and could be if we fixed Trac #4960.
+                 -- smaller, and could be if we fixed #4960.
 
 {-
 ************************************************************************
@@ -1116,7 +1116,7 @@ Note [exprIsWorkFree]
 exprIsWorkFree is used when deciding whether to inline something; we
 don't inline it if doing so might duplicate work, by peeling off a
 complete copy of the expression.  Here we do not want even to
-duplicate a primop (Trac #5623):
+duplicate a primop (#5623):
    eg   let x = a #+ b in x +# x
    we do not want to inline/duplicate x
 
@@ -1276,7 +1276,7 @@ expansion.  Specifically:
 
 * False of case-expressions.  If we have
     let x = case ... in ...(case x of ...)...
-  we won't simplify.  We have to inline x.  See Trac #14688.
+  we won't simplify.  We have to inline x.  See #14688.
 
 * False of let-expressions (same reason); and in any case we
   float lets out of an RHS if doing so will reveal an expandable
@@ -1657,7 +1657,7 @@ But we restrict it sharply:
   add unlifted algebraic types in due course.
 
 
------ Historical note: Trac #15696: --------
+----- Historical note: #15696: --------
   Previously SetLevels used exprOkForSpeculation to guide
   floating of single-alternative cases; it now uses exprIsHNF
   Note [Floating single-alternative cases].
@@ -1676,9 +1676,9 @@ But we restrict it sharply:
     ...(case x of y
             A -> ...
             _ -> ...blah...)...
-  which is utterly bogus (seg fault); see Trac #5453.
+  which is utterly bogus (seg fault); see #5453.
 
------ Historical note: Trac #3717: --------
+----- Historical note: #3717: --------
     foo :: Int -> Int
     foo 0 = 0
     foo n = (if n < 5 then 1 else 2) `seq` foo (n-1)
@@ -1703,7 +1703,7 @@ points do the job nicely.
 
 Note [Primops with lifted arguments]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Is this ok-for-speculation (see Trac #13027)?
+Is this ok-for-speculation (see #13027)?
    reallyUnsafePtrEq# a b
 Well, yes.  The primop accepts lifted arguments and does not
 evaluate them.  Indeed, in general primops are, well, primitive
@@ -2279,7 +2279,7 @@ There are some particularly delicate points here:
   *keeps* arity 1 (perhaps also wrongly).  So CorePrep eta-expands
   the definition again, so that it does not termninate after all.
   Result: seg-fault because the boolean case actually gets a function value.
-  See Trac #1947.
+  See #1947.
 
   So it's important to do the right thing.
 
@@ -2434,7 +2434,7 @@ to the rule that
   * f is not bottom
 we can eta-reduce    \x. f x  ===>  f
 
-This turned up in Trac #7542.
+This turned up in #7542.
 
 
 ************************************************************************
diff --git a/compiler/coreSyn/MkCore.hs b/compiler/coreSyn/MkCore.hs
index 999cfc7db5117e75384c6e8a37fed7b381d445bb..f9609f834dcc00bdc3d759f712ac392c9a27f692 100644
--- a/compiler/coreSyn/MkCore.hs
+++ b/compiler/coreSyn/MkCore.hs
@@ -840,7 +840,7 @@ used, and does a w/w split thus
 After some simplification, the (absentError "blah") thunk goes away.
 
 ------ Tricky wrinkle -------
-Trac #14285 had, roughly
+#14285 had, roughly
 
    data T a = MkT a !a
    {-# INLINABLE f #-}
diff --git a/compiler/deSugar/Check.hs b/compiler/deSugar/Check.hs
index 81832c8982f5970cb7e7a5d782c5aa99c3bb0783..db3a501fcffc2c1ba372c432b4fc09625afe09e5 100644
--- a/compiler/deSugar/Check.hs
+++ b/compiler/deSugar/Check.hs
@@ -1030,7 +1030,7 @@ translatePat fam_insts pat = case pat of
     --
     --     - Otherwise, we treat the `ListPat` as ordinary view pattern.
     --
-    -- See Trac #14547, especially comment#9 and comment#10.
+    -- See #14547, especially comment#9 and comment#10.
     --
     -- Here we construct CanFailPmPat directly, rather can construct a view
     -- pattern and do further translation as an optimization, for the reason,
@@ -1100,7 +1100,7 @@ from translation in pattern matcher.
     `HsOverLit` inside `NPat` to HsIntPrim/HsWordPrim. If we do
     the same thing in `translatePat` as in `tidyNPat`, the exhaustiveness
     checker will fail to match the literals patterns correctly. See
-    Trac #14546.
+    #14546.
 
   In Note [Undecidable Equality for Overloaded Literals], we say: "treat
   overloaded literals that look different as different", but previously we
@@ -1121,7 +1121,7 @@ from translation in pattern matcher.
     in value position as PmOLit, but translate the 0 and 1 in pattern position
     as PmSLit. The inconsistency leads to the failure of eqPmLit to detect the
     equality and report warning of "Pattern match is redundant" on pattern 0,
-    as reported in Trac #14546. In this patch we remove the specialization of
+    as reported in #14546. In this patch we remove the specialization of
     OverLit patterns, and keep the overloaded number literal in pattern as it
     is to maintain the consistency. We know nothing about the `fromInteger`
     method (see Note [Undecidable Equality for Overloaded Literals]). Now we
@@ -1141,7 +1141,7 @@ from translation in pattern matcher.
     non-overloaded string values are translated to PmSLit. However the string
     patterns, both overloaded and non-overloaded, are translated to list of
     characters. The inconsistency leads to wrong warnings about redundant and
-    non-exhaustive pattern matching warnings, as reported in Trac #14546.
+    non-exhaustive pattern matching warnings, as reported in #14546.
 
     In order to catch the redundant pattern in following case:
 
@@ -1167,7 +1167,7 @@ from translation in pattern matcher.
 
   We must ensure that doing the same translation to literal values and patterns
   in `translatePat` and `hsExprToPmExpr`. The previous inconsistent work led to
-  Trac #14546.
+  #14546.
 -}
 
 -- | Translate a list of patterns (Note: each pattern is translated
@@ -2511,7 +2511,7 @@ dsPmWarn dflags ctx@(DsMatchContext kind loc) pm_result
 
 {- Note [Inaccessible warnings for record updates]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #12957)
+Consider (#12957)
   data T a where
     T1 :: { x :: Int } -> T Bool
     T2 :: { x :: Int } -> T a
diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs
index aa9748ee3534c8ec7c6172625fb3797a708560a9..128722d5b514cab87b299f7992a2b1ade4868d3b 100644
--- a/compiler/deSugar/Desugar.hs
+++ b/compiler/deSugar/Desugar.hs
@@ -533,7 +533,7 @@ by 'competesWith'
 
 Class methods have a built-in RULE to select the method from the dictionary,
 so you can't change the phase on this.  That makes id very dubious to
-match on class methods in RULE lhs's.   See Trac #10595.   I'm not happy
+match on class methods in RULE lhs's.   See #10595.   I'm not happy
 about this. For example in Control.Arrow we have
 
 {-# RULES "compose/arr"   forall f g .
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index d62706ef001207b10feb1675b7d99da8244ef397..cf94a5edf346ce99816ee0c20e9aaa3edfd12667 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -776,7 +776,7 @@ we might have
 
 We might want to specialise 'f' so that we in turn specialise '$wf'.
 We can't even /name/ '$wf' in the source code, so we can't specialise
-it even if we wanted to.  Trac #10721 is a case in point.
+it even if we wanted to.  #10721 is a case in point.
 
 Note [Activation pragmas for SPECIALISE]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -792,7 +792,7 @@ We need two pragma-like things:
 * Activation of RULE: from SPECIALISE pragma (if activation given)
                       otherwise from f's inline pragma
 
-This is not obvious (see Trac #5237)!
+This is not obvious (see #5237)!
 
 Examples      Rule activation   Inline prag on spec'd fn
 ---------------------------------------------------------------------
@@ -875,7 +875,7 @@ decomposeRuleLhs dflags orig_bndrs orig_lhs
                            , not (v `elemVarSet` orig_bndr_set)
                            , not (v == fn_id) ]
          -- fn_id: do not quantify over the function itself, which may
-         -- itself be a dictionary (in pathological cases, Trac #10251)
+         -- itself be a dictionary (in pathological cases, #10251)
 
    decompose (Var fn_id) args
       | not (fn_id `elemVarSet` orig_bndr_set)
@@ -1018,7 +1018,7 @@ drop_dicts drops dictionary bindings on the LHS where possible.
 
     NB3: In the common case of a non-overloaded, but perhaps-polymorphic
          specialisation, we don't need to bind *any* dictionaries for use
-         in the RHS. For example (Trac #8331)
+         in the RHS. For example (#8331)
              {-# SPECIALIZE INLINE useAbstractMonad :: ReaderST s Int #-}
              useAbstractMonad :: MonadAbstractIOST m => m Int
          Here, deriving (MonadAbstractIOST (ReaderST s)) is a lot of code
@@ -1026,7 +1026,7 @@ drop_dicts drops dictionary bindings on the LHS where possible.
              RULE forall s (d :: MonadAbstractIOST (ReaderT s)).
                 useAbstractMonad (ReaderT s) d = $suseAbstractMonad s
 
-   Trac #8848 is a good example of where there are some interesting
+   #8848 is a good example of where there are some interesting
    dictionary bindings to discard.
 
 The drop_dicts algorithm is based on these observations:
diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs
index c6ba18b1eb37d44deba0d0472c34c85251d9d340..89ca815ed53d7b4294152afc962e4113d2f82fe6 100644
--- a/compiler/deSugar/DsExpr.hs
+++ b/compiler/deSugar/DsExpr.hs
@@ -122,7 +122,7 @@ ds_val_bind (NonRecursive, hsbinds) body
             -- f x = let p@(Ptr y) = ... in ...
             -- Here the binding for 'p' is polymorphic, but does
             -- not mix with an unlifted binding for 'y'.  You should
-            -- use a bang pattern.  Trac #6078.
+            -- use a bang pattern.  #6078.
 
     else do { when (looksLazyPatBind bind) $
               warnIfSetDs Opt_WarnUnbangedStrictPatterns (unlifted_must_be_bang bind)
@@ -622,7 +622,7 @@ ds_expr _ expr@(RecordUpd { rupd_expr = record_expr, rupd_flds = fields
       -- Clone the Id in the HsRecField, because its Name is that
       -- of the record selector, and we must not make that a local binder
       -- else we shadow other uses of the record selector
-      -- Hence 'lcl_id'.  Cf Trac #2735
+      -- Hence 'lcl_id'.  Cf #2735
     ds_field (dL->L _ rec_field)
       = do { rhs <- dsLExpr (hsRecFieldArg rec_field)
            ; let fld_id = unLoc (hsRecUpdFieldId rec_field)
diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs
index 2aaafad29fec76d947694ddce749daa74388c5dd..5de954ae7d2076e1ab8ba575de0fde7b97189b31 100644
--- a/compiler/deSugar/DsMeta.hs
+++ b/compiler/deSugar/DsMeta.hs
@@ -524,7 +524,7 @@ repClsInstD (ClsInstDecl { cid_poly_ty = ty, cid_binds = binds
             -- But we do NOT bring the binders of 'binds' into scope
             -- because they are properly regarded as occurrences
             -- For example, the method names should be bound to
-            -- the selector Ids, not to fresh names (Trac #5410)
+            -- the selector Ids, not to fresh names (#5410)
             --
             do { cxt1     <- repLContext cxt
                ; inst_ty1 <- repLTy inst_ty
diff --git a/compiler/deSugar/DsMonad.hs b/compiler/deSugar/DsMonad.hs
index f328322e68f42aa72a1ffb569e17c7fd895fd592..8e3021fd8aec29a37a196187a2ec432c3391028a 100644
--- a/compiler/deSugar/DsMonad.hs
+++ b/compiler/deSugar/DsMonad.hs
@@ -486,7 +486,7 @@ askNoErrsDs thing_inside
       ; env <- getGblEnv
       ; mb_res <- tryM $  -- Be careful to catch exceptions
                           -- so that we propagate errors correctly
-                          -- (Trac #13642)
+                          -- (#13642)
                   setGblEnv (env { ds_msgs = errs_var }) $
                   thing_inside
 
diff --git a/compiler/deSugar/DsUsage.hs b/compiler/deSugar/DsUsage.hs
index a6b94c98a0554f06776c8640464635fab0ec4389..7c8e24bbecd5d7f9a0896e50226b365b8b8bb0fc 100644
--- a/compiler/deSugar/DsUsage.hs
+++ b/compiler/deSugar/DsUsage.hs
@@ -50,7 +50,7 @@ In this case, B's dep_orphs will contain A due to its SOURCE import of A.
 Consequently, A will contain itself in its imp_orphs due to its import of B.
 This fact would end up being recorded in A's interface file. This would then
 break the invariant asserted by calculateAvails that a module does not itself in
-its dep_orphs. This was the cause of Trac #14128.
+its dep_orphs. This was the cause of #14128.
 
 -}
 
diff --git a/compiler/deSugar/DsUtils.hs b/compiler/deSugar/DsUtils.hs
index f39d0f2594b4431fa30d9d12c9593554d28e2c28..d4ceb523df7185bdd5a74f2c283c1f95940af412 100644
--- a/compiler/deSugar/DsUtils.hs
+++ b/compiler/deSugar/DsUtils.hs
@@ -411,7 +411,7 @@ mkErrorAppDs err_id ty msg = do
 {-
 'mkCoreAppDs' and 'mkCoreAppsDs' hand the special-case desugaring of 'seq'.
 
-Note [Desugaring seq (1)]  cf Trac #1031
+Note [Desugaring seq (1)]  cf #1031
 ~~~~~~~~~~~~~~~~~~~~~~~~~
    f x y = x `seq` (y `seq` (# x,y #))
 
@@ -427,7 +427,7 @@ But that is bad for two reasons:
 Seq is very, very special!  So we recognise it right here, and desugar to
         case x of _ -> case y of _ -> (# x,y #)
 
-Note [Desugaring seq (2)]  cf Trac #2273
+Note [Desugaring seq (2)]  cf #2273
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider
    let chp = case b of { True -> fst x; False -> 0 }
@@ -467,7 +467,7 @@ And now all is well.
 The reason it's a hack is because if you define mySeq=seq, the hack
 won't work on mySeq.
 
-Note [Desugaring seq (3)] cf Trac #2409
+Note [Desugaring seq (3)] cf #2409
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 The isLocalId ensures that we don't turn
         True `seq` e
@@ -879,7 +879,7 @@ Reason: we know that a failure point is always a "join point" and is
 entered at most once.  Adding a dummy 'realWorld' token argument makes
 it clear that sharing is not an issue.  And that in turn makes it more
 CPR-friendly.  This matters a lot: if you don't get it right, you lose
-the tail call property.  For example, see Trac #3403.
+the tail call property.  For example, see #3403.
 
 
 ************************************************************************
diff --git a/compiler/deSugar/Match.hs b/compiler/deSugar/Match.hs
index 0930a6e6f4ec29f461e79fa7cbccde59776d29ad..c057298420d7f278822c4875065f68011ce9b1aa 100644
--- a/compiler/deSugar/Match.hs
+++ b/compiler/deSugar/Match.hs
@@ -154,7 +154,7 @@ Most of the matching functions take an Id or [Id] as argument.  This Id
 is the scrutinee(s) of the match. The desugared expression may
 sometimes use that Id in a local binding or as a case binder.  So it
 should not have an External name; Lint rejects non-top-level binders
-with External names (Trac #13043).
+with External names (#13043).
 
 See also Note [Localise pattern binders] in DsUtils
 -}
@@ -515,7 +515,7 @@ tidy_bang_pat v o _ p@(SumPat {})    = tidy1 v o p
 tidy_bang_pat v o l p@(ConPatOut { pat_con = (dL->L _ (RealDataCon dc))
                                  , pat_args = args
                                  , pat_arg_tys = arg_tys })
-  -- Newtypes: push bang inwards (Trac #9844)
+  -- Newtypes: push bang inwards (#9844)
   =
     if isNewTyCon (dataConTyCon dc)
       then tidy1 v o (p { pat_args = push_bang_into_newtype_arg l ty args })
@@ -534,7 +534,7 @@ tidy_bang_pat v o l p@(ConPatOut { pat_con = (dL->L _ (RealDataCon dc))
 --    NPlusKPat
 --
 -- For LazyPat, remember that it's semantically like a VarPat
---  i.e.  !(~p) is not like ~p, or p!  (Trac #8952)
+--  i.e.  !(~p) is not like ~p, or p!  (#8952)
 --
 -- NB: SigPatIn, ConPatIn should not happen
 
@@ -568,7 +568,7 @@ Note [Bang patterns and newtypes]
 For the pattern  !(Just pat)  we can discard the bang, because
 the pattern is strict anyway. But for !(N pat), where
   newtype NT = N Int
-we definitely can't discard the bang.  Trac #9844.
+we definitely can't discard the bang.  #9844.
 
 So what we do is to push the bang inwards, in the hope that it will
 get discarded there.  So we transform
@@ -926,7 +926,7 @@ If we see
     ...
 where P is a pattern synonym, can we put (P a -> e1) and (P b -> e2) in the
 same group?  We can if P is a constructor, but /not/ if P is a pattern synonym.
-Consider (Trac #11224)
+Consider (#11224)
    -- readMaybe :: Read a => String -> Maybe a
    pattern PRead :: Read a => () => a -> String
    pattern PRead a <- (readMaybe -> Just a)
diff --git a/compiler/deSugar/MatchCon.hs b/compiler/deSugar/MatchCon.hs
index f6997929108f28899a01ff79f44efc50faa00d80..ce1f19f56011c57dd7eba5564fe84838715c76fa 100644
--- a/compiler/deSugar/MatchCon.hs
+++ b/compiler/deSugar/MatchCon.hs
@@ -242,7 +242,7 @@ Consider
          f (T { y=True, x=False }) = ...
 
 We must match the patterns IN THE ORDER GIVEN, thus for the first
-one we match y=True before x=False.  See Trac #246; or imagine
+one we match y=True before x=False.  See #246; or imagine
 matching against (T { y=False, x=undefined }): should fail without
 touching the undefined.
 
diff --git a/compiler/deSugar/MatchLit.hs b/compiler/deSugar/MatchLit.hs
index d0db91d93a7e093b37b2648a225c008756924cac..d99ae7e443df96cb0260b80b05b75247d2baf910 100644
--- a/compiler/deSugar/MatchLit.hs
+++ b/compiler/deSugar/MatchLit.hs
@@ -287,7 +287,7 @@ warnAboutEmptyEnumerations dflags fromExpr mThnExpr toExpr
 
 getLHsIntegralLit :: LHsExpr GhcTc -> Maybe (Integer, Name)
 -- ^ See if the expression is an 'Integral' literal.
--- Remember to look through automatically-added tick-boxes! (Trac #8384)
+-- Remember to look through automatically-added tick-boxes! (#8384)
 getLHsIntegralLit (dL->L _ (HsPar _ e))            = getLHsIntegralLit e
 getLHsIntegralLit (dL->L _ (HsTick _ _ e))         = getLHsIntegralLit e
 getLHsIntegralLit (dL->L _ (HsBinTick _ _ _ e))    = getLHsIntegralLit e
@@ -349,7 +349,7 @@ tidyNPat (OverLit (OverLitTc False ty) val _) mb_neg _eq outer_ty
         -- Once that is settled, look for cases where the type of the
         -- entire overloaded literal matches the type of the underlying literal,
         -- and in that case take the short cut
-        -- NB: Watch out for weird cases like Trac #3382
+        -- NB: Watch out for weird cases like #3382
         --        f :: Int -> Int
         --        f "blah" = 4
         --     which might be ok if we have 'instance IsString Int'
@@ -363,7 +363,7 @@ tidyNPat (OverLit (OverLitTc False ty) val _) mb_neg _eq outer_ty
      -- NB: do /not/ convert Float or Double literals to F# 3.8 or D# 5.3
      -- If we do convert to the constructor form, we'll generate a case
      -- expression on a Float# or Double# and that's not allowed in Core; see
-     -- Trac #9238 and Note [Rules for floating-point comparisons] in PrelRules
+     -- #9238 and Note [Rules for floating-point comparisons] in PrelRules
   where
     -- Sometimes (like in test case
     -- overloadedlists/should_run/overloadedlistsrun04), the SyntaxExprs include
diff --git a/compiler/ghci/ByteCodeGen.hs b/compiler/ghci/ByteCodeGen.hs
index 86bb72b55092970d6063978813f8118f6a5624aa..c4a08c4e408e07e8dba306ced56b15fae548da7e 100644
--- a/compiler/ghci/ByteCodeGen.hs
+++ b/compiler/ghci/ByteCodeGen.hs
@@ -614,7 +614,7 @@ schemeE d s p exp@(AnnTick (Breakpoint _id _fvs) _rhs)
           -- type and hence won't be bound in the environment, but the
           -- breakpoint will otherwise work fine.
           --
-          -- NB (Trac #12007) this /also/ applies for if (ty :: TYPE r), where
+          -- NB (#12007) this /also/ applies for if (ty :: TYPE r), where
           --    r :: RuntimeRep is a variable. This can happen in the
           --    continuations for a pattern-synonym matcher
           --    match = /\(r::RuntimeRep) /\(a::TYPE r).
@@ -962,7 +962,7 @@ doCase d s p (_,scrut) bndr alts is_unboxed_tuple
                 return (my_discr alt, rhs_code)
            -- If an alt attempts to match on an unboxed tuple or sum, we must
            -- bail out, as the bytecode compiler can't handle them.
-           -- (See Trac #14608.)
+           -- (See #14608.)
            | any (\bndr -> typePrimRep (idType bndr) `lengthExceeds` 1) bndrs
            = multiValException
            -- algebraic alt with some binders
@@ -1398,7 +1398,7 @@ to have an info-table, and the next word to have the value to be
 tested.  This is very weird, but it's the way it is right now.  See
 Interpreter.c.  We don't acutally need an info-table here; we just
 need to have the argument to be one-from-top on the stack, hence pushing
-a 1-word null. See Trac #8383.
+a 1-word null. See #8383.
 -}
 
 
@@ -1825,7 +1825,7 @@ atomPrimRep e | Just e' <- bcView e = atomPrimRep e'
 atomPrimRep (AnnVar v)              = bcIdPrimRep v
 atomPrimRep (AnnLit l)              = typePrimRep1 (literalType l)
 
--- Trac #12128:
+-- #12128:
 -- A case expression can be an atom because empty cases evaluate to bottom.
 -- See Note [Empty case alternatives] in coreSyn/CoreSyn.hs
 atomPrimRep (AnnCase _ _ ty _)      = ASSERT(typePrimRep ty == [LiftedRep]) LiftedRep
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
index dad13b7bbb0ef0c6138ad52f7baa731fec0ece1d..ef00a85e72a74e6673458aaa09c2bfa68aea5fb2 100644
--- a/compiler/ghci/Linker.hs
+++ b/compiler/ghci/Linker.hs
@@ -341,7 +341,7 @@ linkCmdLineLibs' hsc_env pls =
       -- However because we don't know the actual name of pthread's dll we
       -- need to defer this to the locateLib call so we can't initialize it
       -- inside of the rts. Instead we do it here to be able to find the
-      -- import library for pthreads. See Trac #13210.
+      -- import library for pthreads. See #13210.
       let platform = targetPlatform dflags
           os       = platformOS platform
           minus_ls = case os of
diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs
index 82e0f88d2642c1268ff55ca2afa1ecc912f67164..436b756af66bb0a4ea2f43d568eda61a10509712 100644
--- a/compiler/ghci/RtClosureInspect.hs
+++ b/compiler/ghci/RtClosureInspect.hs
@@ -1056,7 +1056,7 @@ getDataConArgTys dc con_app_ty
 
 {- Note [Constructor arg types]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider a GADT (cf Trac #7386)
+Consider a GADT (cf #7386)
    data family D a b
    data instance D [a] a where
      MkT :: a -> D [a] (Maybe a)
diff --git a/compiler/hsSyn/Convert.hs b/compiler/hsSyn/Convert.hs
index 7113905bd90027e2cb7f0c26714e933a1b8c0263..77ffebe02123a6221cb92a5a405a83f88cbfcb56 100644
--- a/compiler/hsSyn/Convert.hs
+++ b/compiler/hsSyn/Convert.hs
@@ -1570,7 +1570,7 @@ points so that the code is readable with its original meaning.
 
 So scattered through Convert.hs are various points where parens are added.
 
-See (among other closed issued) https://ghc.haskell.org/trac/ghc/ticket/14289
+See (among other closed issued) https://gitlab.haskell.org/ghc/ghc/issues/14289
 -}
 -- ---------------------------------------------------------------------
 
@@ -1730,7 +1730,7 @@ mkHsForAllTy tvs loc fvf tvs' rho_ty
 
 -- It's important that we don't build an HsQualTy if the context is empty,
 -- as the pretty-printer for HsType _always_ prints contexts, even if
--- they're empty. See Trac #13183.
+-- they're empty. See #13183.
 mkHsQualTy :: TH.Cxt
            -- ^ The original Template Haskell context
            -> SrcSpan
@@ -1820,7 +1820,7 @@ thRdrName :: SrcSpan -> OccName.NameSpace -> String -> TH.NameFlavour -> RdrName
 --
 -- We pass in a SrcSpan (gotten from the monad) because this function
 -- is used for *binders* and if we make an Exact Name we want it
--- to have a binding site inside it.  (cf Trac #5434)
+-- to have a binding site inside it.  (cf #5434)
 --
 -- ToDo: we may generate silly RdrNames, by passing a name space
 --       that doesn't match the string, like VarName ":+",
@@ -1842,7 +1842,7 @@ thRdrName loc ctxt_ns th_occ th_name
     occ = mk_occ ctxt_ns th_occ
 
 -- Return an unqualified exact RdrName if we're dealing with built-in syntax.
--- See Trac #13776.
+-- See #13776.
 thOrigRdrName :: String -> TH.NameSpace -> PkgName -> ModName -> RdrName
 thOrigRdrName occ th_ns pkg mod =
   let occ' = mk_occ (mk_ghc_ns th_ns) occ
diff --git a/compiler/hsSyn/HsBinds.hs b/compiler/hsSyn/HsBinds.hs
index 110c0fb4885e68d16cf296a06053251504eebe05..8e3448d0f0ac317e6a9b1459bbb2a1a1e387b906 100644
--- a/compiler/hsSyn/HsBinds.hs
+++ b/compiler/hsSyn/HsBinds.hs
@@ -549,7 +549,7 @@ case we'd prefer to generate the (more direct)
      (# fromInteger $dNum 3, fromInteger $dNum 4 #)
 
 A similar thing happens with representation-polymorphic defns
-(Trac #11405):
+(#11405):
 
   undef :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
   undef = error "undef"
@@ -798,7 +798,7 @@ instance (idR ~ GhcPass pr,OutputableBndrId idL, OutputableBndrId idR,
 
 pprTicks :: SDoc -> SDoc -> SDoc
 -- Print stuff about ticks only when -dppr-debug is on, to avoid
--- them appearing in error messages (from the desugarer); see Trac # 3263
+-- them appearing in error messages (from the desugarer); see # 3263
 -- Also print ticks in dumpStyle, so that -ddump-hpc actually does
 -- something useful.
 pprTicks pp_no_debug pp_when_debug
diff --git a/compiler/hsSyn/HsDecls.hs b/compiler/hsSyn/HsDecls.hs
index f8709fbe1ebd05f0b6a082dcd15a4050c00c6654..d4742f5052082178a81859a4380f9de6ff18a2d3 100644
--- a/compiler/hsSyn/HsDecls.hs
+++ b/compiler/hsSyn/HsDecls.hs
@@ -855,7 +855,7 @@ NOTE THAT
     not be bound after it.)
 
     This last point is much more debatable than the others; see
-    Trac #15142 comment:22
+    #15142 comment:22
 -}
 
 
diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs
index 37d71821c06a2f2b8d613934136bf5321549ac30..bd63150c022c653f44e0b4e3e09d0ceb39b2244f 100644
--- a/compiler/hsSyn/HsExpr.hs
+++ b/compiler/hsSyn/HsExpr.hs
@@ -247,7 +247,7 @@ When it calls RnEnv.unknownNameSuggestions to identify these alternatives, the
 typechecker must provide a GlobalRdrEnv.  If it provided the current one, which
 contains top-level declarations for the entire module, the error message would
 incorrectly suggest the out-of-scope `bar` and `bad` as possible alternatives
-for `bar` (see Trac #11680).  Instead, the typechecker must use the same
+for `bar` (see #11680).  Instead, the typechecker must use the same
 GlobalRdrEnv the renamer used when it determined that `bar` is out-of-scope.
 
 To obtain this GlobalRdrEnv, can the typechecker simply use the out-of-scope
@@ -2012,7 +2012,7 @@ Note [The type of bind in Stmts]
 Some Stmts, notably BindStmt, keep the (>>=) bind operator.
 We do NOT assume that it has type
     (>>=) :: m a -> (a -> m b) -> m b
-In some cases (see Trac #303, #1537) it might have a more
+In some cases (see #303, #1537) it might have a more
 exotic type, such as
     (>>=) :: m i j a -> (a -> m j k b) -> m i k b
 So we must be careful not to make assumptions about the type.
@@ -2306,7 +2306,7 @@ pprComp quals     -- Prints:  body | qual1, ..., qualn
        -- one, we simply treat it like a normal list. This does arise
        -- occasionally in code that GHC generates, e.g., in implementations of
        -- 'range' for derived 'Ix' instances for product datatypes with exactly
-       -- one constructor (e.g., see Trac #12583).
+       -- one constructor (e.g., see #12583).
        then ppr body
        else hang (ppr body <+> vbar) 2 (pprQuals initStmts)
   | otherwise
diff --git a/compiler/hsSyn/HsPat.hs b/compiler/hsSyn/HsPat.hs
index 91be1492a808192fec57649f37a4cc7a895cd9c5..bce65ba25a6b7accb943e0078f1dc9e0209825c8 100644
--- a/compiler/hsSyn/HsPat.hs
+++ b/compiler/hsSyn/HsPat.hs
@@ -292,7 +292,7 @@ type instance XParPat  (GhcPass _) = NoExt
 type instance XBangPat (GhcPass _) = NoExt
 
 -- Note: XListPat cannot be extended when using GHC 8.0.2 as the bootstrap
--- compiler, as it triggers https://ghc.haskell.org/trac/ghc/ticket/14396 for
+-- compiler, as it triggers https://gitlab.haskell.org/ghc/ghc/issues/14396 for
 -- `SyntaxExpr`
 type instance XListPat GhcPs = NoExt
 type instance XListPat GhcRn = Maybe (SyntaxExpr GhcRn)
@@ -735,7 +735,7 @@ isIrrefutableHsPat
                            =
       isJust (tyConSingleDataCon_maybe (dataConTyCon con))
       -- NB: tyConSingleDataCon_maybe, *not* isProductTyCon, because
-      -- the latter is false of existentials. See Trac #4439
+      -- the latter is false of existentials. See #4439
       && all goL (hsConPatArgs details)
     go (ConPatOut
         { pat_con = (dL->L _ (PatSynCon _pat)) })
diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs
index ba961b53d09f8e55198f22c0611e79403cce1a07..9bb73c361bf16f045cb4e50ad3b896681b02813f 100644
--- a/compiler/hsSyn/HsTypes.hs
+++ b/compiler/hsSyn/HsTypes.hs
@@ -213,7 +213,7 @@ Note carefully:
   Or even:
         f :: forall _a. _a -> _b
   Here _a is an ordinary forall'd binder, but (With NamedWildCards)
-  _b is a named wildcard.  (See the comments in Trac #10982)
+  _b is a named wildcard.  (See the comments in #10982)
 
 * Named wildcards are bound by the HsWildCardBndrs construct, which wraps
   types that are allowed to have wildcards. Unnamed wildcards however are left
@@ -757,7 +757,7 @@ After renaming
 Qualified currently behaves exactly as Implicit,
 but it is deprecated to use it for implicit quantification.
 In this case, GHC 7.10 gives a warning; see
-Note [Context quantification] in RnTypes, and Trac #4426.
+Note [Context quantification] in RnTypes, and #4426.
 In GHC 8.0, Qualified will no longer bind variables
 and this will become an error.
 
@@ -1065,7 +1065,7 @@ mkHsAppKindTy ext ty k
 -- Breaks up any parens in the result type:
 --      splitHsFunType (a -> (b -> c)) = ([a,b], c)
 -- Also deals with (->) t1 t2; that is why it only works on LHsType Name
---   (see Trac #9096)
+--   (see #9096)
 splitHsFunType :: LHsType GhcRn -> ([LHsType GhcRn], LHsType GhcRn)
 splitHsFunType (L _ (HsParTy _ ty))
   = splitHsFunType ty
@@ -1483,7 +1483,7 @@ pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields)))
 {-
 Note [Printing KindedTyVars]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Trac #3830 reminded me that we should really only print the kind
+#3830 reminded me that we should really only print the kind
 signature on a KindedTyVar if the kind signature was put there by the
 programmer.  During kind inference GHC now adds a PostTcKind to UserTyVars,
 rather than converting to KindedTyVars as before.
diff --git a/compiler/hsSyn/HsUtils.hs b/compiler/hsSyn/HsUtils.hs
index 62c153ef524af25066a84871607a29d383d4f8b7..fa8ec1416cd595d5badbd7b61cd8bbe634acfb56 100644
--- a/compiler/hsSyn/HsUtils.hs
+++ b/compiler/hsSyn/HsUtils.hs
@@ -611,7 +611,7 @@ mkHsSigEnv get_info sigs
    `extendNameEnvList` (mk_pairs gen_dm_sigs)
    -- The subtlety is this: in a class decl with a
    -- default-method signature as well as a method signature
-   -- we want the latter to win (Trac #12533)
+   -- we want the latter to win (#12533)
    --    class C x where
    --       op :: forall a . x a -> x a
    --       default op :: forall b . x b -> x b
@@ -693,7 +693,7 @@ typeToLHsType ty
     go (CoercionTy co)      = pprPanic "toLHsSigWcType" (ppr co)
 
          -- Source-language types have _invisible_ kind arguments,
-         -- so we must remove them here (Trac #8563)
+         -- so we must remove them here (#8563)
 
     go_tv :: TyVar -> LHsTyVarBndr GhcPs
     go_tv tv = noLoc $ KindedTyVar noExt (noLoc (getRdrName tv))
@@ -703,7 +703,7 @@ typeToLHsType ty
 Note [Kind signatures in typeToLHsType]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 There are types that typeToLHsType can produce which require explicit kind
-signatures in order to kind-check. Here is an example from Trac #14579:
+signatures in order to kind-check. Here is an example from #14579:
 
   -- type P :: forall {k} {t :: k}. Proxy t
   type P = 'Proxy
@@ -1302,7 +1302,7 @@ main name (the TyCon of a type declaration etc), we want to give it
 the @SrcSpan@ of the whole /declaration/, not just the name itself
 (which is how it appears in the syntax tree).  This SrcSpan (for the
 entire declaration) is used as the SrcSpan for the Name that is
-finally produced, and hence for error messages.  (See Trac #8607.)
+finally produced, and hence for error messages.  (See #8607.)
 
 Note [Binders in family instances]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/iface/BuildTyCl.hs b/compiler/iface/BuildTyCl.hs
index 4cbcb963d6118f9afef5dad05b5794d70bb0f389..dc1c8438896024bd5b858f6e3ee5d73dee62131d 100644
--- a/compiler/iface/BuildTyCl.hs
+++ b/compiler/iface/BuildTyCl.hs
@@ -370,7 +370,7 @@ Consider
 
 We cannot represent this by a newtype, even though it's not
 existential, because there are two value fields (the equality
-predicate and op. See Trac #2238
+predicate and op. See #2238
 
 Moreover,
           class (a ~ F b) => C a b where {}
diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs
index 2ef369a5e92fc6cfeb6df5cdb27e8c72fe7e099a..a9ab4c97d7be5ac2f291913411cbf9997ebe9ade 100644
--- a/compiler/iface/FlagChecker.hs
+++ b/compiler/iface/FlagChecker.hs
@@ -73,7 +73,7 @@ fingerprintOptFlags :: DynFlags
                       -> IO Fingerprint
 fingerprintOptFlags DynFlags{..} nameio =
       let
-        -- See https://ghc.haskell.org/trac/ghc/ticket/10923
+        -- See https://gitlab.haskell.org/ghc/ghc/issues/10923
         -- We used to fingerprint the optimisation level, but as Joachim
         -- Breitner pointed out in comment 9 on that ticket, it's better
         -- to ignore that and just look at the individual optimisation flags.
@@ -91,7 +91,7 @@ fingerprintHpcFlags :: DynFlags
                       -> IO Fingerprint
 fingerprintHpcFlags dflags@DynFlags{..} nameio =
       let
-        -- -fhpc, see https://ghc.haskell.org/trac/ghc/ticket/11798
+        -- -fhpc, see https://gitlab.haskell.org/ghc/ghc/issues/11798
         -- hpcDir is output-only, so we should recompile if it changes
         hpc = if gopt Opt_Hpc dflags then Just hpcDir else Nothing
 
diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs
index 05f64dff5a18a2e6fff5d78773be7a2cc4f3dbb1..b066f5cf375b39a32c21da67c29b2a68552953b5 100644
--- a/compiler/iface/IfaceSyn.hs
+++ b/compiler/iface/IfaceSyn.hs
@@ -745,7 +745,7 @@ pprIfaceDecl ss (IfaceData { ifName = tycon, ifCType = ctype,
                                         (occName tycon))
                                     binders roles
             -- Don't display roles for data family instances (yet)
-            -- See discussion on Trac #8672.
+            -- See discussion on #8672.
 
     add_bars []     = Outputable.empty
     add_bars (c:cs) = sep ((equals <+> c) : map (vbar <+>) cs)
diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs
index e2235ab01ff7352fdd7bda9f9e60ec4d25518c7f..4488aef025c891bb26d7cbf869ed1732c240ac54 100644
--- a/compiler/iface/IfaceType.hs
+++ b/compiler/iface/IfaceType.hs
@@ -853,7 +853,7 @@ pretty-printing (defaultRuntimeRepVars, controlled by
 
 This applies to /quantified/ variables like 'w' above.  What about
 variables that are /free/ in the type being printed, which certainly
-happens in error messages.  Suppose (Trac #16074) we are reporting a
+happens in error messages.  Suppose (#16074) we are reporting a
 mismatch between two skolems
           (a :: RuntimeRep) ~ (b :: RuntimeRep)
 We certainly don't want to say "Can't match LiftedRep ~ LiftedRep"!
@@ -1169,7 +1169,7 @@ family instances as Specified.
 
 Note [Printing promoted type constructors]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this GHCi session (Trac #14343)
+Consider this GHCi session (#14343)
     > _ :: Proxy '[ 'True ]
     error:
       Found hole: _ :: Proxy '['True]
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index 927c49b7be54ac03b732cba67bf5ed53710a6b1a..497ddfc1798b299bfd288cb5ffe6abf8d2d5338f 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -876,7 +876,7 @@ It is possible (though hard) to get this error through user behaviour.
     is a home-package module which is not yet in the HPT!  Disaster.
 
 This actually happened with P=base, Q=ghc-prim, via the AMP warnings.
-See Trac #8320.
+See #8320.
 -}
 
 findAndReadIface :: SDoc
diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs
index 1ea608e7876bb82360ec12d23c9abe6f5945e413..440f89fb4ccb046cbfbf847db4ab8dc1fba29dbe 100644
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -625,7 +625,7 @@ addFingerprints hsc_env mb_old_fingerprint iface0 new_decls
 
    -- Note [Do not update EPS with your own hi-boot]
    -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-   -- (See also Trac #10182).  When your hs-boot file includes an orphan
+   -- (See also #10182).  When your hs-boot file includes an orphan
    -- instance declaration, you may find that the dep_orphs of a module you
    -- import contains reference to yourself.  DO NOT actually load this module
    -- or add it to the orphan hashes: you're going to provide the orphan
@@ -991,7 +991,7 @@ declExtras fix_fn ann_fn rule_env inst_env fi_env dm_env decl
             insts = (map ifDFun $ (concatMap at_extras ats)
                                     ++ lookupOccEnvL inst_env n)
                            -- Include instances of the associated types
-                           -- as well as instances of the class (Trac #5147)
+                           -- as well as instances of the class (#5147)
             meths = [id_extras (getOccName op) | IfaceClassOp op _ _ <- sigs]
             -- Names of all the default methods (see Note [default method Name])
             defms = [ dmName
@@ -1136,7 +1136,7 @@ Note [Internal used_names]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 Most of the used_names are External Names, but we can have Internal
 Names too: see Note [Binders in Template Haskell] in Convert, and
-Trac #5362 for an example.  Such Names are always
+#5362 for an example.  Such Names are always
   - Such Names are always for locally-defined things, for which we
     don't gather usage info, so we can just ignore them in ent_map
   - They are always System Names, hence the assert, just as a double check.
diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs
index 3874d8d6a2b2c5f6086edef4b1797cb5d49c1c2f..732ee1b61a46200a70550dd6059d2cf9133e6374 100644
--- a/compiler/iface/TcIface.hs
+++ b/compiler/iface/TcIface.hs
@@ -16,7 +16,7 @@ module TcIface (
         typecheckIfaceForInstantiate,
         tcIfaceDecl, tcIfaceInst, tcIfaceFamInst, tcIfaceRules,
         tcIfaceAnnotations, tcIfaceCompleteSigs,
-        tcIfaceExpr,    -- Desired by HERMIT (Trac #7683)
+        tcIfaceExpr,    -- Desired by HERMIT (#7683)
         tcIfaceGlobal
  ) where
 
@@ -757,7 +757,7 @@ tc_iface_decl _parent ignore_prags
         --     class C (T a) => D a where
         --       data T a
         -- Here the associated type T is knot-tied with the class, and
-        -- so we must not pull on T too eagerly.  See Trac #5970
+        -- so we must not pull on T too eagerly.  See #5970
 
    tc_sig :: IfaceClassOp -> IfL TcMethInfo
    tc_sig (IfaceClassOp op_name rdr_ty dm)
@@ -789,7 +789,7 @@ tc_iface_decl _parent ignore_prags
                                      ; return (Just (tc_def, noSrcSpan)) }
                   -- Must be done lazily in case the RHS of the defaults mention
                   -- the type constructor being defined here
-                  -- e.g.   type AT a; type AT b = AT [b]   Trac #8002
+                  -- e.g.   type AT a; type AT b = AT [b]   #8002
           return (ATI tc mb_def)
 
    mk_sc_doc pred = text "Superclass" <+> ppr pred
@@ -804,7 +804,7 @@ tc_iface_decl _ _ (IfaceAxiom { ifName = tc_name, ifTyCon = tc
        -- a hs-boot declared type constructor that is going to be
        -- defined by this module.
        -- e.g. type instance F Int = ToBeDefined
-       -- See Trac #13803
+       -- See #13803
        ; tc_branches <- forkM (text "Axiom branches" <+> ppr tc_name)
                       $ tc_ax_branches branches
        ; let axiom = CoAxiom { co_ax_unique   = nameUnique tc_name
@@ -992,7 +992,7 @@ Note [Synonym kind loop]
 ~~~~~~~~~~~~~~~~~~~~~~~~
 Notice that we eagerly grab the *kind* from the interface file, but
 build a forkM thunk for the *rhs* (and family stuff).  To see why,
-consider this (Trac #2412)
+consider this (#2412)
 
 M.hs:       module M where { import X; data T = MkT S }
 X.hs:       module X where { import {-# SOURCE #-} M; type S = T }
diff --git a/compiler/iface/ToIface.hs b/compiler/iface/ToIface.hs
index 3779e394cce560fbfb7e730a6d4b6131eb5df165..aa4e53cfb4bfe700cd3ca1f8897ec2fd09cef87d 100644
--- a/compiler/iface/ToIface.hs
+++ b/compiler/iface/ToIface.hs
@@ -322,7 +322,7 @@ toIfaceAppArgsX fr kind ty_args
         -- e.g. kind = k, ty_args = [Int]
         -- This is probably a compiler bug, so we print a trace and
         -- carry on as if it were FunTy.  Without the test for
-        -- isEmptyTCvSubst we'd get an infinite loop (Trac #15473)
+        -- isEmptyTCvSubst we'd get an infinite loop (#15473)
         WARN( True, ppr kind $$ ppr ty_args )
         IA_Arg (toIfaceTypeX fr t1) Required (go env ty ts1)
 
@@ -522,7 +522,7 @@ toIfaceTickish (HpcTick modl ix)       = Just (IfaceHpcTick modl ix)
 toIfaceTickish (SourceNote src names)  = Just (IfaceSource src names)
 toIfaceTickish (Breakpoint {})         = Nothing
    -- Ignore breakpoints, since they are relevant only to GHCi, and
-   -- should not be serialised (Trac #8333)
+   -- should not be serialised (#8333)
 
 ---------------------
 toIfaceBind :: Bind Id -> IfaceBinding
@@ -581,7 +581,7 @@ toIfaceVar v
 
 {- Note [Inlining and hs-boot files]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this example (Trac #10083, #12789):
+Consider this example (#10083, #12789):
 
     ---------- RSR.hs-boot ------------
     module RSR where
@@ -643,7 +643,7 @@ But how do we arrange for this to happen?  There are two ingredients:
 Here is a solution that doesn't work: when compiling RSR,
 add a NOINLINE pragma to every function exported by the boot-file
 for RSR (if it exists).  Doing so makes the bootstrapped GHC itself
-slower by 8% overall (on Trac #9872a-d, and T1969: the reason
+slower by 8% overall (on #9872a-d, and T1969: the reason
 is that these NOINLINE'd functions now can't be profitably inlined
 outside of the hs-boot loop.
 
diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs
index 975c36108520c90fe3baec7e1a1228ba8605c2e3..9bcceb599dc39e77edf4e7b116ecccc9d55b64e5 100644
--- a/compiler/llvmGen/Llvm/Types.hs
+++ b/compiler/llvmGen/Llvm/Types.hs
@@ -231,7 +231,7 @@ ppLit f@(LMFloatLit _ _)       = sdocWithDynFlags (\dflags ->
                                    error $ "Can't print this float literal!" ++ showSDoc dflags (ppr f))
 ppLit (LMVectorLit ls  )       = char '<' <+> ppCommaJoin ls <+> char '>'
 ppLit (LMNullLit _     )       = text "null"
--- Trac 11487 was an issue where we passed undef for some arguments
+-- #11487 was an issue where we passed undef for some arguments
 -- that were actually live. By chance the registers holding those
 -- arguments usually happened to have the right values anyways, but
 -- that was not guaranteed. To find such bugs reliably, we set the
diff --git a/compiler/llvmGen/LlvmCodeGen.hs b/compiler/llvmGen/LlvmCodeGen.hs
index b003cbc123150db8ceb4cc0084d6c7b66b35d8f8..a24a416256e6c9326e6c25f2406355c3aa5ecc2a 100644
--- a/compiler/llvmGen/LlvmCodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen.hs
@@ -138,7 +138,7 @@ cmmDataLlvmGens statics
 -- | LLVM can't handle entry blocks which loop back to themselves (could be
 -- seen as an LLVM bug) so we rearrange the code to keep the original entry
 -- label which branches to a newly generated second label that branches back
--- to itself. See: Trac #11649
+-- to itself. See: #11649
 fixBottom :: RawCmmDecl -> LlvmM RawCmmDecl
 fixBottom cp@(CmmProc hdr entry_lbl live g) =
     maybe (pure cp) fix_block $ mapLookup (g_entry g) blk_map
diff --git a/compiler/main/Ar.hs b/compiler/main/Ar.hs
index 1f1b44ed356ebd33a76a4d3cf7e688c897fef93b..73292d0ae3a2583326708590405b02ccc50afdac 100644
--- a/compiler/main/Ar.hs
+++ b/compiler/main/Ar.hs
@@ -106,7 +106,7 @@ getBSDArchEntries = do
                         return $ C.unpack $ C.takeWhile (/= ' ') name
         off2    <- liftM fromIntegral bytesRead :: Get Int
         file    <- getByteString (st_size - (off2 - off1))
-        -- data sections are two byte aligned (see Trac #15396)
+        -- data sections are two byte aligned (see #15396)
         when (odd st_size) $
           void (getByteString 1)
 
@@ -135,7 +135,7 @@ getGNUArchEntries extInfo = do
         fail ("[BSD Archive] Invalid archive header end marker for name: " ++
               C.unpack name)
       file <- getByteString st_size
-      -- data sections are two byte aligned (see Trac #15396)
+      -- data sections are two byte aligned (see #15396)
       when (odd st_size) $
         void (getByteString 1)
       name <- return . C.unpack $
diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs
index cb30b6fe6c8ae9a321b98b0ef5ab801673a9e493..6763aed12802c15401c8a5f23ce5e1ef6a0b590a 100644
--- a/compiler/main/CmdLineParser.hs
+++ b/compiler/main/CmdLineParser.hs
@@ -235,12 +235,12 @@ processOneArg opt_kind rest arg args
                                     []               -> missingArgErr dash_arg
                                     (L _ arg1:args1) -> Right (f arg1, args1)
 
-        -- See Trac #9776
+        -- See #9776
         SepArg f -> case args of
                         []               -> missingArgErr dash_arg
                         (L _ arg1:args1) -> Right (f arg1, args1)
 
-        -- See Trac #12625
+        -- See #12625
         Prefix f | notNull rest_no_eq -> Right (f rest_no_eq, args)
                  | otherwise          -> missingArgErr  dash_arg
 
@@ -277,7 +277,7 @@ arg_ok (NoArg           _)  rest _   = null rest
 arg_ok (HasArg          _)  _    _   = True
 arg_ok (SepArg          _)  rest _   = null rest
 arg_ok (Prefix          _)  _    _   = True -- Missing argument checked for in processOneArg t
-                                            -- to improve error message (Trac #12625)
+                                            -- to improve error message (#12625)
 arg_ok (OptIntSuffix    _)  _    _   = True
 arg_ok (IntSuffix       _)  _    _   = True
 arg_ok (FloatSuffix     _)  _    _   = True
diff --git a/compiler/main/Constants.hs b/compiler/main/Constants.hs
index 7eda13091769b65a522fa91b13da943a43ac7c58..cf3458507b563a9af5c4b5cc888dd2608104ed52 100644
--- a/compiler/main/Constants.hs
+++ b/compiler/main/Constants.hs
@@ -26,7 +26,7 @@ mAX_SUM_SIZE :: Int
 mAX_SUM_SIZE = 62
 
 -- | Default maximum depth for both class instance search and type family
--- reduction. See also Trac #5395.
+-- reduction. See also #5395.
 mAX_REDUCTION_DEPTH :: Int
 mAX_REDUCTION_DEPTH = 200
 
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 998928709a360996a32256e2a8f10344c6be039e..5866568619c7c14ecb1216415c65d6f2117cb308 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -329,7 +329,7 @@ compileEmptyStub dflags hsc_env basename location mod_name = do
   -- valid) stub object file for signatures.  However,
   -- we make sure this object file has a unique symbol,
   -- so that ranlib on OS X doesn't complain, see
-  -- http://ghc.haskell.org/trac/ghc/ticket/12673
+  -- https://gitlab.haskell.org/ghc/ghc/issues/12673
   -- and https://github.com/haskell/cabal/issues/2257
   empty_stub <- newTempName dflags TFL_CurrentModule "c"
   let src = text "int" <+> ppr (mkModule (thisPackage dflags) mod_name) <+> text "= 0;"
@@ -777,7 +777,7 @@ getOutputFilename stop_phase output basename dflags next_phase maybe_location
                        As _    | keep_s     -> True
                        LlvmOpt | keep_bc    -> True
                        HCc     | keep_hc    -> True
-                       HsPp _  | keep_hscpp -> True   -- See Trac #10869
+                       HsPp _  | keep_hscpp -> True   -- See #10869
                        _other               -> False
 
           suffix = myPhaseInputExt next_phase
@@ -1958,7 +1958,7 @@ doCpp dflags raw input_fn output_fn = do
                     -- Include version macros for every *exposed* package.
                     -- Without -hide-all-packages and with a package database
                     -- size of 1000 packages, it takes cpp an estimated 2
-                    -- milliseconds to process this file. See Trac #10970
+                    -- milliseconds to process this file. See #10970
                     -- comment 8.
                     return [SysTools.FileOption "-include" macro_stub]
             else return []
@@ -2011,7 +2011,7 @@ getBackendDefs _ =
 
 generatePackageVersionMacros :: [PackageConfig] -> String
 generatePackageVersionMacros pkgs = concat
-  -- Do not add any C-style comments. See Trac #3389.
+  -- Do not add any C-style comments. See #3389.
   [ generateMacros "" pkgname version
   | pkg <- pkgs
   , let version = packageVersion pkg
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index b3cfa4860eccdb88c8028e150aa9931d5828da29..ba4cfe726a0250d60a626c01b79721b336f6e6a5 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -324,7 +324,7 @@ import Foreign (Ptr) -- needed for 2nd stage
 --    There is a change log tracking language extension additions and removals
 --    on the GHC wiki:  https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory
 --
---  See Trac #4437 and #8176.
+--  See #4437 and #8176.
 
 -- -----------------------------------------------------------------------------
 -- DynFlags
@@ -727,7 +727,7 @@ data WarnReason
 
 -- | Used to differentiate the scope an include needs to apply to.
 -- We have to split the include paths to avoid accidentally forcing recursive
--- includes since -I overrides the system search paths. See Trac #14312.
+-- includes since -I overrides the system search paths. See #14312.
 data IncludeSpecs
   = IncludeSpecs { includePathsQuote  :: [String]
                  , includePathsGlobal :: [String]
@@ -3005,7 +3005,7 @@ dynamic_flags_deps = [
   , make_ord_flag defFlag "pgmc"
       (hasArg (\f -> alterSettings (\s -> s { sPgm_c   = (f,[]),
                                               -- Don't pass -no-pie with -pgmc
-                                              -- (see Trac #15319)
+                                              -- (see #15319)
                                               sGccSupportsNoPie = False})))
   , make_ord_flag defFlag "pgms"
       (HasArg (\_ -> addWarn "Object splitting was removed in GHC 8.8"))
@@ -3753,7 +3753,7 @@ dynamic_flags_deps = [
                   "-XDeriveGeneric for generic programming support.") ]
 
 -- | This is where we handle unrecognised warning flags. We only issue a warning
--- if -Wunrecognised-warning-flags is set. See Trac #11429 for context.
+-- if -Wunrecognised-warning-flags is set. See #11429 for context.
 unrecognisedWarning :: String -> Flag (CmdLineP DynFlags)
 unrecognisedWarning prefix = defHiddenFlag prefix (Prefix action)
   where
@@ -4557,7 +4557,7 @@ impliedXFlags
     , (LangExt.ExistentialQuantification, turnOn, LangExt.ExplicitForAll)
     , (LangExt.FlexibleInstances,         turnOn, LangExt.TypeSynonymInstances)
     , (LangExt.FunctionalDependencies,    turnOn, LangExt.MultiParamTypeClasses)
-    , (LangExt.MultiParamTypeClasses,     turnOn, LangExt.ConstrainedClassMethods)  -- c.f. Trac #7854
+    , (LangExt.MultiParamTypeClasses,     turnOn, LangExt.ConstrainedClassMethods)  -- c.f. #7854
     , (LangExt.TypeFamilyDependencies,    turnOn, LangExt.TypeFamilies)
 
     , (LangExt.RebindableSyntax, turnOff, LangExt.ImplicitPrelude)      -- NB: turn off!
@@ -4675,7 +4675,7 @@ optLevelFlags -- see Note [Documenting optimisation flags]
 
 {- Note [Eta-reduction in -O0]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Trac #11562 showed an example which tripped an ASSERT in CoreToStg; a
+#11562 showed an example which tripped an ASSERT in CoreToStg; a
 function was marked as MayHaveCafRefs when in fact it obviously
 didn't.  Reason was:
  * Eta reduction wasn't happening in the simplifier, but it was
@@ -5553,7 +5553,7 @@ picCCOpts dflags = pieOpts ++ picOpts
        | gopt Opt_PIC dflags || WayDyn `elem` ways dflags ->
           ["-fPIC", "-U__PIC__", "-D__PIC__"]
       -- gcc may be configured to have PIC on by default, let's be
-      -- explicit here, see Trac #15847
+      -- explicit here, see #15847
        | otherwise -> ["-fno-PIC"]
 
     pieOpts
diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs
index 9ee685627536371cc75ac393e459e349eda989e5..4f19437ce98c775b8366566d24d22bc31253db18 100644
--- a/compiler/main/ErrUtils.hs
+++ b/compiler/main/ErrUtils.hs
@@ -485,7 +485,7 @@ withDumpFileHandle dflags flag action = do
             -- We do not want the dump file to be affected by
             -- environment variables, but instead to always use
             -- UTF8. See:
-            -- https://ghc.haskell.org/trac/ghc/ticket/10762
+            -- https://gitlab.haskell.org/ghc/ghc/issues/10762
             hSetEncoding handle utf8
 
             action (Just handle)
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index 9e58f356f68d52408f807086b4a344756c54e5d3..4e6e0f43c21d643c686f38b1263b08c97746e70a 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -138,7 +138,7 @@ module GHC (
         getDocs, GetDocsFailure(..),
 
         -- ** Other
-        runTcInteractive,   -- Desired by some clients (Trac #8878)
+        runTcInteractive,   -- Desired by some clients (#8878)
         isStmt, hasImport, isImport, isDecl,
 
         -- ** The debugger
@@ -516,7 +516,7 @@ initGhcMonad mb_top_dir
 -- check should be more selective but there is currently no released
 -- version where this bug is fixed.
 -- See https://sourceware.org/bugzilla/show_bug.cgi?id=16177 and
--- https://ghc.haskell.org/trac/ghc/ticket/4210#comment:29
+-- https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333
 checkBrokenTablesNextToCode :: MonadIO m => DynFlags -> m ()
 checkBrokenTablesNextToCode dflags
   = do { broken <- checkBrokenTablesNextToCode' dflags
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index a6fe5c7f72f2ad8f62b4bfb9a35367a90957bb93..d730fe70f1489598baca58229f5171e3fea1d142 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -160,7 +160,7 @@ depanal excluded_mods allow_dup_roots = do
 -- but "A" imports some other module "C", then GHC will issue a warning
 -- about module "C" not being listed in a command line.
 --
--- The warning in enabled by `-Wmissing-home-modules`. See Trac #13129
+-- The warning in enabled by `-Wmissing-home-modules`. See #13129
 warnMissingHomeModules :: GhcMonad m => HscEnv -> ModuleGraph -> m ()
 warnMissingHomeModules hsc_env mod_graph =
     when (wopt Opt_WarnMissingHomeModules dflags && not (null missing)) $
@@ -178,7 +178,7 @@ warnMissingHomeModules hsc_env mod_graph =
     -- For instance, `ghc --make src-exe/Main.hs` and
     -- `ghc --make -isrc-exe Main` are supposed to be equivalent.
     -- Note also that we can't always infer the associated module name
-    -- directly from the filename argument.  See Trac #13727.
+    -- directly from the filename argument.  See #13727.
     is_my_target mod (TargetModule name)
       = moduleName (ms_mod mod) == name
     is_my_target mod (TargetFile target_file _)
@@ -868,7 +868,7 @@ parUpsweep n_jobs mHscMessage old_hpt stable_mods cleanup sccs = do
             n_cpus <- getNumProcessors
             -- Setting number of capabilities more than
             -- CPU count usually leads to high userspace
-            -- lock contention. Trac #9221
+            -- lock contention. #9221
             let n_caps = min n_jobs n_cpus
             unless (n_capabilities /= 1) $ setNumCapabilities n_caps
             return n_capabilities
@@ -1629,7 +1629,7 @@ Potential TODOS:
 -- be any object code that we can compare against, nor should there
 -- be: we're *just* generating interface files.  In this case, we
 -- want to check if the interface file is new, in lieu of the object
--- file.  See also Trac #9243.
+-- file.  See also #9243.
 
 -- Filter modules in the HPT
 retainInTopLevelEnvs :: [ModuleName] -> HomePackageTable -> HomePackageTable
diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs
index 0ca7bdae45e6b9e7093650d06a867913a6fa05a2..add0ee95d22ac2b6018f6968eb49f35d18113054 100644
--- a/compiler/main/HscTypes.hs
+++ b/compiler/main/HscTypes.hs
@@ -703,7 +703,7 @@ hptSomeThingsBelowUs extract include_hi_boot hsc_env deps
                     Nothing -> pprTrace "WARNING in hptSomeThingsBelowUs" msg []
           msg = vcat [text "missing module" <+> ppr mod,
                       text "Probable cause: out-of-date interface files"]
-                        -- This really shouldn't happen, but see Trac #962
+                        -- This really shouldn't happen, but see #962
 
         -- And get its dfuns
     , thing <- things ]
@@ -1535,7 +1535,7 @@ e.g.    Prelude> data T = A | B
         Prelude> instance Eq T where ...
         Prelude> instance Eq T where ...   -- This one overrides
 
-It's exactly the same for type-family instances.  See Trac #7102
+It's exactly the same for type-family instances.  See #7102
 -}
 
 -- | Interactive context, recording information about the state of the
@@ -1658,7 +1658,7 @@ extendInteractiveContext :: InteractiveContext
 extendInteractiveContext ictxt new_tythings new_cls_insts new_fam_insts defaults fix_env
   = ictxt { ic_mod_index  = ic_mod_index ictxt + 1
                             -- Always bump this; even instances should create
-                            -- a new mod_index (Trac #9426)
+                            -- a new mod_index (#9426)
           , ic_tythings   = new_tythings ++ old_tythings
           , ic_rn_gbl_env = ic_rn_gbl_env ictxt `icExtendGblRdrEnv` new_tythings
           , ic_instances  = ( new_cls_insts ++ old_cls_insts
@@ -1726,7 +1726,7 @@ icExtendGblRdrEnv env tythings
     -- are not implicit-ids, and must appear in the TypeEnv.  But they
     -- will also be brought into scope by the corresponding (ATyCon
     -- tc).  And we want the latter, because that has the correct
-    -- parent (Trac #10520)
+    -- parent (#10520)
     is_sub_bndr (AnId f) = case idDetails f of
                              RecSelId {}  -> True
                              ClassOpId {} -> True
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
index 5ff1b03a97b7982a63e672138b0fc4cc2cbaf125..2c04029e88fe92de4d2d66d2886b0eb7018d208d 100644
--- a/compiler/main/InteractiveEval.hs
+++ b/compiler/main/InteractiveEval.hs
@@ -249,7 +249,7 @@ Things like the coercion axiom for newtypes. These bindings all get
 OccNames that users can't write, to avoid the possibility of name
 clashes (in linker symbols).  That gives a convenient way to suppress
 them. The relevant predicate is OccName.isDerivedOccName.
-See Trac #11051 for more background and examples.
+See #11051 for more background and examples.
 -}
 
 withVirtualCWD :: GhcMonad m => m a -> m a
@@ -756,7 +756,7 @@ moduleIsInterpreted modl = withSession $ \h ->
 -- Filter the instances by the ones whose tycons (or clases resp)
 -- are in scope (qualified or otherwise).  Otherwise we list a whole lot too many!
 -- The exact choice of which ones to show, and which to hide, is a judgement call.
---      (see Trac #1581)
+--      (see #1581)
 getInfo :: GhcMonad m => Bool -> Name
         -> m (Maybe (TyThing,Fixity,[ClsInst],[FamInst], SDoc))
 getInfo allInfo name
@@ -800,7 +800,7 @@ getRdrNamesInScope = withSession $ \hsc_env -> do
       ic = hsc_IC hsc_env
       gbl_rdrenv = ic_rn_gbl_env ic
       gbl_names = concatMap greRdrNames $ globalRdrEnvElts gbl_rdrenv
-  -- Exclude internally generated names; see e.g. Trac #11328
+  -- Exclude internally generated names; see e.g. #11328
   return (filter (not . isDerivedOccName . rdrNameOcc) gbl_names)
 
 
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs
index 44258de70c245d9149aadc5a733d8af1558598ae..8c81d82d78aa3e934e5cd0b28718c5184c3f2613 100644
--- a/compiler/main/Packages.hs
+++ b/compiler/main/Packages.hs
@@ -1723,7 +1723,7 @@ mkUnusableModuleToPkgConfAll unusables =
 -- | Add a list of key/value pairs to a nested map.
 --
 -- The outer map is processed with 'Data.Map.Strict' to prevent memory leaks
--- when reloading modules in GHCi (see Trac #4029). This ensures that each
+-- when reloading modules in GHCi (see #4029). This ensures that each
 -- value is forced before installing into the map.
 addListTo :: (Monoid a, Ord k1, Ord k2)
           => Map k1 (Map k2 a)
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index 543dd9ce3b82835a22f45eb6e7d57d16f4e83dce..fddc4ac30f76b3aa009388a417d9c785aeaedd36 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -314,7 +314,7 @@ initSysTools top_dir
 
 {- Note [Windows stack usage]
 
-See: Trac #8870 (and #8834 for related info) and #12186
+See: #8870 (and #8834 for related info) and #12186
 
 On Windows, occasionally we need to grow the stack. In order to do
 this, we would normally just bump the stack pointer - but there's a
@@ -616,5 +616,5 @@ R_*_COPY relocations.
 Unregisterised compiler can't evade R_*_COPY relocations easily thus we disable
 -Bsymbolic linking there.
 
-See related Trac tickets: #4210, #15338
+See related tickets: #4210, #15338
 -}
diff --git a/compiler/main/SysTools/Info.hs b/compiler/main/SysTools/Info.hs
index 420a2bf27f68695b0ce89c1c5bdfdf82d0f5897f..2dcd39549f2420e94a730a9bfb44f85885e31cc2 100644
--- a/compiler/main/SysTools/Info.hs
+++ b/compiler/main/SysTools/Info.hs
@@ -26,7 +26,7 @@ import SysTools.Process
 
 {- Note [Run-time linker info]
 
-See also: Trac #5240, Trac #6063, Trac #10110
+See also: #5240, #6063, #10110
 
 Before 'runLink', we need to be sure to get the relevant information
 about the linker we're using at runtime to see if we need any extra
@@ -127,8 +127,8 @@ getLinkerInfo' dflags = do
       parseLinkerInfo stdo _stde _exitc
         | any ("GNU ld" `isPrefixOf`) stdo =
           -- GNU ld specifically needs to use less memory. This especially
-          -- hurts on small object files. Trac #5240.
-          -- Set DT_NEEDED for all shared libraries. Trac #10110.
+          -- hurts on small object files. #5240.
+          -- Set DT_NEEDED for all shared libraries. #10110.
           -- TODO: Investigate if these help or hurt when using split sections.
           return (GnuLD $ map Option ["-Wl,--hash-size=31",
                                       "-Wl,--reduce-memory-overheads",
@@ -137,7 +137,7 @@ getLinkerInfo' dflags = do
                                       "-Wl,--no-as-needed"])
 
         | any ("GNU gold" `isPrefixOf`) stdo =
-          -- GNU gold only needs --no-as-needed. Trac #10110.
+          -- GNU gold only needs --no-as-needed. #10110.
           -- ELF specific flag, see Note [ELF needed shared libs]
           return (GnuGold [Option "-Wl,--no-as-needed"])
 
diff --git a/compiler/main/SysTools/Process.hs b/compiler/main/SysTools/Process.hs
index cc8f67d1391d3f128e7bac191873ad4d5d3d1a20..2e0e502b63c5a21a463a977542dcb81a52a06358 100644
--- a/compiler/main/SysTools/Process.hs
+++ b/compiler/main/SysTools/Process.hs
@@ -117,7 +117,7 @@ runSomething dflags phase_name pgm args =
 -- response files for passing them in. See:
 --
 --     https://gcc.gnu.org/wiki/Response_Files
---     https://ghc.haskell.org/trac/ghc/ticket/10777
+--     https://gitlab.haskell.org/ghc/ghc/issues/10777
 runSomethingResponseFile
   :: DynFlags -> (String->String) -> String -> String -> [Option]
   -> Maybe [(String,String)] -> IO ()
diff --git a/compiler/main/TidyPgm.hs b/compiler/main/TidyPgm.hs
index e9f3f85317ab82e27c8d846a4fd3373f433bc465..6e84530193800981c452f69ba1a88fb3a9523096 100644
--- a/compiler/main/TidyPgm.hs
+++ b/compiler/main/TidyPgm.hs
@@ -486,7 +486,7 @@ extendTypeEnvWithPatSyns tidy_patsyns type_env
 Note [Don't attempt to trim data types]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 For some time GHC tried to avoid exporting the data constructors
-of a data type if it wasn't strictly necessary to do so; see Trac #835.
+of a data type if it wasn't strictly necessary to do so; see #835.
 But "strictly necessary" accumulated a longer and longer list
 of exceptions, and finally I gave up the battle:
 
@@ -501,7 +501,7 @@ of exceptions, and finally I gave up the battle:
     there are a lot of exceptions, notably when Template Haskell is
     involved or, more recently, DataKinds.
 
-    However Trac #7445 shows that even without TemplateHaskell, using
+    However #7445 shows that even without TemplateHaskell, using
     the Data class and invoking Language.Haskell.TH.Quote.dataToExpQ
     is enough to require us to expose the data constructors.
 
@@ -528,7 +528,7 @@ Then the unfolding looks like
 This generates bad code unless it's first simplified a bit.  That is
 why CoreUnfold.mkImplicitUnfolding uses simpleOptExpr to do a bit of
 optimisation first.  (Only matters when the selector is used curried;
-eg map x ys.)  See Trac #2070.
+eg map x ys.)  See #2070.
 
 [Oct 09: in fact, record selectors are no longer implicit Ids at all,
 because we really do want to optimise them properly. They are treated
@@ -541,7 +541,7 @@ because GlobalIds are supposed to have *fixed* IdInfo, but the
 simplifier and other core-to-core passes mess with IdInfo all the
 time.  The straw that broke the camels back was when a class selector
 got the wrong arity -- ie the simplifier gave it arity 2, whereas
-importing modules were expecting it to have arity 1 (Trac #2844).
+importing modules were expecting it to have arity 1 (#2844).
 It's much safer just to inject them right at the end, after tidying.
 
 Oh: two other reasons for injecting them late:
@@ -1251,7 +1251,7 @@ tidyTopIdInfo dflags rhs_tidy_env name orig_rhs tidy_rhs idinfo show_unfold caf_
     --     marked NOINLINE or something like that
     -- This is important: if you expose the worker for a loop-breaker
     -- then you can make the simplifier go into an infinite loop, because
-    -- in effect the unfolding is exposed.  See Trac #1709
+    -- in effect the unfolding is exposed.  See #1709
     --
     -- You might think that if show_unfold is False, then the thing should
     -- not be w/w'd in the first place.  But a legitimate reason is this:
@@ -1371,7 +1371,7 @@ not exported, to reduce the size of interface files, at least without
 -O.  But that is not always possible: see the old Note [When we can't
 trim types] below for exceptions.
 
-Then (Trac #7445) I realised that the TH problem arises for any data type
+Then (#7445) I realised that the TH problem arises for any data type
 that we have deriving( Data ), because we can invoke
    Language.Haskell.TH.Quote.dataToExpQ
 to get a TH Exp representation of a value built from that data type.
@@ -1396,7 +1396,7 @@ now.
 
 But there are some times we can't do that, indicated by the 'no_trim_types' flag.
 
-First, Template Haskell.  Consider (Trac #2386) this
+First, Template Haskell.  Consider (#2386) this
         module M(T, makeOne) where
           data T = Yay String
           makeOne = [| Yay "Yep" |]
@@ -1405,7 +1405,7 @@ A module that splices in $(makeOne) will then look for a declaration of Yay,
 so it'd better be there.  Hence, brutally but simply, we switch off type
 constructor trimming if TH is enabled in this module.
 
-Second, data kinds.  Consider (Trac #5912)
+Second, data kinds.  Consider (#5912)
      {-# LANGUAGE DataKinds #-}
      module M() where
      data UnaryTypeC a = UnaryDataC a
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index c9d5c2df1869f324e57d7dd5c31afd74c785d21a..c4eb0811bd983c09fb6d37444c089dafe00f47f0 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -754,12 +754,12 @@ pprInstr (SR II32 reg1 reg2 (RIImm (ImmInt i))) | i < 0  || i > 31 =
     -- Handle the case where we are asked to shift a 32 bit register by
     -- less than zero or more than 31 bits. We convert this into a clear
     -- of the destination register.
-    -- Fixes ticket http://ghc.haskell.org/trac/ghc/ticket/5900
+    -- Fixes ticket https://gitlab.haskell.org/ghc/ghc/issues/5900
     pprInstr (XOR reg1 reg2 (RIReg reg2))
 
 pprInstr (SL II32 reg1 reg2 (RIImm (ImmInt i))) | i < 0  || i > 31 =
     -- As above for SR, but for left shifts.
-    -- Fixes ticket http://ghc.haskell.org/trac/ghc/ticket/10870
+    -- Fixes ticket https://gitlab.haskell.org/ghc/ghc/issues/10870
     pprInstr (XOR reg1 reg2 (RIReg reg2))
 
 pprInstr (SRA II32 reg1 reg2 (RIImm (ImmInt i))) | i > 31 =
diff --git a/compiler/nativeGen/PprBase.hs b/compiler/nativeGen/PprBase.hs
index 84f94920324f9ce563c8b5da2cba215311aead5f..80f3e6179b3f4e0cefaba79018f0a9f79928eedf 100644
--- a/compiler/nativeGen/PprBase.hs
+++ b/compiler/nativeGen/PprBase.hs
@@ -103,7 +103,7 @@ pprASCII :: ByteString -> SDoc
 pprASCII str
   -- Transform this given literal bytestring to escaped string and construct
   -- the literal SDoc directly.
-  -- See Trac #14741
+  -- See #14741
   -- and Note [Pretty print ASCII when AsmCodeGen]
   = text $ BS.foldr (\w s -> do1 w ++ s) "" str
     where
@@ -189,7 +189,7 @@ high memory usage.
 Now we escape the given bytestring to string directly and construct
 SDoc only once. This improvement could dramatically decrease the
 memory allocation from 4.7GB to 1.3GB when embedding a 3MB literal
-string in source code. See Trac #14741 for profiling results.
+string in source code. See #14741 for profiling results.
 -}
 
 -- ----------------------------------------------------------------------------
diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs
index 2d099f9854e57d315a9ea384d4e1b697b2a63c28..6ecd4cd17045b3fb68b9a494b634484a3ee79966 100644
--- a/compiler/nativeGen/X86/Ppr.hs
+++ b/compiler/nativeGen/X86/Ppr.hs
@@ -726,7 +726,7 @@ pprInstr (TEST format src dst) = sdocWithPlatform $ \platform ->
         -- The mask must have the high bit clear for this smaller encoding
         -- to be completely equivalent to the original; in particular so
         -- that the signed comparison condition bits are the same as they
-        -- would be if doing a full word comparison. See Trac #13425.
+        -- would be if doing a full word comparison. See #13425.
         (OpImm (ImmInteger mask), OpReg dstReg)
           | 0 <= mask && mask < 128 -> minSizeOfReg platform dstReg
         _ -> format
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index d77564e13ae874a6b64e9cc13470a59959d5a563..7c08ceab78cdb91d73c55369fff779262a6428ff 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -1884,7 +1884,7 @@ lex_quasiquote start s = do
 
     -- NB: The string "|]" terminates the quasiquote,
     -- with absolutely no escaping. See the extensive
-    -- discussion on Trac #5348 for why there is no
+    -- discussion on #5348 for why there is no
     -- escape handling.
     Just ('|',i)
         | Just (']',i) <- alexGetChar' i
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index 739090f3f66da07841a9c12fc0bfe7bb63788e35..ed326eb730de3ed525571704369a40be3acc9708 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -3269,7 +3269,7 @@ fbind   :: { LHsRecField GhcPs (LHsExpr GhcPs) }
         : qvar '=' texp {% runExpCmdP $3 >>= \ $3 ->
                            ams  (sLL $1 $> $ HsRecField (sL1 $1 $ mkFieldOcc $1) $3 False)
                                 [mj AnnEqual $2] }
-                        -- RHS is a 'texp', allowing view patterns (Trac #6038)
+                        -- RHS is a 'texp', allowing view patterns (#6038)
                         -- and, incidentally, sections.  Eg
                         -- f (R { x = show -> s }) = ...
 
@@ -3960,7 +3960,7 @@ warnSpaceAfterBang span = do
 
 -- When two single quotes don't followed by tyvar or gtycon, we report the
 -- error as empty character literal, or TH quote that missing proper type
--- variable or constructor. See Trac #13450.
+-- variable or constructor. See #13450.
 reportEmptyDoubleQuotes :: SrcSpan -> P a
 reportEmptyDoubleQuotes span = do
     thQuotes <- getBit ThQuotesBit
diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs
index 480b7307dc1247b67555525e5e2392081b6c8a7a..2fd47ac9b2496d73b669049c56a956ed32edf347 100644
--- a/compiler/parser/RdrHsSyn.hs
+++ b/compiler/parser/RdrHsSyn.hs
@@ -1304,7 +1304,7 @@ checkValSigLhs lhs@(dL->L l _)
          = "Should be of form <variable> :: <type>"
 
     -- A common error is to forget the ForeignFunctionInterface flag
-    -- so check for that, and suggest.  cf Trac #3805
+    -- so check for that, and suggest.  cf #3805
     -- Sadly 'foreign import' still barfs 'parse error' because
     --  'import' is a keyword
     looks_like s (dL->L _ (HsVar _ (dL->L _ v))) = v == s
@@ -2132,7 +2132,7 @@ There are several issues with this:
     HsCmd or HsPat with extra constructors instead?
 
   * We cannot handle corner cases. For instance, the following function
-    declaration LHS is not a valid expression (see Trac #1087):
+    declaration LHS is not a valid expression (see #1087):
 
       !a + !b = ...
 
diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs
index 3a0b1f7b9f34a047ad38cc97f3231200abc96437..d9a1f8a02304e334b9fdb2697412a85fa63eacb5 100644
--- a/compiler/prelude/PrelRules.hs
+++ b/compiler/prelude/PrelRules.hs
@@ -344,7 +344,7 @@ to
   case x of
     3.8#::Float# -> this
     _            -> that
-See Trac #9238.  Reason: comparing floating-point values for equality
+See #9238.  Reason: comparing floating-point values for equality
 delicate, and we don't want to implement that delicacy in the code for
 case expressions.  So we make it an invariant of Core that a case
 expression never scrutinises a Float# or Double#.
@@ -1070,7 +1070,7 @@ is:
      case e of <transformed alts>
   by PrelRules.caseRules; see Note [caseRules for dataToTag]
 
-See Trac #15696 for a long saga.
+See #15696 for a long saga.
 
 
 ************************************************************************
@@ -1103,7 +1103,7 @@ Things to note
   why not instead say this?
       case x of { DEFAULT -> blah)
 
-  Reason (see Trac #5129): if we saw
+  Reason (see #5129): if we saw
     catch# (\s -> case x of { DEFAULT -> raiseIO# exn s }) handler
 
   then we'd drop the 'case x' because the body of the case is bottom
@@ -1511,7 +1511,7 @@ match_WordToNatural _ _ _ _ = Nothing
 For most types the bitInteger operation can be implemented in terms of shifts.
 The integer-gmp package, however, can do substantially better than this if
 allowed to provide its own implementation. However, in so doing it previously lost
-constant-folding (see Trac #8832). The bitInteger rule above provides constant folding
+constant-folding (see #8832). The bitInteger rule above provides constant folding
 specifically for this function.
 
 There is, however, a bit of trickiness here when it comes to ranges. While the
@@ -1531,7 +1531,7 @@ match_bitInteger dflags id_unf fn [arg]
     -- Make sure x is small enough to yield a decently small iteger
     -- Attempting to construct the Integer for
     --    (bitInteger 9223372036854775807#)
-    -- would be a bad idea (Trac #14959)
+    -- would be a bad idea (#14959)
   , let x_int = fromIntegral x :: Int
   = case splitFunTy_maybe (idType fn) of
     Just (_, integerTy)
@@ -1617,7 +1617,7 @@ match_Integer_shift_op binop _ id_unf _ [xl,yl]
   , y >= 0
   , y <= 4   -- Restrict constant-folding of shifts on Integers, somewhat
              -- arbitrary.  We can get huge shifts in inaccessible code
-             -- (Trac #15673)
+             -- (#15673)
   = Just (Lit (mkLitInteger (x `binop` fromIntegral y) i))
 match_Integer_shift_op _ _ _ _ _ = Nothing
 
@@ -2114,7 +2114,7 @@ we generate
     True  -> e2
 and it is nice to then get rid of the tagToEnum.
 
-Beware (Trac #14768): avoid the temptation to map constructor 0 to
+Beware (#14768): avoid the temptation to map constructor 0 to
 DEFAULT, in the hope of getting this
   case (x ># y) of
     DEFAULT -> e1
@@ -2168,5 +2168,5 @@ out-of-range alterantive is dead code -- we know the range of tags for x.
 Hence caseRules returns (AltCon -> Maybe AltCon), with Nothing indicating
 an alternative that is unreachable.
 
-You may wonder how this can happen: check out Trac #15436.
+You may wonder how this can happen: check out #15436.
 -}
diff --git a/compiler/prelude/PrimOp.hs b/compiler/prelude/PrimOp.hs
index fd1bab3386bed1e3f032c354b220f22eb95fda96..edadf15d4c600ddc788feef41edced9b00d89c1d 100644
--- a/compiler/prelude/PrimOp.hs
+++ b/compiler/prelude/PrimOp.hs
@@ -323,7 +323,7 @@ data dependencies of the state token to enforce write-effect ordering
 
  * NB1: if you inline unsafePerformIO, you may end up with
    side-effecting ops whose 'state' output is discarded.
-   And programmers may do that by hand; see Trac #9390.
+   And programmers may do that by hand; see #9390.
    That is why we (conservatively) do not discard write-effecting
    primops even if both their state and result is discarded.
 
@@ -367,13 +367,13 @@ Duplicate      YES           NO
   Arguably you should be able to discard this, since the
   returned stat token is not used, but that relies on NEVER
   inlining unsafePerformIO, and programmers sometimes write
-  this kind of stuff by hand (Trac #9390).  So we (conservatively)
+  this kind of stuff by hand (#9390).  So we (conservatively)
   never discard a has_side_effects primop.
 
   However, it's fine to discard a can_fail primop.  For example
      case (indexIntArray# a i) of _ -> True
   We can discard indexIntArray#; it has can_fail, but not
-  has_side_effects; see Trac #5658 which was all about this.
+  has_side_effects; see #5658 which was all about this.
   Notice that indexIntArray# is (in a more general handling of
   effects) read effect, but we don't care about that here, and
   treat read effects as *not* has_side_effects.
@@ -424,7 +424,7 @@ Duplicate      YES           NO
   (All these bindings are boxed.)  If we inline p at its two call
   sites, we get a catastrophe: because the read is performed once when
   s' is demanded, and once when 'r' is demanded, which may be much
-  later.  Utterly wrong.  Trac #3207 is real example of this happening.
+  later.  Utterly wrong.  #3207 is real example of this happening.
 
   However, it's fine to duplicate a can_fail primop.  That is really
   the only difference between can_fail and has_side_effects.
diff --git a/compiler/prelude/TysPrim.hs b/compiler/prelude/TysPrim.hs
index d3fd0b949cf51dc99c1a228b33e0218a06db93e2..3e0d87fd350d4e53e0790971153ba3b7c08adddc 100644
--- a/compiler/prelude/TysPrim.hs
+++ b/compiler/prelude/TysPrim.hs
@@ -132,8 +132,8 @@ primTyCons = unexposedPrimTyCons ++ exposedPrimTyCons
 
 -- | Primitive 'TyCon's that are defined in "GHC.Prim" but not exposed.
 -- It's important to keep these separate as we don't want users to be able to
--- write them (see Trac #15209) or see them in GHCi's @:browse@ output
--- (see Trac #12023).
+-- write them (see #15209) or see them in GHCi's @:browse@ output
+-- (see #12023).
 unexposedPrimTyCons :: [TyCon]
 unexposedPrimTyCons
   = [ eqPrimTyCon
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index 2740ef74558d876305ba9ee7e631a4732560be9b..94de07f8e518950b5e994d89ad64668103dc11a6 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -2584,7 +2584,7 @@ primop  AtomicallyOp "atomically#" GenPrimOp
 --     (# s2, a #) -> e
 -- with:
 --   retry# s1
--- where 'e' would be unreachable anyway.  See Trac #8091.
+-- where 'e' would be unreachable anyway.  See #8091.
 primop  RetryOp "retry#" GenPrimOp
    State# RealWorld -> (# State# RealWorld, a #)
    with
@@ -3079,7 +3079,7 @@ primop  ReallyUnsafePtrEqualityOp "reallyUnsafePtrEquality#" GenPrimOp
 -- conservative, but it prevented reallyUnsafePtrEquality# from floating out of
 -- places where its arguments were known to be forced. Unfortunately, GHC could
 -- sometimes lose track of whether those arguments were forced, leading to let/app
--- invariant failures (see Trac 13027 and the discussion in Trac 11444). Now that
+-- invariant failures (see #13027 and the discussion in #11444). Now that
 -- ok_for_speculation skips over lifted arguments, we need to explicitly prevent
 -- reallyUnsafePtrEquality# from floating out. Imagine if we had
 --
diff --git a/compiler/rename/RnBinds.hs b/compiler/rename/RnBinds.hs
index 3650fecf0978291d960e95f8a38c93711d900b4a..22f2cf3e9f08980f2f5ed294adc57dfa63aa1698 100644
--- a/compiler/rename/RnBinds.hs
+++ b/compiler/rename/RnBinds.hs
@@ -307,7 +307,7 @@ rnValBindsRHS ctxt (ValBinds _ mbinds sigs)
                 -- Note [Pattern synonym builders don't yield dependencies]
                 -- But psb_fvs /does/ include those builder fvs.  So we
                 -- add them back in here to avoid bogus warnings about
-                -- unused variables (Trac #12548)
+                -- unused variables (#12548)
 
              valbind'_dus = anal_dus `plusDU` usesOnly sig_fvs
                                      `plusDU` usesOnly patsyn_fvs
@@ -536,7 +536,7 @@ because they don't do anything!  But we have three exceptions:
 * A strict pattern binding; that is, one with an outermost bang
      !Just _ = e
   This can fail, so unlike the lazy variant, it is not a no-op.
-  Moreover, Trac #13646 argues that even for single constructor
+  Moreover, #13646 argues that even for single constructor
   types, you might want to write the constructor.  See also #9127.
 
 * A splice pattern
@@ -805,7 +805,7 @@ So:
    (which is then used for dependency analysis)
  * But we /do/ include them in the psb_fvs for the PatSynBind
  * In rnValBinds we record these builder uses, to avoid bogus
-   unused-variable warnings (Trac #12548)
+   unused-variable warnings (#12548)
 -}
 
 {- *********************************************************************
diff --git a/compiler/rename/RnEnv.hs b/compiler/rename/RnEnv.hs
index 87f8be7d4f8acbb0123368346d304c06a778e70f..638f7dfa8488f14069978a6593df4b75df868d55 100644
--- a/compiler/rename/RnEnv.hs
+++ b/compiler/rename/RnEnv.hs
@@ -220,7 +220,7 @@ Looking up a name in the RnEnv.
 
 Note [Type and class operator definitions]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-We want to reject all of these unless we have -XTypeOperators (Trac #3265)
+We want to reject all of these unless we have -XTypeOperators (#3265)
    data a :*: b  = ...
    class a :*: b where ...
    data (:*:) a b  = ....
@@ -518,7 +518,7 @@ Note [Fall back on lookupGlobalOccRn in lookupRecFieldOcc]
 Whenever we fail to find the field or it is not in scope, mb_field
 will be False, and we fall back on looking it up normally using
 lookupGlobalOccRn.  We don't report an error immediately because the
-actual problem might be located elsewhere.  For example (Trac #9975):
+actual problem might be located elsewhere.  For example (#9975):
 
    data Test = Test { x :: Int }
    pattern Test wat = Test { x = wat }
@@ -531,7 +531,7 @@ the environment first, we will try and fail to find `x` amongst the
 (nonexistent) fields of the pattern synonym.
 
 Alternatively, the scope check can fail due to Template Haskell.
-Consider (Trac #12130):
+Consider (#12130):
 
    module Foo where
      import M
@@ -844,7 +844,7 @@ This is guaranteed by extendGlobalRdrEnvRn (the dups check in add_gre).
 
 So how can we get multiple gres in lookupExactOcc_maybe?  Because in
 TH we might use the same TH NameU in two different name spaces.
-eg (Trac #7241):
+eg (#7241):
    $(newName "Foo" >>= \o -> return [DataD [] o [] [RecC o []] [''Show]])
 Here we generate a type constructor and data constructor with the same
 unique, but different name spaces.
@@ -972,7 +972,7 @@ badVarInType rdr_name
 
 {- Note [Promoted variables in types]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this (Trac #12686):
+Consider this (#12686):
    x = True
    data Bad = Bad 'x
 
@@ -1054,7 +1054,7 @@ lookupInfoOccRn :: RdrName -> RnM [Name]
 -- lookupInfoOccRn is intended for use in GHCi's ":info" command
 -- It finds all the GREs that RdrName could mean, not complaining
 -- about ambiguity, but rather returning them all
--- C.f. Trac #9881
+-- C.f. #9881
 lookupInfoOccRn rdr_name =
   lookupExactOrOrig rdr_name (:[]) $
     do { rdr_env <- getGlobalRdrEnv
@@ -1188,7 +1188,7 @@ lookupGreAvailRn rdr_name
 Note [Handling of deprecations]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * We report deprecations at each *occurrence* of the deprecated thing
-  (see Trac #5867)
+  (see #5867)
 
 * We do not report deprecations for locally-defined names. For a
   start, we may be exporting a deprecated thing. Also we may use a
@@ -1203,7 +1203,7 @@ Note [Handling of deprecations]
 -}
 
 addUsedDataCons :: GlobalRdrEnv -> TyCon -> RnM ()
--- Remember use of in-scope data constructors (Trac #7969)
+-- Remember use of in-scope data constructors (#7969)
 addUsedDataCons rdr_env tycon
   = addUsedGREs [ gre
                 | dc <- tyConDataCons tycon
@@ -1660,6 +1660,6 @@ badOrigBinding name
     --
     --   $(pure [ValD (VarP 'succ) (NormalB (ConE 'True)) []])
     --
-    -- (See Trac #13968.)
+    -- (See #13968.)
   where
     occ = rdrNameOcc $ filterCTuple name
diff --git a/compiler/rename/RnExpr.hs b/compiler/rename/RnExpr.hs
index bed53ece35a54f1e206b57ab930386111e0a65be..b74b557f4918277bcd27e236047b926747bdf004 100644
--- a/compiler/rename/RnExpr.hs
+++ b/compiler/rename/RnExpr.hs
@@ -826,7 +826,7 @@ rnStmt ctxt rnBody (L loc (LastStmt _ body noret _)) thing_inside
                             -- The 'return' in a LastStmt is used only
                             -- for MonadComp; and we don't want to report
                             -- "non in scope: return" in other cases
-                            -- Trac #15607
+                            -- #15607
 
         ; (thing,  fvs3) <- thing_inside []
         ; return (([(L loc (LastStmt noExt body' noret ret_op), fv_expr)]
@@ -1305,7 +1305,7 @@ Note [Segmenting mdo]
 ~~~~~~~~~~~~~~~~~~~~~
 NB. June 7 2012: We only glom segments that appear in an explicit mdo;
 and leave those found in "do rec"'s intact.  See
-http://ghc.haskell.org/trac/ghc/ticket/4148 for the discussion
+https://gitlab.haskell.org/ghc/ghc/issues/4148 for the discussion
 leading to this design choice.  Hence the test in segmentRecStmts.
 
 Note [Glomming segments]
diff --git a/compiler/rename/RnFixity.hs b/compiler/rename/RnFixity.hs
index 19d8bb4c5a341b43c84c8ef4d607f1fb7cb92258..1fa81c8fc2d7fb08669686b1b180847ee0631c8b 100644
--- a/compiler/rename/RnFixity.hs
+++ b/compiler/rename/RnFixity.hs
@@ -124,7 +124,7 @@ lookupFixityRn_help' name occ
   = return (False, Fixity NoSourceText minPrecedence InfixL)
     -- Minimise errors from ubound names; eg
     --    a>0 `foo` b>0
-    -- where 'foo' is not in scope, should not give an error (Trac #7937)
+    -- where 'foo' is not in scope, should not give an error (#7937)
 
   | otherwise
   = do { local_fix_env <- getFixityEnv
@@ -178,7 +178,7 @@ lookupTyFixityRn = lookupFixityRn . unLoc
 -- | Look up the fixity of a (possibly ambiguous) occurrence of a record field
 -- selector.  We use 'lookupFixityRn'' so that we can specifiy the 'OccName' as
 -- the field label, which might be different to the 'OccName' of the selector
--- 'Name' if @DuplicateRecordFields@ is in use (Trac #1173). If there are
+-- 'Name' if @DuplicateRecordFields@ is in use (#1173). If there are
 -- multiple possible selectors with different fixities, generate an error.
 lookupFieldFixityRn :: AmbiguousFieldOcc GhcRn -> RnM Fixity
 lookupFieldFixityRn (Unambiguous n lrdr)
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs
index 08f100750e6443bd58d448333ef59bcc52744f0b..ba0b5f3e26c8df68077732c18d6c1bbf07a74f3e 100644
--- a/compiler/rename/RnNames.hs
+++ b/compiler/rename/RnNames.hs
@@ -239,7 +239,7 @@ convert it back to a list. One nice side effect of this approach is that
 if there's a lot of overlap in the imp_finsts of imports, the
 Set doesn't really need to grow and we don't need to allocate.
 
-Running generateModules from Trac #14693 with DEPTH=16, WIDTH=30 finishes in
+Running generateModules from #14693 with DEPTH=16, WIDTH=30 finishes in
 23s before, and 11s after.
 -}
 
@@ -280,7 +280,7 @@ rnImportDecl this_mod
     let imp_mod_name = unLoc loc_imp_mod_name
         doc = ppr imp_mod_name <+> text "is directly imported"
 
-    -- Check for self-import, which confuses the typechecker (Trac #9032)
+    -- Check for self-import, which confuses the typechecker (#9032)
     -- ghc --make rejects self-import cycles already, but batch-mode may not
     -- at least not until TcIface.tcHiBootIface, which is too late to avoid
     -- typechecker crashes.  (Indirect self imports are not caught until
@@ -296,7 +296,7 @@ rnImportDecl this_mod
           (case mb_pkg of  -- If we have import "<pkg>" M, then we should
                            -- check that "<pkg>" is "this" (which is magic)
                            -- or the name of this_mod's package.  Yurgh!
-                           -- c.f. GHC.findModule, and Trac #9997
+                           -- c.f. GHC.findModule, and #9997
              Nothing         -> True
              Just (StringLiteral _ pkg_fs) -> pkg_fs == fsLit "this" ||
                             fsToUnitId pkg_fs == moduleUnitId this_mod))
@@ -738,9 +738,9 @@ getLocalNonValBinders fixity_env
            -- such as in the following examples:
            --
            -- (1) The class is headed by a bang pattern, such as in
-           --     `instance !Show Int` (Trac #3811c)
+           --     `instance !Show Int` (#3811c)
            -- (2) The class is headed by a type variable, such as in
-           --     `instance c` (Trac #16385)
+           --     `instance c` (#16385)
            --
            -- If looking up the class name fails, then mb_cls_nm will
            -- be Nothing.
@@ -905,7 +905,7 @@ filterImports iface decl_spec (Just (want_hiding, L l import_items))
         -- 'combine' is only called for associated data types which appear
         -- twice in the all_avails. In the example, we combine
         --    T(T,T1,T2,T3) and C(C,T)  to give   (T, T(T,T1,T2,T3), Just C)
-        -- NB: the AvailTC can have fields as well as data constructors (Trac #12127)
+        -- NB: the AvailTC can have fields as well as data constructors (#12127)
         combine (name1, a1@(AvailTC p1 _ _), mp1)
                 (name2, a2@(AvailTC p2 _ _), mp2)
           = ASSERT2( name1 == name2 && isNothing mp1 && isNothing mp2
@@ -1030,7 +1030,7 @@ filterImports iface decl_spec (Just (want_hiding, L l import_items))
                                 -- We are trying to import T( a,b,c,d ), and failed
                                 -- to find 'b' and 'd'.  So we make up an import item
                                 -- to report as failing, namely T( b, d ).
-                                -- c.f. Trac #15412
+                                -- c.f. #15412
 
              Succeeded (childnames, childflds) ->
                case mb_parent of
@@ -1358,7 +1358,7 @@ findImportUsage imports used_gres
         used_names   = mkNameSet (map      gre_name        used_gres)
         used_parents = mkNameSet (mapMaybe greParent_maybe used_gres)
 
-        unused_imps   -- Not trivial; see eg Trac #7454
+        unused_imps   -- Not trivial; see eg #7454
           = case imps of
               Just (False, L _ imp_ies) ->
                                  foldr (add_unused . unLoc) emptyNameSet imp_ies
@@ -1403,7 +1403,7 @@ declaration is actually used in the module.
 
 The SrcLoc is the location of the END of a particular 'import'
 declaration.  Why *END*?  Because we don't want to get confused
-by the implicit Prelude import. Consider (Trac #7476) the module
+by the implicit Prelude import. Consider (#7476) the module
     import Foo( foo )
     main = print foo
 There is an implicit 'import Prelude(print)', and it gets a SrcSpan
@@ -1493,7 +1493,7 @@ Note [Do not warn about Prelude hiding]
 We do not warn about
    import Prelude hiding( x, y )
 because even if nothing else from Prelude is used, it may be essential to hide
-x,y to avoid name-shadowing warnings.  Example (Trac #9061)
+x,y to avoid name-shadowing warnings.  Example (#9061)
    import Prelude hiding( log )
    f x = log where log = ()
 
diff --git a/compiler/rename/RnPat.hs b/compiler/rename/RnPat.hs
index 3d5f3b92b740bb2e3a893b7b73ca291524800ebd..ca8c665e28fd7676192395576261ae20638ee618 100644
--- a/compiler/rename/RnPat.hs
+++ b/compiler/rename/RnPat.hs
@@ -160,7 +160,7 @@ Consider
 
 Arguably we should report T2 as unused, even though it appears in a
 pattern, because it never occurs in a constructed position.  See
-Trac #7336.
+#7336.
 However, implementing this in the face of pattern synonyms would be
 less straightforward, since given two pattern synonyms
 
@@ -258,7 +258,7 @@ Consider
 Here the pattern binds 'r', and then uses it *only* in the view pattern.
 We want to "see" this use, and in let-bindings we collect all uses and
 report unused variables at the binding level. So we must use bindLocalNames
-here, *not* bindLocalNameFV.  Trac #3943.
+here, *not* bindLocalNameFV.  #3943.
 
 
 Note [Don't report shadowing for pattern synonyms]
@@ -853,7 +853,7 @@ inside IntegralLit and FractionalLit. These types cannot represent negative
 zero value. So we had to add explicit field 'neg' which would hold information
 about literal sign. Here in rnOverLit we use it to detect negative zeroes and
 in this case return not only literal itself but also negateName so that users
-can apply it explicitly. In this case it stays negative zero.  Trac #13211
+can apply it explicitly. In this case it stays negative zero.  #13211
 -}
 
 rnOverLit :: HsOverLit t ->
diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs
index 19f0d315d2061fa9293e73bb515e07df204f6b98..5181b7f2ed5380c9f3d514b4bba29c5cb61b6e36 100644
--- a/compiler/rename/RnSource.hs
+++ b/compiler/rename/RnSource.hs
@@ -127,7 +127,7 @@ rnSrcDecls group@(HsGroup { hs_valds   = val_decls,
 
    -- (D1) Bring pattern synonyms into scope.
    --      Need to do this before (D2) because rnTopBindsLHS
-   --      looks up those pattern synonyms (Trac #9889)
+   --      looks up those pattern synonyms (#9889)
 
    extendPatSynEnv val_decls local_fix_env $ \pat_syn_bndrs -> do {
 
@@ -660,7 +660,7 @@ rnClsInstDecl (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = mbinds
                -- we report an error and continue for as long as we can.
                -- Importantly, this error should be thrown before we reach the
                -- typechecker, lest we encounter different errors that are
-               -- hopelessly confusing (such as the one in Trac #16114).
+               -- hopelessly confusing (such as the one in #16114).
                addErrAt (getLoc (hsSigType inst_ty)) $
                  hang (text "Illegal class instance:" <+> quotes (ppr inst_ty))
                     2 (vcat [ text "Class instances must be of the form"
@@ -955,7 +955,7 @@ bound on the LHS.  For example, this is not ok
       type F a x :: *
    instance C (p,q) r where
       type F (p,q) x = (x, r)   -- BAD: mentions 'r'
-c.f. Trac #5515
+c.f. #5515
 
 Kind variables, on the other hand, are allowed to be implicitly or explicitly
 bound. As examples, this (#9574) is acceptable:
@@ -980,7 +980,7 @@ So for parity with type synonyms, we also allow:
 
 All this applies only for *instance* declarations.  In *class*
 declarations there is no RHS to worry about, and the class variables
-can all be in scope (Trac #5862):
+can all be in scope (#5862):
     class Category (x :: k -> k -> *) where
       type Ob x :: k -> Constraint
       id :: Ob x a => x a a
@@ -997,7 +997,7 @@ by a forall. For instance, the following is acceptable:
      type forall b. T (Maybe a) b = Either a b
 
 Even though `a` is not bound by the forall, this is still accepted because `a`
-was previously bound by the `instance C (Maybe a)` part. (see Trac #16116).
+was previously bound by the `instance C (Maybe a)` part. (see #16116).
 
 In each case, the function which detects improperly bound variables on the RHS
 is TcValidity.checkValidFamPats.
@@ -1225,7 +1225,7 @@ reasons:
   This has a kind error, but the error message is better if you
   check T first, (fixing its kind) and *then* S.  If you do kind
   inference together, you might get an error reported in S, which
-  is jolly confusing.  See Trac #4875
+  is jolly confusing.  See #4875
 
 
 * Increase kind polymorphism.  See TcTyClsDecls
@@ -1233,7 +1233,7 @@ reasons:
 
 Why do the instance declarations participate?  At least two reasons
 
-* Consider (Trac #11348)
+* Consider (#11348)
 
      type family F a
      type instance F Int = Bool
@@ -1246,7 +1246,7 @@ Why do the instance declarations participate?  At least two reasons
   know that unless we've looked at the type instance declaration for F
   before kind-checking Foo.
 
-* Another example is this (Trac #3990).
+* Another example is this (#3990).
 
      data family Complex a
      data instance Complex Double = CD {-# UNPACK #-} !Double
@@ -2064,7 +2064,7 @@ rnInjectivityAnn _ _ (dL->L srcSpan (InjectivityAnn injFrom injTo)) =
 {-
 Note [Stupid theta]
 ~~~~~~~~~~~~~~~~~~~
-Trac #3850 complains about a regression wrt 6.10 for
+#3850 complains about a regression wrt 6.10 for
      data Show a => T a
 There is no reason not to allow the stupid theta if there are no data
 constructors.  It's still stupid, but does no harm, and I don't want
@@ -2142,7 +2142,7 @@ rnConDecl decl@(ConDeclGADT { con_names   = names
           -- order of their appearance in the constructor type.
           -- That order governs the order the implicitly-quantified type
           -- variable, and hence the order needed for visible type application
-          -- See Trac #14808.
+          -- See #14808.
               free_tkvs = extractHsTvBndrs explicit_tkvs $
                           extractHsTysRdrTyVarsDups (theta ++ arg_tys ++ [res_ty])
 
@@ -2325,7 +2325,7 @@ add gp loc (SpliceD _ splice@(SpliceDecl _ _ flag)) ds
                      -- The compiler should suggest the above, and not using
                      -- TemplateHaskell since the former suggestion is more
                      -- relevant to the larger base of users.
-                     -- See Trac #12146 for discussion.
+                     -- See #12146 for discussion.
 
 -- Class declarations: pull out the fixity signatures to the top
 add gp@(HsGroup {hs_tyclds = ts, hs_fixds = fs}) l (TyClD _ d) ds
diff --git a/compiler/rename/RnSplice.hs b/compiler/rename/RnSplice.hs
index a0c926d4e7207a9af571173182b91fa060dfbfcf..1d5c68fd5bb258178bd038c7f5f0c24e5eb64105 100644
--- a/compiler/rename/RnSplice.hs
+++ b/compiler/rename/RnSplice.hs
@@ -447,16 +447,16 @@ rnSpliceExpr splice
 {- Note [Running splices in the Renamer]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Splices used to be run in the typechecker, which led to (Trac #4364). Since the
+Splices used to be run in the typechecker, which led to (#4364). Since the
 renamer must decide which expressions depend on which others, and it cannot
 reliably do this for arbitrary splices, we used to conservatively say that
 splices depend on all other expressions in scope. Unfortunately, this led to
-the problem of cyclic type declarations seen in (Trac #4364). Instead, by
+the problem of cyclic type declarations seen in (#4364). Instead, by
 running splices in the renamer, we side-step the problem of determining
 dependencies: by the time the dependency analysis happens, any splices have
 already been run, and expression dependencies can be determined as usual.
 
-However, see (Trac #9813), for an example where we would like to run splices
+However, see (#9813), for an example where we would like to run splices
 *after* performing dependency analysis (that is, after renaming). It would be
 desirable to typecheck "non-splicy" expressions (those expressions that do not
 contain splices directly or via dependence on an expression that does) before
@@ -477,7 +477,7 @@ we wish to first determine dependencies and typecheck certain expressions,
 making them available to reify, but cannot accurately determine dependencies
 without running splices in the renamer!
 
-Indeed, the conclusion of (Trac #9813) was that it is not worth the complexity
+Indeed, the conclusion of (#9813) was that it is not worth the complexity
 to try and
  a) implement and maintain the code for renaming/typechecking non-splicy
     expressions before splicy expressions,
@@ -490,7 +490,7 @@ to try and
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 When splices run in the renamer, 'reify' does not have access to the local
-type environment (Trac #11832, [1]).
+type environment (#11832, [1]).
 
 For instance, in
 
@@ -856,7 +856,7 @@ ensures that 'f' stays as a top level binding.
 
 This must be done by the renamer, not the type checker (as of old),
 because the type checker doesn't typecheck the body of untyped
-brackets (Trac #8540).
+brackets (#8540).
 
 A thing can have a bind_lvl of outerLevel, but have an internal name:
    foo = [d| op = 3
diff --git a/compiler/rename/RnTypes.hs b/compiler/rename/RnTypes.hs
index 53bcadee2a460fabd4d66be24737180f24a13446..755ed206f0f5ceb34f6d68a6537977396f8ac704 100644
--- a/compiler/rename/RnTypes.hs
+++ b/compiler/rename/RnTypes.hs
@@ -352,7 +352,7 @@ Variables in type signatures are implicitly quantified
 when (1) they are in a type signature not beginning
 with "forall" or (2) in any qualified type T => R.
 We are phasing out (2) since it leads to inconsistencies
-(Trac #4426):
+(#4426):
 
 data A = A (a -> a)           is an error
 data A = A (Eq a => a -> a)   binds "a"
@@ -1335,7 +1335,7 @@ checkSectionPrec direction section op arg
 
 -- | Look up the fixity for an operator name.  Be careful to use
 -- 'lookupFieldFixityRn' for (possibly ambiguous) record fields
--- (see Trac #13132).
+-- (see #13132).
 lookupFixityOp :: OpName -> RnM Fixity
 lookupFixityOp (NormalOp n)  = lookupFixityRn n
 lookupFixityOp NegateOp      = lookupFixityRn negateName
diff --git a/compiler/rename/RnUtils.hs b/compiler/rename/RnUtils.hs
index 9de4aacaba938745e712ad4f9c47181af67174f8..a4715a23f6f585cac67df6e70ff74d14e53b8d6c 100644
--- a/compiler/rename/RnUtils.hs
+++ b/compiler/rename/RnUtils.hs
@@ -149,7 +149,7 @@ checkShadowedOccs (global_env,local_env) get_loc_occ ns
   where
     check_shadow n
         | startsWithUnderscore occ = return ()  -- Do not report shadowing for "_x"
-                                                -- See Trac #3262
+                                                -- See #3262
         | Just n <- mb_local = complain [text "bound at" <+> ppr (nameSrcLoc n)]
         | otherwise = do { gres' <- filterM is_shadowed_gre gres
                          ; complain (map pprNameProvenance gres') }
@@ -167,7 +167,7 @@ checkShadowedOccs (global_env,local_env) get_loc_occ ns
 
     is_shadowed_gre :: GlobalRdrElt -> RnM Bool
         -- Returns False for record selectors that are shadowed, when
-        -- punning or wild-cards are on (cf Trac #2723)
+        -- punning or wild-cards are on (cf #2723)
     is_shadowed_gre gre | isRecFldGRE gre
         = do { dflags <- getDynFlags
              ; return $ not (xopt LangExt.RecordPuns dflags
@@ -385,7 +385,7 @@ addNameClashErrRn rdr_name gres
     --   It could refer to either ‘T15487a.null’,
     --                            imported from ‘Prelude’ at T15487.hs:1:8-13
     --                     or ...
-    -- See Trac #15487
+    -- See #15487
     pp_gre_name gre@(GRE { gre_name = name, gre_par = parent
                          , gre_lcl = lcl, gre_imp = iss })
       | FldParent { par_lbl = Just lbl } <- parent
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index 96fbd0745450c17748eeacaa944b138fbdb75048..0758ce930a70e5a46d1e931ce44b5ca94c497b2b 100644
--- a/compiler/simplCore/CSE.hs
+++ b/compiler/simplCore/CSE.hs
@@ -84,7 +84,7 @@ Let-bindings have two cases, implemented by addBinding.
 
     - First, the original RHS might have been (g z) which has CSE'd
       with an enclosing (let y = g z in ...).  This is super-important.
-      See Trac #5996:
+      See #5996:
          x1 = C a b
          x2 = C x1 b
          y1 = C a b
@@ -104,7 +104,7 @@ Let-bindings have two cases, implemented by addBinding.
 
   Note that we use EXTEND even for a trivial expression, provided it
   is not a variable or literal. In particular this /includes/ type
-  applications. This can be important (Trac #13156); e.g.
+  applications. This can be important (#13156); e.g.
      case f @ Int of { r1 ->
      case f @ Int of { r2 -> ...
   Here we want to common-up the two uses of (f @ Int) so we can
@@ -419,7 +419,7 @@ addBinding env in_id out_id rhs'
        -- Putting the Id into the cs_map makes it possible that
        -- it'll become shared more than it is now, which would
        -- invalidate (the usage part of) its demand info.
-       --    This caused Trac #100218.
+       --    This caused #100218.
        -- Easiest thing is to zap the usage info; subsequently
        -- performing late demand-analysis will restore it.  Don't zap
        -- the strictness info; it's not necessary to do so, and losing
@@ -475,11 +475,11 @@ The net effect is that for the y-binding we want to
   - Use SUBSTITUTE, by extending the substitution with  y :-> x
   - but leave the original binding for y undisturbed
 
-This is done by cse_bind.  I got it wrong the first time (Trac #13367).
+This is done by cse_bind.  I got it wrong the first time (#13367).
 
 Note [Delay inlining after CSE]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Suppose (Trac #15445) we have
+Suppose (#15445) we have
    f,g :: Num a => a -> a
    f x = ...f (x-1).....
    g y = ...g (y-1) ....
diff --git a/compiler/simplCore/CallArity.hs b/compiler/simplCore/CallArity.hs
index ba1aa243ace4e45c39d130eb42f4ba06ac2e2b31..bd5b3a3055831b365703f0ab105fd8ffa58f530f 100644
--- a/compiler/simplCore/CallArity.hs
+++ b/compiler/simplCore/CallArity.hs
@@ -418,7 +418,7 @@ like normal functions. This is ok.
 The analysis *could* make use of the fact that join points are always evaluated
 in the same context as the join-binding they are defined in and are always
 one-shot, and handle join points separately, as suggested in
-https://ghc.haskell.org/trac/ghc/ticket/13479#comment:10.
+https://gitlab.haskell.org/ghc/ghc/issues/13479#note_134870.
 This *might* be more efficient (for example, join points would not have to be
 considered interesting variables), but it would also add redundant code. So for
 now we do not do that.
diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs
index 0c5d8d9fd21ebe81bbef63ce98d29c9ed54e5661..4cdb231bd8397c1661c800b1873984d2781dd8da 100644
--- a/compiler/simplCore/CoreMonad.hs
+++ b/compiler/simplCore/CoreMonad.hs
@@ -558,7 +558,7 @@ data CoreReader = CoreReader {
 
 -- Note: CoreWriter used to be defined with data, rather than newtype.  If it
 -- is defined that way again, the cw_simpl_count field, at least, must be
--- strict to avoid a space leak (Trac #7702).
+-- strict to avoid a space leak (#7702).
 newtype CoreWriter = CoreWriter {
         cw_simpl_count :: SimplCount
 }
@@ -589,7 +589,7 @@ instance Monad CoreM where
             let w = w1 `plusWriter` w2
             return $ seq w (y, s'', w)
             -- forcing w before building the tuple avoids a space leak
-            -- (Trac #7702)
+            -- (#7702)
 
 instance Applicative CoreM where
     pure x = CoreM $ \s -> nop s x
diff --git a/compiler/simplCore/Exitify.hs b/compiler/simplCore/Exitify.hs
index 3e7d503d31179f36966861d8d678f0520f35a9a2..f5a4138566a8806dbcc54e6e9887b7eaf7f7517e 100644
--- a/compiler/simplCore/Exitify.hs
+++ b/compiler/simplCore/Exitify.hs
@@ -245,7 +245,7 @@ exitifyRec in_scope pairs
                                | otherwise           = (fvs',               acc)
 
         -- We are going to abstract over these variables, so we must
-        -- zap any IdInfo they have; see Trac #15005
+        -- zap any IdInfo they have; see #15005
         -- cf. SetLevels.abstractVars
         zap v | isId v = setIdInfo v vanillaIdInfo
               | otherwise = v
diff --git a/compiler/simplCore/FloatIn.hs b/compiler/simplCore/FloatIn.hs
index 07f05493eb102f68c9b19cae945dee4ad36f5519..216e8488892558f0a59b0b32b4de5f9eaaf44a62 100644
--- a/compiler/simplCore/FloatIn.hs
+++ b/compiler/simplCore/FloatIn.hs
@@ -210,7 +210,7 @@ only way that can happen is if the binding wrapped the literal
 /in the original input program/.  e.g.
    case x of { DEFAULT -> 1# }
 But, while this may be unusual it is not actually wrong, and it did
-once happen (Trac #15696).
+once happen (#15696).
 
 Note [Do not destroy the let/app invariant]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -307,7 +307,7 @@ be dropped right away.
 
 fiExpr dflags to_drop lam@(_, AnnLam _ _)
   | noFloatIntoLam bndrs       -- Dump it all here
-     -- NB: Must line up with noFloatIntoRhs (AnnLam...); see Trac #7088
+     -- NB: Must line up with noFloatIntoRhs (AnnLam...); see #7088
   = wrapFloats to_drop (mkLams bndrs (fiExpr dflags [] body))
 
   | otherwise           -- Float inside
@@ -391,7 +391,7 @@ fiExpr dflags to_drop (_,AnnLet bind body)
 {- Note [Floating primops]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 We try to float-in a case expression over an unlifted type.  The
-motivating example was Trac #5658: in particular, this change allows
+motivating example was #5658: in particular, this change allows
 array indexing operations, which have a single DEFAULT alternative
 without any binders, to be floated inward.
 
@@ -421,10 +421,10 @@ But there are wrinkles
   Solution: only float cases into the branches of other cases, and
   not into the arguments of an application, or the RHS of a let. This
   is somewhat conservative, but it's simple.  And it still hits the
-  cases like Trac #5658.   This is implemented in sepBindsByJoinPoint;
+  cases like #5658.   This is implemented in sepBindsByJoinPoint;
   if is_case is False we dump all floating cases right here.
 
-* Trac #14511 is another example of why we want to restrict float-in
+* #14511 is another example of why we want to restrict float-in
   of case-expressions.  Consider
      case indexArray# a n of (# r #) -> writeArray# ma i (f r)
   Now, floating that indexing operation into the (f r) thunk will
@@ -613,7 +613,7 @@ would destroy the let/app invariant.
      (a) any non-one-shot value lambdas
   or (b) all type lambdas
   In both cases we'll float straight back out again
-  NB: Must line up with fiExpr (AnnLam...); see Trac #7088
+  NB: Must line up with fiExpr (AnnLam...); see #7088
 
   (a) is important: we /must/ float into a one-shot lambda group
   (which includes join points). This makes a big difference
diff --git a/compiler/simplCore/FloatOut.hs b/compiler/simplCore/FloatOut.hs
index 0aa48543de7063faa2b90018e0cf964bbcb837dc..1f1dd5c4ba82259f635731035b649bc3e69e7d35 100644
--- a/compiler/simplCore/FloatOut.hs
+++ b/compiler/simplCore/FloatOut.hs
@@ -305,7 +305,7 @@ Nor is it a good idea to dump them in the rhs, but outside the lambda
     f = case x of I# y -> \xy. body
 because now f's arity might get worse, which is Not Good. (And if
 there's an SCC around the RHS it might not get better again.
-See Trac #5342.)
+See #5342.)
 
 So, gruesomely, we split the floats into
  * the outer FloatLets, which can join the Rec, and
diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs
index c3414b1fdb3185f36017b155ae62a0620fc94135..ecad4a585f7bb7e950d7ef9eeffbfca469859571 100644
--- a/compiler/simplCore/OccurAnal.hs
+++ b/compiler/simplCore/OccurAnal.hs
@@ -83,7 +83,7 @@ occurAnalysePgm this_mod active_unf active_rule imp_rules binds
                                                     initial_uds
           -- It's crucial to re-analyse the glommed-together bindings
           -- so that we establish the right loop breakers. Otherwise
-          -- we can easily create an infinite loop (Trac #9583 is an example)
+          -- we can easily create an infinite loop (#9583 is an example)
 
     initial_uds = addManyOccsSet emptyDetails
                             (rulesFreeVars imp_rules)
@@ -124,7 +124,7 @@ occurAnalyseExpr' enable_binder_swap expr
 
 {- Note [Plugin rules]
 ~~~~~~~~~~~~~~~~~~~~~~
-Conal Elliott (Trac #11651) built a GHC plugin that added some
+Conal Elliott (#11651) built a GHC plugin that added some
 BuiltinRules (for imported Ids) to the mg_rules field of ModGuts, to
 do some domain-specific transformations that could not be expressed
 with an ordinary pattern-matching CoreRule.  But then we can't extract
@@ -1020,7 +1020,7 @@ terminate in a constant number of iterations, rather than O(N)
 iterations.
 
 You might thing that it's very unlikely, but RULES make it much
-more likely.  Here's a real example from Trac #1969:
+more likely.  Here's a real example from #1969:
   Rec { $dm = \d.\x. op d
         {-# RULES forall d. $dm Int d  = $s$dm1
                   forall d. $dm Bool d = $s$dm2 #-}
@@ -1439,7 +1439,7 @@ Note [Loop breakers, node scoring, and stability]
 To choose a loop breaker, we give a NodeScore to each node in the SCC,
 and pick the one with the best score (according to 'betterLB').
 
-We need to be jolly careful (Trac #12425, #12234) about the stability
+We need to be jolly careful (#12425, #12234) about the stability
 of this choice. Suppose we have
 
     let rec { f = ...g...g...
@@ -1610,10 +1610,10 @@ Consider
    join j = Just x
 
 We want to inline x into j right away, so we don't want to give
-the join point a RhsCtxt (Trac #14137).  It's not a huge deal, because
+the join point a RhsCtxt (#14137).  It's not a huge deal, because
 the FloatIn pass knows to float into join point RHSs; and the simplifier
 does not float things out of join point RHSs.  But it's a simple, cheap
-thing to do.  See Trac #14137.
+thing to do.  See #14137.
 
 Note [Cascading inlines]
 ~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1932,7 +1932,7 @@ A': Non-obviously saturated applications: eg    build (f (\x y -> expensive))
     that sense, f is saturated, and we may proceed as described above.
 
     Hence the computation of 'guaranteed_val_args' in occAnalApp, using
-    '(occ_one_shots env)'.  See also Trac #13227, comment:9
+    '(occ_one_shots env)'.  See also #13227, comment:9
 
 B:  Let-bindings:  eg   let f = \c. let ... in \n -> blah
                         in (build f, build f)
@@ -2322,7 +2322,7 @@ we will get
 
 Core Lint never expects to find an *occurrence* of an Id marked
 as Dead, so we must zap the OccInfo on cb before making the
-binding x = cb.  See Trac #5028.
+binding x = cb.  See #5028.
 
 NB: the OccInfo on /occurrences/ really doesn't matter much; the simplifier
 doesn't use it. So this is only to satisfy the perhpas-over-picky Lint.
@@ -2409,7 +2409,7 @@ mkAltEnv env@(OccEnv { occ_gbl_scrut = pe }) scrut case_bndr
                        , Just (localise v, rhs) )
       -- ToDO: this isGlobalId stuff is a TEMPORARY FIX
       --       to avoid the binder-swap for GlobalIds
-      --       See Trac #16346
+      --       See #16346
 
     case_bndr' = Var (zapIdOccInfo case_bndr)
                    -- See Note [Zap case binders in proxy bindings]
@@ -2556,7 +2556,7 @@ It's obviously wrong to mark CoVars as dead if they are used.
 Currently we don't traverse types to gather usase info for CoVars,
 so we had better treat them as having noOccInfo.
 
-This showed up in Trac #15696 we had something like
+This showed up in #15696 we had something like
   case eq_sel d of co -> ...(typeError @(...co...) "urk")...
 
 Then 'd' was substitued by a dictionary, so the expression
@@ -2828,7 +2828,7 @@ unfolding captured by the INLINE pragma has arity 1.  If we try to
 convert g to be a join point, its unfolding will still have arity 1
 (since it is stable, and we don't meddle with stable unfoldings), and
 Lint will complain (see Note [Invariants on join points], (2a), in
-CoreSyn.  Trac #13413.
+CoreSyn.  #13413.
 
 Moreover, since g is going to be inlined anyway, there is no benefit
 from making it a join point.
diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs
index 2f993b7148ac29ccb7ddfdd1d6bd8ce6488d546a..fef15a47b2be448211b99ea7590231cebfd1ba76 100644
--- a/compiler/simplCore/SetLevels.hs
+++ b/compiler/simplCore/SetLevels.hs
@@ -548,7 +548,7 @@ must be careful to test the *result* scrutinee ('x' in this case), not
 the *input* one 'y'.  The latter *is* in HNF here (because y is
 evaluated), but the former is not -- and indeed we can't float the
 inner case out, at least not unless x is also evaluated at its binding
-site.  See Trac #5453.
+site.  See #5453.
 
 That's why we apply exprIsHNF to scrut' and not to scrut.
 
@@ -755,7 +755,7 @@ I think this is obselete; the flag seems always on.]
 Note [Floating join point bindings]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Mostly we only float a join point if it can /stay/ a join point.  But
-there is one exception: if it can go to the top level (Trac #13286).
+there is one exception: if it can go to the top level (#13286).
 Consider
   f x = joinrec j y n = <...j y' n'...>
         in jump j x 0
@@ -808,7 +808,7 @@ and replace the original (f x) with
    case (case y of I# r -> r) of r -> blah
 
 Being able to float unboxed expressions is sometimes important; see
-Trac #12603.  I'm not sure how /often/ it is important, but it's
+#12603.  I'm not sure how /often/ it is important, but it's
 not hard to achieve.
 
 We only do it for a fixed collection of types for which we have a
@@ -912,7 +912,7 @@ Id, *immediately*, for three reasons:
     errors, e.g. via a case with empty alternatives:  (case x of {})
     Lint complains unless the scrutinee of such a case is clearly bottom.
 
-    This was reported in Trac #11290.   But since the whole bottoming-float
+    This was reported in #11290.   But since the whole bottoming-float
     thing is based on the cheap-and-cheerful exprIsBottom, I'm not sure
     that it'll nail all such cases.
 
@@ -1267,7 +1267,7 @@ Conclusion: use lvlMFE if there are
   * any value lambdas in the original function, and
   * this is not a bottoming function (the is_bot argument)
 Use lvlExpr otherwise.  A little subtle, and I got it wrong at least twice
-(e.g. Trac #13369).
+(e.g. #13369).
 -}
 
 {-
@@ -1398,7 +1398,7 @@ That's why we have this as_far_as_poss stuff.  Usually as_far_as_poss
 is just tOP_LEVEL; but occasionally a coercion variable (which is an
 Id) mentioned in type prevents this.
 
-Example Trac #14270 comment:15.
+Example #14270 comment:15.
 -}
 
 
diff --git a/compiler/simplCore/SimplCore.hs b/compiler/simplCore/SimplCore.hs
index 168ece971c39962377af06d25f24c667b9757016..7f2a0ea58923a349274b4a5717c321ae38ca8e47 100644
--- a/compiler/simplCore/SimplCore.hs
+++ b/compiler/simplCore/SimplCore.hs
@@ -339,7 +339,7 @@ getCoreToDo dflags
         -- really really one-shot thunks. Only needed if the demand analyser
         -- has run at all. See Note [Final Demand Analyser run] in DmdAnal
         -- It is EXTREMELY IMPORTANT to run this pass, otherwise execution
-        -- can become /exponentially/ more expensive. See Trac #11731, #12996.
+        -- can become /exponentially/ more expensive. See #11731, #12996.
         runWhen (strictness || late_dmd_anal) CoreDoStrictness,
 
         maybe_rule_check (Phase 0)
diff --git a/compiler/simplCore/SimplMonad.hs b/compiler/simplCore/SimplMonad.hs
index 81654e9af2ba8b7a61ab55f8038c442f393d5cd6..17a323295705fe00d3d196db34116435e868489d 100644
--- a/compiler/simplCore/SimplMonad.hs
+++ b/compiler/simplCore/SimplMonad.hs
@@ -97,7 +97,7 @@ computeMaxTicks dflags size
         -- MAGIC NUMBER, multiplies the simplTickFactor
         -- We can afford to be generous; this is really
         -- just checking for loops, and shouldn't usually fire
-        -- A figure of 20 was too small: see Trac #5539.
+        -- A figure of 20 was too small: see #5539.
 
 {-# INLINE thenSmpl #-}
 {-# INLINE thenSmpl_ #-}
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index 265b0fb5f92ce4ca880a3cf8bb1c2877df5e88cd..f42a5d97568fe8cb6aff46a0c66a741e3c797b4d 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -542,7 +542,7 @@ on its first argument -- it must be saturated for these to kick in
 
 Note [Do not expose strictness if sm_inline=False]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Trac #15163 showed a case in which we had
+#15163 showed a case in which we had
 
   {-# INLINE [1] zip #-}
   zip = undefined
@@ -708,7 +708,7 @@ float, exposing the value, if we inline.  That makes it different to
 exprIsHNF.
 
 Before 2009 we said it was interesting if the argument had *any* structure
-at all; i.e. (hasSomeUnfolding v).  But does too much inlining; see Trac #3016.
+at all; i.e. (hasSomeUnfolding v).  But does too much inlining; see #3016.
 
 But we don't regard (f x y) as interesting, unless f is unsaturated.
 If it's saturated and f hasn't inlined, then it's probably not going
@@ -822,12 +822,12 @@ When simplifying a rule LHS, refrain from /any/ inlining or applying
 of other RULES.
 
 Doing anything to the LHS is plain confusing, because it means that what the
-rule matches is not what the user wrote. c.f. Trac #10595, and #10528.
+rule matches is not what the user wrote. c.f. #10595, and #10528.
 Moreover, inlining (or applying rules) on rule LHSs risks introducing
-Ticks into the LHS, which makes matching trickier. Trac #10665, #10745.
+Ticks into the LHS, which makes matching trickier. #10665, #10745.
 
 Doing this to either side confounds tools like HERMIT, which seek to reason
-about and apply the RULES as originally written. See Trac #10829.
+about and apply the RULES as originally written. See #10829.
 
 Note [No eta expansion in stable unfoldings]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -844,7 +844,7 @@ we do not want to eta-expand to
   --    = (/\a \(d:Ord a) (x:a) (eta:State#). bla eta) |> co
 
 because not specialisation of the overloading doesn't work properly
-(see Note [Specialisation shape] in Specialise), Trac #9509.
+(see Note [Specialisation shape] in Specialise), #9509.
 
 So we disable eta-expansion in stable unfoldings.
 
@@ -1109,7 +1109,7 @@ it might make fInt look big, and we'll lose the opportunity to inline f
 at each of fInt's call sites.  The INLINE pragma will only inline when
 the application is saturated for exactly this reason; and we don't
 want PreInlineUnconditionally to second-guess it.  A live example is
-Trac #3736.
+#3736.
     c.f. Note [Stable unfoldings and postInlineUnconditionally]
 
 NB: if the pragma is INLINEABLE, then we don't want to behave in
@@ -1516,7 +1516,7 @@ tryEtaExpandRhs mode bndr rhs
        ; return (count isId join_bndrs, exprIsBottom join_body, rhs) }
          -- Note [Do not eta-expand join points]
          -- But do return the correct arity and bottom-ness, because
-         -- these are used to set the bndr's IdInfo (Trac #15517)
+         -- these are used to set the bndr's IdInfo (#15517)
 
   | otherwise
   = do { (new_arity, is_bot, new_rhs) <- try_expand
@@ -1614,7 +1614,7 @@ Note [Do not eta-expand PAPs]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 We used to have old_arity = manifestArity rhs, which meant that we
 would eta-expand even PAPs.  But this gives no particular advantage,
-and can lead to a massive blow-up in code size, exhibited by Trac #9020.
+and can lead to a massive blow-up in code size, exhibited by #9020.
 Suppose we have a PAP
     foo :: IO ()
     foo = returnIO ()
@@ -1731,7 +1731,7 @@ new binding is abstracted.  Note that
          poly_t = /\ a b -> (e1, e2)
          poly_x = /\ a   -> fst (poly_t a *b*)
 
-  * We must do closeOverKinds.  Example (Trac #10934):
+  * We must do closeOverKinds.  Example (#10934):
        f = /\k (f:k->*) (a:k). let t = AccFailure @ (f a) in ...
     Here we want to float 't', but we must remember to abstract over
     'k' as well, even though it is not explicitly mentioned in the RHS,
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index 2156dc55b8959726a5985f308de34a1cdbee446e..0130e06469e5a65d8a7a4469d6f09c95d75ac7ea 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -746,7 +746,7 @@ arity computation it performs (via CoreArity.findRhsArity) already
 does a simple bottoming-expression analysis.  So all we need to do
 is propagate that info to the binder's IdInfo.
 
-This showed up in Trac #12150; see comment:16.
+This showed up in #12150; see comment:16.
 
 Note [Setting the demand info]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1218,7 +1218,7 @@ rebuild env expr cont
 {- Note [Optimising reflexivity]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 It's important (for compiler performance) to get rid of reflexivity as soon
-as it appears.  See Trac #11735, #14737, and #15019.
+as it appears.  See #11735, #14737, and #15019.
 
 In particular, we want to behave well on
 
@@ -1232,7 +1232,7 @@ In particular, we want to behave well on
    build up NthCo stacks.  Silly to do that if co is reflexive.
 
 However, we don't want to call isReflexiveCo too much, because it uses
-type equality which is expensive on big types (Trac #14737 comment:7).
+type equality which is expensive on big types (#14737 comment:7).
 
 A good compromise (determined experimentally) seems to be to call
 isReflexiveCo
@@ -1240,7 +1240,7 @@ isReflexiveCo
  * at the end
 
 In investigating this I saw missed opportunities for on-the-fly
-coercion shrinkage. See Trac #15090.
+coercion shrinkage. See #15090.
 -}
 
 
@@ -1292,7 +1292,7 @@ simplCast env body co0 cont0
                     -- 'co' with the InExpr 'arg', so we simplify
                     -- to make it all consistent.  It's a bit messy.
                     -- But it isn't a common case.
-                    -- Example of use: Trac #995
+                    -- Example of use: #995
                ; return (ApplyToVal { sc_arg  = mkCast arg' co1
                                     , sc_env  = arg_se'
                                     , sc_dup  = dup'
@@ -1524,7 +1524,7 @@ Simplifying rules and stable-unfoldings happens a bit after
 simplifying the right-hand side, so we remember whether or not it
 is a join point, and what 'cont' is, in a value of type MaybeJoinCont
 
-Trac #13900 wsa caused by forgetting to push 'cont' into the RHS
+#13900 wsa caused by forgetting to push 'cont' into the RHS
 of a SpecConstr-generated RULE for a join point.
 -}
 
@@ -2269,7 +2269,7 @@ where 'r' is used strictly in (..r..), we can safely transform to
 This is a Good Thing, because 'r' might be dead (if the body just
 calls error), or might be used just once (in which case it can be
 inlined); or we might be able to float the let-binding up or down.
-E.g. Trac #15631 has an example.
+E.g. #15631 has an example.
 
 Note that this can change the error behaviour.  For example, we might
 transform
@@ -2280,7 +2280,7 @@ let-bound to (error "good").
 
 Nevertheless, the paper "A semantics for imprecise exceptions" allows
 this transformation. If you want to fix the evaluation order, use
-'pseq'.  See Trac #8900 for an example where the loss of this
+'pseq'.  See #8900 for an example where the loss of this
 transformation bit us in practice.
 
 See also Note [Empty case alternatives] in CoreSyn.
@@ -2298,7 +2298,7 @@ There have been various earlier versions of this patch:
     scrut_is_demanded_var _          = False
 
   This only fired if the scrutinee was a /variable/, which seems
-  an unnecessary restriction. So in Trac #15631 I relaxed it to allow
+  an unnecessary restriction. So in #15631 I relaxed it to allow
   arbitrary scrutinees.  Less code, less to explain -- but the change
   had 0.00% effect on nofib.
 
@@ -2313,7 +2313,7 @@ There have been various earlier versions of this patch:
     case_bndr_evald_next (Case e _ _ _)  = case_bndr_evald_next e
     case_bndr_evald_next _               = False
 
-  This patch was part of fixing Trac #7542. See also
+  This patch was part of fixing #7542. See also
   Note [Eta reduction of an eval'd function] in CoreUtils.)
 
 
@@ -2562,7 +2562,7 @@ We'd like to transform
 so that 'rhs' can take advantage of the form of x'.  Notice that Note
 [Case of cast] (in OccurAnal) may then apply to the result.
 
-We'd also like to eliminate empty types (Trac #13468). So if
+We'd also like to eliminate empty types (#13468). So if
 
     data Void
     type instance F Bool = Void
@@ -2698,7 +2698,7 @@ NB: simplLamBinders preserves this eval info
 
 In addition to handling data constructor fields with !s, addEvals
 also records the fact that the result of seq# is always in WHNF.
-See Note [seq# magic] in PrelRules.  Example (Trac #15226):
+See Note [seq# magic] in PrelRules.  Example (#15226):
 
   case seq# v s of
     (# s', v' #) -> E
@@ -2707,7 +2707,7 @@ we want the compiler to be aware that v' is in WHNF in E.
 
 Open problem: we don't record that v itself is in WHNF (and we can't
 do it here).  The right thing is to do some kind of binder-swap;
-see Trac #15226 for discussion.
+see #15226 for discussion.
 -}
 
 addEvals :: Maybe OutExpr -> DataCon -> [Id] -> [Id]
@@ -2799,7 +2799,7 @@ The let/app invariant requires that y is evaluated in the call to
 reallyUnsafePtrEq#, which it is.  But we still want that to be true if we
 propagate binders to occurrences.
 
-This showed up in Trac #13027.
+This showed up in #13027.
 
 Note [Add unfolding for scrutinee]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2975,7 +2975,7 @@ When we have
        of alts
 then we can just duplicate those alts because the A and C cases
 will disappear immediately.  This is more direct than creating
-join points and inlining them away.  See Trac #4930.
+join points and inlining them away.  See #4930.
 -}
 
 --------------------
@@ -3208,7 +3208,7 @@ Supposing that body is big, we end up with
 This is just what we want because the rn produces a box that
 the case rn cancels with.
 
-See Trac #4957 a fuller example.
+See #4957 a fuller example.
 
 Note [Case binders and join points]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -3306,7 +3306,7 @@ them.  Thus:
 Now if the thing in the hole is a case expression (which is when
 we'll call mkDupableCont), we'll push the function call into the
 branches, which is what we want.  Now RULES for f may fire, and
-call-pattern specialisation.  Here's an example from Trac #3116
+call-pattern specialisation.  Here's an example from #3116
      go (n+1) (case l of
                  1  -> bs'
                  _  -> Chunk p fpc (o+1) (l-1) bs')
@@ -3489,7 +3489,7 @@ simplStableUnfolding env top_lvl mb_cont id unf rhs_ty
                         -- has got small. This happens, notably in the inlinings
                         -- for dfuns for single-method classes; see
                         -- Note [Single-method classes] in TcInstDcls.
-                        -- A test case is Trac #4138
+                        -- A test case is #4138
                         -- But retain a previous boring_ok of True; e.g. see
                         -- the way it is set in calcUnfoldingGuidanceWithArity
                         in return (mkCoreUnfolding src is_top_lvl expr' guide')
diff --git a/compiler/simplStg/StgCse.hs b/compiler/simplStg/StgCse.hs
index fbccf80b64aff8a93a0fdb8f1bef05a3718878be..386515ee2726507c03107ce3ef969595cded08c1 100644
--- a/compiler/simplStg/StgCse.hs
+++ b/compiler/simplStg/StgCse.hs
@@ -78,7 +78,7 @@ Consider two unboxed sum terms:
 These two terms are not equal as they unarise to different unboxed
 tuples. However if we run StgCse before Unarise, it'll think the two
 terms (# 1 | #) are equal, and replace one of these with a binder to
-the other. That's bad -- Trac #15300.
+the other. That's bad -- #15300.
 
 Solution: do unarise first.
 
diff --git a/compiler/simplStg/StgLiftLams.hs b/compiler/simplStg/StgLiftLams.hs
index d46e641a5adc5687ee5fff736b9a5a896d25a268..db85b994cf1be001d1de8246a83d77f6b83520b8 100644
--- a/compiler/simplStg/StgLiftLams.hs
+++ b/compiler/simplStg/StgLiftLams.hs
@@ -18,7 +18,7 @@ import qualified StgLiftLams.Transformation as Transformation
 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 -- $note
 -- See also the <https://ghc.haskell.org/trac/ghc/wiki/LateLamLift wiki page>
--- and Trac #9476.
+-- and #9476.
 --
 -- The basic idea behind lambda lifting is to turn locally defined functions
 -- into top-level functions. Free variables are then passed as additional
diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs
index ad6a0757cba7ef3bc867fb9a662978b690fe6242..df6196a6551b472f7317c13e20fa7a46a3a53c52 100644
--- a/compiler/specialise/Rules.hs
+++ b/compiler/specialise/Rules.hs
@@ -440,7 +440,7 @@ isMoreSpecific :: CoreRule -> CoreRule -> Bool
 -- anything else, because we want user-define rules to "win"
 -- In particular, class ops have a built-in rule, but we
 -- any user-specific rules to win
---   eg (Trac #4397)
+--   eg (#4397)
 --      truncate :: (RealFrac a, Integral b) => a -> b
 --      {-# RULES "truncate/Double->Int" truncate = double2Int #-}
 --      double2Int :: Double -> Int
@@ -619,7 +619,7 @@ It can be the case that the binder in a rule is not actually
 bound on the LHS:
 
 * Type variables.  Type synonyms with phantom args can give rise to
-  unbound template type variables.  Consider this (Trac #10689,
+  unbound template type variables.  Consider this (#10689,
   simplCore/should_compile/T10689):
 
     type Foo a b = b
@@ -653,7 +653,7 @@ bound on the LHS:
   fires we can substitute <t> for c.
 
   This actually happened (in a RULE for a local function)
-  in Trac #13410, and also in test T10602.
+  in #13410, and also in test T10602.
 
 
 Note [Cloning the template binders]
@@ -674,11 +674,11 @@ binders if they are already in scope.
 ------ Historical note -------
 At one point I tried simply adding the template binders to the
 in-scope set /without/ cloning them, but that failed in a horribly
-obscure way in Trac #14777.  Problem was that during matching we look
+obscure way in #14777.  Problem was that during matching we look
 up target-term variables in the in-scope set (see Note [Lookup
 in-scope]).  If a target-term variable happens to name-clash with a
 template variable, that lookup will find the template variable, which
-is /utterly/ bogus.  In Trac #14777, this transformed a term variable
+is /utterly/ bogus.  In #14777, this transformed a term variable
 into a type variable, and then crashed when we wanted its idInfo.
 ------ End of historical note -------
 
diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs
index b07e480ff5987700f1fce9be47dab5f99db9730a..8ced5a87c0d74753a1dbc4f5a16335ed39d026ac 100644
--- a/compiler/specialise/SpecConstr.hs
+++ b/compiler/specialise/SpecConstr.hs
@@ -506,13 +506,13 @@ sc_force to True when calling specLoop. This flag does four things:
   * Ignore specConstrCount, to make arbitrary numbers of specialisations
         (see specialise)
   * Specialise even for arguments that are not scrutinised in the loop
-        (see argToPat; Trac #4448)
+        (see argToPat; #4448)
   * Only specialise on recursive types a finite number of times
-        (see is_too_recursive; Trac #5550; Note [Limit recursive specialisation])
+        (see is_too_recursive; #5550; Note [Limit recursive specialisation])
 
 The flag holds only for specialising a single binding group, and NOT
 for nested bindings.  (So really it should be passed around explicitly
-and not stored in ScEnv.)  Trac #14379 turned out to be caused by
+and not stored in ScEnv.)  #14379 turned out to be caused by
    f SPEC x = let g1 x = ...
               in ...
 We force-specialise f (because of the SPEC), but that generates a specialised
@@ -599,7 +599,7 @@ more than N times (controlled by -fspec-constr-recursive=N) we check
     specialisations.  If sc_count is "no limit" then we arbitrarily
     choose 10 as the limit (ugh).
 
-See Trac #5550.   Also Trac #13623, where this test had become over-aggressive,
+See #5550.   Also #13623, where this test had become over-aggressive,
 and we lost a wonderful specialisation that we really wanted!
 
 Note [NoSpecConstr]
@@ -746,7 +746,7 @@ because the x-binding still exists and we've now duplicated (expensive v).
 
 This seldom happens because let-bound constructor applications are
 ANF-ised, but it can happen as a result of on-the-fly transformations in
-SpecConstr itself.  Here is Trac #7865:
+SpecConstr itself.  Here is #7865:
 
         let {
           a'_shr =
@@ -946,7 +946,7 @@ extendBndr  env bndr  = (env { sc_subst = subst' }, bndr')
 extendValEnv :: ScEnv -> Id -> Maybe Value -> ScEnv
 extendValEnv env _  Nothing   = env
 extendValEnv env id (Just cv)
- | valueIsWorkFree cv      -- Don't duplicate work!!  Trac #7865
+ | valueIsWorkFree cv      -- Don't duplicate work!!  #7865
  = env { sc_vals = extendVarEnv (sc_vals env) id cv }
 extendValEnv env _ _ = env
 
@@ -1048,7 +1048,7 @@ So in extendCaseBndrs we must *also* add the binding
 else we lose a useful specialisation for f.  This is necessary even
 though the simplifier has systematically replaced uses of 'x' with 'y'
 and 'b' with 'c' in the code.  The use of 'b' in the ValueEnv came
-from outside the case.  See Trac #4908 for the live example.
+from outside the case.  See #4908 for the live example.
 
 Note [Avoiding exponential blowup]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1786,7 +1786,7 @@ the passed-in SpecInfo, unless there are no calls at all to the function.
 The caller can, indeed must, assume this.  He should not combine in rhs_usg
 himself, or he'll get rhs_usg twice -- and that can lead to an exponential
 blowup of duplicates in the CallEnv.  This is what gave rise to the massive
-performance loss in Trac #8852.
+performance loss in #8852.
 
 Note [Specialise original body]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1827,7 +1827,7 @@ Now we want f_spec to have strictness  LLS, otherwise we'll use call-by-need
 when calling f_spec instead of call-by-value.  And that can result in
 unbounded worsening in space (cf the classic foldl vs foldl')
 
-See Trac #3437 for a good example.
+See #3437 for a good example.
 
 The function calcSpecStrictness performs the calculation.
 
@@ -1862,7 +1862,7 @@ via 'a' itself, or be in scope at f's defn.  Hence we just take
 BUT phantom type synonyms can mess this reasoning up,
   eg   x::T b   with  type T b = Int
 So we apply expandTypeSynonyms to the bound Ids.
-See Trac # 5458.  Yuk.
+See # 5458.  Yuk.
 
 Note [SpecConstr call patterns]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1875,7 +1875,7 @@ because both of these will be optimised by Simplify.simplRule. In the
 former case such optimisation benign, because the rule will match more
 terms; but in the latter we may lose a binding of 'g1' or 'g2', and
 end up with a rule LHS that doesn't bind the template variables
-(Trac #10602).
+(#10602).
 
 The simplifier eliminates such things, but SpecConstr itself constructs
 new terms by substituting.  So the 'mkCast' in the Cast case of scExpr
@@ -1902,7 +1902,7 @@ by trim_pats.
 
 Note [SpecConstr and casts]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #14270) a call like
+Consider (#14270) a call like
 
     let f = e
     in ... f (K @(a |> co)) ...
@@ -1925,7 +1925,7 @@ call patterns that
 
 I think this is very rare.
 
-It is important (e.g. Trac #14936) that this /only/ applies to
+It is important (e.g. #14936) that this /only/ applies to
 coercions mentioned in casts.  We don't want to be discombobulated
 by casts in terms!  For example, consider
    f ((e1,e2) |> sym co)
@@ -2049,7 +2049,7 @@ trim_pats env fn (SI { si_n_specs = done_spec_count }) pats
 
     emit_trace result
        | debugIsOn || hasPprDebug (sc_dflags env)
-         -- Suppress this scary message for ordinary users!  Trac #5125
+         -- Suppress this scary message for ordinary users!  #5125
        = pprTrace "SpecConstr" msg result
        | otherwise
        = result
diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs
index f391781c4356c0a14ccbe4835f015a6a0e7675c7..c62789017f029ae5c6977b83e860858d9f109172 100644
--- a/compiler/specialise/Specialise.hs
+++ b/compiler/specialise/Specialise.hs
@@ -628,7 +628,7 @@ which explodes in size when aggressively optimized. The
 -fno-cross-module-specialise option was introduced to allow users to being
 bitten by such instances to revert to the pre-7.10 behavior.
 
-See Trac #10491
+See #10491
 -}
 
 -- | Specialise a set of calls to imported bindings
@@ -793,7 +793,7 @@ What imported functions do we specialise?  The basic set is
 but with -fspecialise-aggressively we add
  * Anything with an unfolding template
 
-Trac #8874 has a good example of why we want to auto-specialise DFuns.
+#8874 has a good example of why we want to auto-specialise DFuns.
 
 We have the -fspecialise-aggressively flag (usually off), because we
 risk lots of orphan modules from over-vigorous specialisation.
@@ -1384,7 +1384,7 @@ defeated specialisation!  Hence the use of collectBindersPushingCo.
 
 Note [Evidence foralls]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
-Suppose (Trac #12212) that we are specialising
+Suppose (#12212) that we are specialising
    f :: forall a b. (Num a, F a ~ F b) => blah
 with a=b=Int. Then the RULE will be something like
    RULE forall (d:Num Int) (g :: F Int ~ F Int).
@@ -1506,7 +1506,7 @@ In general, we need only make this Rec if
 Note [Avoiding loops]
 ~~~~~~~~~~~~~~~~~~~~~
 When specialising /dictionary functions/ we must be very careful to
-avoid building loops. Here is an example that bit us badly: Trac #3591
+avoid building loops. Here is an example that bit us badly: #3591
 
      class Eq a => C a
      instance Eq [a] => C [a]
@@ -1547,7 +1547,7 @@ Solution:
 
 --------------
 Here's another example, this time for an imported dfun, so the call
-to filterCalls is in specImports (Trac #13429). Suppose we have
+to filterCalls is in specImports (#13429). Suppose we have
   class Monoid v => C v a where ...
 
 We start with a call
@@ -1785,7 +1785,7 @@ all they should be inlined, right?  Two reasons:
    This particular example had a huge effect on the call to replicateM_
    in nofib/shootout/n-body.
 
-Why (b): discard INLINABLE pragmas? See Trac #4874 for persuasive examples.
+Why (b): discard INLINABLE pragmas? See #4874 for persuasive examples.
 Suppose we have
     {-# INLINABLE f #-}
     f :: Ord a => [a] -> Int
@@ -1803,7 +1803,7 @@ So we simply drop INLINABLE pragmas when specialising. It's not really
 a complete solution; ignoring specialisation for now, INLINABLE functions
 don't get properly strictness analysed, for example. But it works well
 for examples involving specialisation, which is the dominant use of
-INLINABLE.  See Trac #4874.
+INLINABLE.  See #4874.
 
 
 ************************************************************************
@@ -2009,7 +2009,7 @@ mkCallUDs' env f args
             ClassPred cls _ -> not (isIPClass cls)  -- Superclasses can't be IPs
             EqPred {}       -> True
             IrredPred {}    -> True   -- Things like (D []) where D is a
-                                      -- Constraint-ranged family; Trac #7785
+                                      -- Constraint-ranged family; #7785
             ForAllPred {}   -> True
 
 {-
@@ -2018,7 +2018,7 @@ Note [Type determines value]
 Only specialise if all overloading is on non-IP *class* params,
 because these are the ones whose *type* determines their *value*.  In
 parrticular, with implicit params, the type args *don't* say what the
-value of the implicit param is!  See Trac #7101
+value of the implicit param is!  See #7101
 
 However, consider
          type family D (v::*->*) :: Constraint
@@ -2032,7 +2032,7 @@ So the question is: can an implicit parameter "hide inside" a
 type-family constraint like (D a).  Well, no.  We don't allow
         type instance D Maybe = ?x:Int
 Hence the IrredPred case in type_determines_value.
-See Trac #7785.
+See #7785.
 
 Note [Interesting dictionary arguments]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2058,7 +2058,7 @@ variables?
 
 We accidentally lost accurate tracking of local variables for a long
 time, because cloned variables don't have unfoldings. But makes a
-massive difference in a few cases, eg Trac #5113. For nofib as a
+massive difference in a few cases, eg #5113. For nofib as a
 whole it's only a small win: 2.2% improvement in allocation for ansi,
 1.2% for bspt, but mostly 0.0!  Average 0.1% increase in binary size.
 -}
@@ -2117,7 +2117,7 @@ pair_fvs (bndr, rhs) = exprSomeFreeVars interesting rhs
         --         involving an imported dfun.  We must know whether
         --         a dictionary binding depends on an imported dfun,
         --         in case we try to specialise that imported dfun
-        --         Trac #13429 illustrates
+        --         #13429 illustrates
 
 -- | Flatten a set of "dumped" 'DictBind's, and some other binding
 -- pairs, into a single recursive binding.
diff --git a/compiler/stgSyn/CoreToStg.hs b/compiler/stgSyn/CoreToStg.hs
index e8f159b56925f0cc0183e80f0a5962cc47db3a98..1cb02bfb19d5d90e933abe3b9444e9ee865dd652 100644
--- a/compiler/stgSyn/CoreToStg.hs
+++ b/compiler/stgSyn/CoreToStg.hs
@@ -336,7 +336,7 @@ coreToTopStgRhs dflags ccs this_mod (bndr, rhs)
         -- It's vital that the arity on a top-level Id matches
         -- the arity of the generated STG binding, else an importing
         -- module will use the wrong calling convention
-        --      (Trac #2844 was an example where this happened)
+        --      (#2844 was an example where this happened)
         -- NB1: we can't move the assertion further out without
         --      blocking the "knot" tied in coreTopBindsToStg
         -- NB2: the arity check is only needed for Ids with External
diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs
index 6e10c987a969fb2205d2224541f47ea0c0634ffb..762ec49605f6c20ab4da0aadf4156cd400e2ca2d 100644
--- a/compiler/stranal/DmdAnal.hs
+++ b/compiler/stranal/DmdAnal.hs
@@ -93,7 +93,7 @@ seqBinds over the output before returning it, to ensure that there are
 no references holding on to the input Core program.
 
 This makes a ~30% reduction in peak memory usage when compiling
-DynFlags (cf Trac #9675 and #13426).
+DynFlags (cf #9675 and #13426).
 
 This is particularly important when we are doing late demand analysis,
 since we don't do a seqBinds at any point thereafter. Hence code
@@ -189,7 +189,7 @@ dmdAnal' env dmd (App fun (Type ty))
 dmdAnal' env dmd (App fun arg)
   = -- This case handles value arguments (type args handled above)
     -- Crucially, coercions /are/ handled here, because they are
-    -- value arguments (Trac #10288)
+    -- value arguments (#10288)
     let
         call_dmd          = mkCallDmd dmd
         (fun_ty, fun')    = dmdAnal env call_dmd fun
@@ -376,7 +376,7 @@ as if we had
         other      -> return ()
 So the 'y' isn't necessarily going to be evaluated
 
-A more complete example (Trac #148, #1592) where this shows up is:
+A more complete example (#148, #1592) where this shows up is:
      do { let len = <expensive> ;
         ; when (...) (exitWith ExitSuccess)
         ; print len }
@@ -596,7 +596,7 @@ dmdAnalTrivialRhs env id rhs fn
     -- Note [Remember to demand the function itself]
     -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     -- fn_fv: don't forget to produce a demand for fn itself
-    -- Lacking this caused Trac #9128
+    -- Lacking this caused #9128
     -- The demand is very conservative (topDmd), but that doesn't
     -- matter; trivial bindings are usually inlined, so it only
     -- kicks in for top-level bindings and NOINLINE bindings
@@ -726,7 +726,7 @@ The implementation is easy.  When analysing a join point, we can
 analyse its body with the demand from the entire join-binding (written
 let_dmd here).
 
-Another win for join points!  Trac #13543.
+Another win for join points!  #13543.
 
 Note [Demand analysis for trivial right-hand sides]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -743,7 +743,7 @@ Note that this can mean that 'foo' has an arity that is smaller than that
 indicated by its demand info.  e.g. if co :: (Int->Int->Int) ~ T, then
 foo's arity will be zero (see Note [exprArity invariant] in CoreArity),
 but its demand signature will be that of plusInt. A small example is the
-test case of Trac #8963.
+test case of #8963.
 
 
 Note [Product demands for function body]
@@ -1304,7 +1304,7 @@ binders the CPR property.  Specifically
    Slightly ad-hoc, because even if the scrutinee *is* a variable it
    might not be a onre of the arguments to the original function, or a
    sub-component thereof.  But it's simple, and nothing terrible
-   happens if we get it wrong.  e.g. Trac #10694.
+   happens if we get it wrong.  e.g. #10694.
 
 
 Note [Initial CPR for strict binders]
diff --git a/compiler/stranal/WorkWrap.hs b/compiler/stranal/WorkWrap.hs
index 8f34b3b2ec836c1e0b3a3a2b43a8d8431f00e2a0..6b98ffe4be9340485565f7865e1036242cd5dbce 100644
--- a/compiler/stranal/WorkWrap.hs
+++ b/compiler/stranal/WorkWrap.hs
@@ -185,7 +185,7 @@ f.  But that would make a new unfolding which would overwrite the old
 one! So the function would no longer be INLNABLE, and in particular
 will not be specialised at call sites in other modules.
 
-This comes in practice (Trac #6056).
+This comes in practice (#6056).
 
 Solution: do the w/w for strictness analysis, but transfer the Stable
 unfolding to the *worker*.  So we will get something like this:
@@ -240,9 +240,9 @@ will happen on every call of g. Disaster.
 Solution: do worker/wrapper even on NOINLINE things; but move the
 NOINLINE pragma to the worker.
 
-(See Trac #13143 for a real-world example.)
+(See #13143 for a real-world example.)
 
-It is crucial that we do this for *all* NOINLINE functions. Trac #10069
+It is crucial that we do this for *all* NOINLINE functions. #10069
 demonstrates what happens when we promise to w/w a (NOINLINE) leaf function, but
 fail to deliver:
 
@@ -388,7 +388,7 @@ When should the wrapper inlining be active?
    Note [Worker-wrapper for NOINLINE functions]
 
 3. For ordinary functions with no pragmas we want to inline the
-   wrapper as early as possible (Trac #15056).  Suppose another module
+   wrapper as early as possible (#15056).  Suppose another module
    defines    f x = g x x
    and suppose there is some RULE for (g True True).  Then if we have
    a call (f True), we'd expect to inline 'f' and the RULE will fire.
diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs
index 9112ddc3bfdc0274d34ae7c9e3fd8270ad7d27ba..7b15ca7f90444fdc9fdf65ea99ea4e7f64291c3a 100644
--- a/compiler/stranal/WwLib.hs
+++ b/compiler/stranal/WwLib.hs
@@ -214,12 +214,12 @@ Note [CPR for thunks] in DmdAnal.
 And if something *has* been given the CPR property and we don't w/w, it's
 a disaster, because then the enclosing function might say it has the CPR
 property, but now doesn't and there a cascade of disaster.  A good example
-is Trac #5920.
+is #5920.
 
 Note [Limit w/w arity]
 ~~~~~~~~~~~~~~~~~~~~~~~~
 Guard against high worker arity as it generates a lot of stack traffic.
-A simplified example is Trac #11565#comment:6
+A simplified example is #11565#comment:6
 
 Current strategy is very simple: don't perform w/w transformation at all
 if the result produces a wrapper with arity higher than -fmax-worker-args=.
@@ -483,7 +483,7 @@ To avoid this:
 
   * We use a fresh unique for both type-variable and term-variable binders
     Originally we lacked this freshness for type variables, and that led
-    to the very obscure Trac #12562.  (A type variable in the worker shadowed
+    to the very obscure #12562.  (A type variable in the worker shadowed
     an outer term-variable binding.)
 
   * Because of this cloning we have to substitute in the type/kind of the
@@ -621,7 +621,7 @@ unbox_one dflags fam_envs arg cs
                                          data_con unpk_args
                 arg_no_unf = zapStableUnfolding arg
                              -- See Note [Zap unfolding when beta-reducing]
-                             -- in Simplify.hs; and see Trac #13890
+                             -- in Simplify.hs; and see #13890
                 rebox_fn   = Let (NonRec arg_no_unf con_app)
                 con_app    = mkConApp2 data_con inst_tys unpk_args `mkCast` mkSymCo co
          ; (_, worker_args, wrap_fn, work_fn) <- mkWWstr dflags fam_envs False unpk_args
@@ -836,7 +836,7 @@ the case on `x` up through the case on `burble`.
 Note [mkWWstr and unsafeCoerce]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 By using unsafeCoerce, it is possible to make the number of demands fail to
-match the number of constructor arguments; this happened in Trac #8037.
+match the number of constructor arguments; this happened in #8037.
 If so, the worker/wrapper split doesn't work right and we get a Core Lint
 bug.  The fix here is simply to decline to do w/w if that happens.
 
@@ -875,10 +875,10 @@ opportunities for optimisation.
 
 Solution: use setCaseBndrEvald when creating
  (A) The arg binders x1,x2 in mkWstr_one
-         See Trac #13077, test T13077
+         See #13077, test T13077
  (B) The result binders r1,r2 in mkWWcpr_help
          See Trace #13077, test T13077a
-         And Trac #13027 comment:20, item (4)
+         And #13027 comment:20, item (4)
 to record that the relevant binder is evaluated.
 
 
@@ -901,13 +901,13 @@ can still be specialised by the type-class specialiser, something like
 BUT if f is strict in the Ord dictionary, we might unpack it, to get
    fw :: (a->a->Bool) -> [a] -> Int# -> a
 and the type-class specialiser can't specialise that.  An example is
-Trac #6056.
+#6056.
 
 But in any other situation a dictionary is just an ordinary value,
 and can be unpacked.  So we track the INLINABLE pragma, and switch
 off the unpacking in mkWWstr_one (see the isClassPred test).
 
-Historical note: Trac #14955 describes how I got this fix wrong
+Historical note: #14955 describes how I got this fix wrong
 the first time.
 -}
 
@@ -1030,7 +1030,7 @@ mkWWcpr_help (data_con, inst_tys, arg_tys, co)
                 , \ wkr_call -> Case wkr_call arg (exprType con_app) [(DEFAULT, [], con_app)]
                 , \ body     -> mkUnpackCase body co work_uniq data_con [arg] (varToCoreExpr arg)
                                 -- varToCoreExpr important here: arg can be a coercion
-                                -- Lacking this caused Trac #10658
+                                -- Lacking this caused #10658
                 , arg_ty1 ) }
 
   | otherwise   -- The general case
@@ -1115,7 +1115,7 @@ The idea is that this binding will never be used; but if it
 buggily is used we'll get a runtime error message.
 
 Coping with absence for *unlifted* types is important; see, for
-example, Trac #4306 and Trac #15627.  In the UnliftedRep case, we can
+example, #4306 and #15627.  In the UnliftedRep case, we can
 use LitRubbish, which we need to apply to the required type.
 For the unlifted types of singleton kind like Float#, Addr#, etc. we
 also find a suitable literal, using Literal.absentLiteralOf.  We don't
diff --git a/compiler/typecheck/ClsInst.hs b/compiler/typecheck/ClsInst.hs
index 9f58a0323a42b7ea58999b96eea610e286c71b76..58b9734b05f94989214b7aa3b144a8461dbfdf8d 100644
--- a/compiler/typecheck/ClsInst.hs
+++ b/compiler/typecheck/ClsInst.hs
@@ -161,7 +161,7 @@ matchInstEnv dflags short_cut_solver clas tys
                 , isOverlappable ispec
                 -- If the instance has OVERLAPPABLE or OVERLAPS or INCOHERENT
                 -- then don't let the short-cut solver choose it, because a
-                -- later instance might overlap it.  Trac #14434 is an example
+                -- later instance might overlap it.  #14434 is an example
                 -- See Note [Shortcut solving: overlap]
                 -> do { traceTc "matchClass: ignoring overlappable" (ppr pred)
                       ; return NotSure }
@@ -206,13 +206,13 @@ and we are typechecking
 
 We don't want to solve the wanted constraint with the overlappable
 instance; rather we want to use the supplied (C a)! That was the whole
-point of it being overlappable!  Trac #14434 wwas an example.
+point of it being overlappable!  #14434 wwas an example.
 
 Alas even if the instance has no overlap flag, thus
   instance C a where ...
 there is nothing to stop it being overlapped. GHC provides no way to
 declare an instance as "final" so it can't be overlapped.  But really
-only final instances are OK for short-cut solving.  Sigh. Trac #15135
+only final instances are OK for short-cut solving.  Sigh. #15135
 was a puzzling example.
 -}
 
@@ -513,7 +513,7 @@ We do not support impredicative typeable, such as
    Typeable (() => Int)
    Typeable (((),()) => Int)
 
-See Trac #9858.  For forall's the case is clear: we simply don't have
+See #9858.  For forall's the case is clear: we simply don't have
 a TypeRep for them.  For qualified but not polymorphic types, like
 (Eq a => a -> a), things are murkier.  But:
 
diff --git a/compiler/typecheck/FunDeps.hs b/compiler/typecheck/FunDeps.hs
index 94525e82945c50bb4ff4192cc030bf536857b2fe..14399df4a6698af7c15c0efb95551ca2c8f4e850 100644
--- a/compiler/typecheck/FunDeps.hs
+++ b/compiler/typecheck/FunDeps.hs
@@ -322,7 +322,7 @@ improveClsFD clas_tvs fd
                         --          (b) we must apply 'subst' to the kinds, in case we have
                         --              matched out a kind variable, but not a type variable
                         --              whose kind mentions that kind variable!
-                        --          Trac #6015, #6068
+                        --          #6015, #6068
   where
     (ltys1, rtys1) = instFD fd clas_tvs tys_inst
     (ltys2, rtys2) = instFD fd clas_tvs tys_actual
@@ -427,15 +427,15 @@ Then if 'a' is instantiated to (x y), where x:k2->*, y:k2,
 then fixing x really fixes k2 as well, and so k2 should be added to
 the lhs tyvars in the fundep check.
 
-Example (Trac #8391), using liberal coverage
+Example (#8391), using liberal coverage
       data Foo a = ...  -- Foo :: forall k. k -> *
       class Bar a b | a -> b
       instance Bar a (Foo a)
 
     In the instance decl, (a:k) does fix (Foo k a), but only if we notice
-    that (a:k) fixes k.  Trac #10109 is another example.
+    that (a:k) fixes k.  #10109 is another example.
 
-Here is a more subtle example, from HList-0.4.0.0 (Trac #10564)
+Here is a more subtle example, from HList-0.4.0.0 (#10564)
 
   class HasFieldM (l :: k) r (v :: Maybe *)
         | l r -> v where ...
@@ -468,7 +468,7 @@ Is the instance OK? Does {l,r,xs} determine v?  Well:
   * And that fixes v.
 
 However, we must closeOverKinds whenever augmenting the seed set
-in oclose!  Consider Trac #10109:
+in oclose!  Consider #10109:
 
   data Succ a   -- Succ :: forall k. k -> *
   class Add (a :: k1) (b :: k2) (ab :: k3) | a b -> ab
@@ -516,11 +516,11 @@ Remember from Note [The equality types story] in TysPrim, that
 So when oclose expands superclasses we'll get a (a ~# [b]) superclass.
 But that's an EqPred not a ClassPred, and we jolly well do want to
 account for the mutual functional dependencies implied by (t1 ~# t2).
-Hence the EqPred handling in oclose.  See Trac #10778.
+Hence the EqPred handling in oclose.  See #10778.
 
 Note [Care with type functions]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #12803)
+Consider (#12803)
   class C x y | x -> y
   type family F a b
   type family G c d = r | r -> d
@@ -603,7 +603,7 @@ Note [Bogus consistency check]
 In checkFunDeps we check that a new ClsInst is consistent with all the
 ClsInsts in the environment.
 
-The bogus aspect is discussed in Trac #10675. Currenty it if the two
+The bogus aspect is discussed in #10675. Currenty it if the two
 types are *contradicatory*, using (isNothing . tcUnifyTys).  But all
 the papers say we should check if the two types are *equal* thus
    not (substTys subst rtys1 `eqTypes` substTys subst rtys2)
@@ -638,7 +638,7 @@ checkFunDeps inst_envs (ClsInst { is_tvs = qtvs1, is_cls = cls
       = case tcUnifyTyKis bind_fn ltys1 ltys2 of
           Nothing         -> False
           Just subst
-            -> isNothing $   -- Bogus legacy test (Trac #10675)
+            -> isNothing $   -- Bogus legacy test (#10675)
                              -- See Note [Bogus consistency check]
                tcUnifyTyKis bind_fn (substTysUnchecked subst rtys1) (substTysUnchecked subst rtys2)
 
diff --git a/compiler/typecheck/Inst.hs b/compiler/typecheck/Inst.hs
index 77e8cdf0b20f250680efe71584a304bd97cc066c..89e5569c1e70de3ffb1bdec3aaf68f667eab88c4 100644
--- a/compiler/typecheck/Inst.hs
+++ b/compiler/typecheck/Inst.hs
@@ -287,7 +287,7 @@ deeply_instantiate orig subst ty
 instTyVarsWith :: CtOrigin -> [TyVar] -> [TcType] -> TcM TCvSubst
 -- Use this when you want to instantiate (forall a b c. ty) with
 -- types [ta, tb, tc], but when the kinds of 'a' and 'ta' might
--- not yet match (perhaps because there are unsolved constraints; Trac #14154)
+-- not yet match (perhaps because there are unsolved constraints; #14154)
 -- If they don't match, emit a kind-equality to promise that they will
 -- eventually do so, and thus make a kind-homongeneous substitution.
 instTyVarsWith orig tvs tys
diff --git a/compiler/typecheck/TcAnnotations.hs b/compiler/typecheck/TcAnnotations.hs
index 4d246efc2304cbe098dec2411481cc0a3769f5d4..050c5db977123aff1fb9fd05de664806e728406f 100644
--- a/compiler/typecheck/TcAnnotations.hs
+++ b/compiler/typecheck/TcAnnotations.hs
@@ -36,7 +36,7 @@ tcAnnotations anns = do
     True  -> tcAnnotations' anns
     False -> warnAnns anns
 warnAnns :: [LAnnDecl GhcRn] -> TcM [Annotation]
---- No GHCI; emit a warning (not an error) and ignore. cf Trac #4268
+--- No GHCI; emit a warning (not an error) and ignore. cf #4268
 warnAnns [] = return []
 warnAnns anns@(L loc _ : _)
   = do { setSrcSpan loc $ addWarnTc NoReason $
@@ -65,7 +65,7 @@ tcAnnotation (L loc ann@(HsAnnotation _ _ provenance expr)) = do
       runAnnotation target expr
     where
       safeHsErr = vcat [ text "Annotations are not compatible with Safe Haskell."
-                  , text "See https://ghc.haskell.org/trac/ghc/ticket/10826" ]
+                  , text "See https://gitlab.haskell.org/ghc/ghc/issues/10826" ]
 tcAnnotation (L _ (XAnnDecl _)) = panic "tcAnnotation"
 
 annProvenanceToTarget :: Module -> AnnProvenance Name
diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs
index 05fe393b988d2e718a5ae7af1fc582ce535c82c1..b4803fc043c07091a72946c828021a51e1bb2653 100644
--- a/compiler/typecheck/TcBinds.hs
+++ b/compiler/typecheck/TcBinds.hs
@@ -637,7 +637,7 @@ forall_a_a :: TcType
 -- Another alternative would be (forall (a :: TYPE kappa). a), where
 -- kappa is a unification variable. But I don't think we need that
 -- complication here. I'm going to just use (forall (a::*). a).
--- See Trac #15276
+-- See #15276
 forall_a_a = mkSpecForAllTys [alphaTyVar] alphaTy
 
 {- *********************************************************************
@@ -917,7 +917,7 @@ mkInferredPolyId insoluble qtvs inferred_theta poly_name mb_sig_inst mono_ty
          checkValidType (InfSigCtxt poly_name) inferred_poly_ty
          -- See Note [Validity of inferred types]
          -- If we found an insoluble error in the function definition, don't
-         -- do this check; otherwise (Trac #14000) we may report an ambiguity
+         -- do this check; otherwise (#14000) we may report an ambiguity
          -- error for a rather bogus type.
 
        ; return (mkLocalIdOrCoVar poly_name inferred_poly_ty) }
@@ -931,7 +931,7 @@ chooseInferredQuantifiers :: TcThetaType   -- inferred
 chooseInferredQuantifiers inferred_theta tau_tvs qtvs Nothing
   = -- No type signature (partial or complete) for this binder,
     do { let free_tvs = closeOverKinds (growThetaTyVars inferred_theta tau_tvs)
-                        -- Include kind variables!  Trac #7916
+                        -- Include kind variables!  #7916
              my_theta = pickCapturedPreds free_tvs inferred_theta
              binders  = [ mkTyVarBinder Inferred tv
                         | tv <- qtvs
@@ -1085,7 +1085,7 @@ checkOverloadedSig :: Bool -> TcIdSigInst -> TcM ()
 --   K f = e
 -- The MR applies, but the signature is overloaded, and it's
 -- best to complain about this directly
--- c.f Trac #11339
+-- c.f #11339
 checkOverloadedSig monomorphism_restriction_applies sig
   | not (null (sig_inst_theta sig))
   , monomorphism_restriction_applies
@@ -1123,7 +1123,7 @@ doesn't seem much point.  Indeed, adding a partial type signature is a
 way to get per-binding inferred generalisation.
 
 We apply the MR if /all/ of the partial signatures lack a context.
-In particular (Trac #11016):
+In particular (#11016):
    f2 :: (?loc :: Int) => _
    f2 = ?loc
 It's stupid to apply the MR here.  This test includes an extra-constraints
@@ -1149,7 +1149,7 @@ But now consider:
 We want to get an error from this, because 'a' and 'b' get unified.
 So we make a test, one per parital signature, to check that the
 explicitly-quantified type variables have not been unified together.
-Trac #14449 showed this up.
+#14449 showed this up.
 
 
 Note [Validity of inferred types]
@@ -1199,7 +1199,7 @@ Then we want to check that
      forall qtvs. theta => f_mono_ty   is more polymorphic than   f's polytype
 and the proof is the impedance matcher.
 
-Notice that the impedance matcher may do defaulting.  See Trac #7173.
+Notice that the impedance matcher may do defaulting.  See #7173.
 
 It also cleverly does an ambiguity check; for example, rejecting
    f :: F a -> F a
@@ -1486,7 +1486,7 @@ getMonoBindInfo tc_binds
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Look at:
    - typecheck/should_compile/ExPat
-   - Trac #12427, typecheck/should_compile/T12427{a,b}
+   - #12427, typecheck/should_compile/T12427{a,b}
 
   data T where
     MkT :: Integral a => a -> Int -> T
@@ -1565,7 +1565,7 @@ We typecheck pattern bindings as follows.  First tcLhs does this:
        CheckGen), then the let_bndr_spec will be LetLclBndr.  In that case
        we want to bind a cloned, local version of the variable, with the
        type given by the pattern context, *not* by the signature (even if
-       there is one; see Trac #7268). The mkExport part of the
+       there is one; see #7268). The mkExport part of the
        generalisation step will do the checking and impedance matching
        against the signature.
 
diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index 9abc04809dab179efefad4313c2ce5a6156649a5..765abc7c470394c33df6f66e4a3bfad12211830e 100644
--- a/compiler/typecheck/TcCanonical.hs
+++ b/compiler/typecheck/TcCanonical.hs
@@ -102,7 +102,7 @@ canonicalize (CQuantCan (QCI { qci_ev = ev, qci_pend_sc = pend_sc }))
 canonicalize (CIrredCan { cc_ev = ev })
   | EqPred eq_rel ty1 ty2 <- classifyPredType (ctEvPred ev)
   = -- For insolubles (all of which are equalities, do /not/ flatten the arguments
-    -- In Trac #14350 doing so led entire-unnecessary and ridiculously large
+    -- In #14350 doing so led entire-unnecessary and ridiculously large
     -- type function expansion.  Instead, canEqNC just applies
     -- the substitution to the predicate, and may do decomposition;
     --    e.g. a ~ [a], where [G] a ~ [Int], can decompose
@@ -248,7 +248,7 @@ Givens and Wanteds. But:
   is a waste of time.
 
 * (Major) if we want recursive superclasses, there would be an infinite
-  number of them.  Here is a real-life example (Trac #10318);
+  number of them.  Here is a real-life example (#10318);
 
      class (Frac (Frac a) ~ Frac a,
             Fractional (Frac a),
@@ -275,7 +275,7 @@ So here's the plan:
    solveSimpleWanteds; Note [Danger of adding superclasses during solving]
 
    However, /do/ continue to eagerly expand superlasses for new /given/
-   /non-canonical/ constraints (canClassNC does this).  As Trac #12175
+   /non-canonical/ constraints (canClassNC does this).  As #12175
    showed, a type-family application can expand to a class constraint,
    and we want to see its superclasses for just the same reason as
    Note [Eagerly expand given superclasses].
@@ -296,7 +296,7 @@ So here's the plan:
         of the implication tree
       - We may be inside a type where we can't create term-level
         evidence anyway, so we can't superclass-expand, say,
-        (a ~ b) to get (a ~# b).  This happened in Trac #15290.
+        (a ~ b) to get (a ~# b).  This happened in #15290.
 
 4. Go round to (2) again.  This loop (2,3,4) is implemented
    in TcSimplify.simpl_loop.
@@ -409,7 +409,7 @@ Examples of how adding superclasses can help:
 
 Note [Danger of adding superclasses during solving]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Here's a serious, but now out-dated example, from Trac #4497:
+Here's a serious, but now out-dated example, from #4497:
 
    class Num (RealOf t) => Normed t
    type family RealOf x
@@ -509,7 +509,7 @@ mk_strict_superclasses rec_clss ev tvs theta cls tys
        = loc   -- For tuple predicates, just take them apart, without
                -- adding their (large) size into the chain.  When we
                -- get down to a base predicate, we'll include its size.
-               -- Trac #10335
+               -- #10335
 
        | GivenOrigin skol_info <- ctLocOrigin loc
          -- See Note [Solving superclass constraints] in TcInstDcls
@@ -582,7 +582,7 @@ mk_superclasses_of rec_clss ev tvs theta cls tys
 
 {- Note [Equality superclasses in quantified constraints]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #15359, #15593, #15625)
+Consider (#15359, #15593, #15625)
   f :: (forall a. theta => a ~ b) => stuff
 
 It's a bit odd to have a local, quantified constraint for `(a~b)`,
@@ -964,7 +964,7 @@ If we have an unsolved equality like
   (a b ~R# Int)
 that is not necessarily insoluble!  Maybe 'a' will turn out to be a newtype.
 So we want to make it a potentially-soluble Irred not an insoluble one.
-Missing this point is what caused Trac #15431
+Missing this point is what caused #15431
 -}
 
 ---------------------------------
@@ -977,7 +977,7 @@ can_eq_nc_forall :: CtEvidence -> EqRel
 -- But remember also to unify the kinds of as and bs
 --  (this is the 'go' loop), and actually substitute phi2[as |> cos / bs]
 -- Remember also that we might have forall z (a:z). blah
---  so we must proceed one binder at a time (Trac #13879)
+--  so we must proceed one binder at a time (#13879)
 
 can_eq_nc_forall ev eq_rel s1 s2
  | CtWanted { ctev_loc = loc, ctev_dest = orig_dest } <- ev
@@ -1096,7 +1096,7 @@ zonk_eq_types = go
           -- the same kind.  E.g go (Proxy *      (Maybe Int))
           --                        (Proxy (*->*) Maybe)
           -- We'll call (go (Maybe Int) Maybe)
-          -- See Trac #13083
+          -- See #13083
         then tycon tc1 tys1 tys2
         else bale_out ty1 ty2
 
@@ -1198,7 +1198,7 @@ which in turn gives us
 which is easier to satisfy.
 
 Bottom line: unwrap newtypes before decomposing them!
-c.f. Trac #9123 comment:52,53 for a compelling example.
+c.f. #9123 comment:52,53 for a compelling example.
 
 Note [Newtypes can blow the stack]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1768,7 +1768,7 @@ allow more constraints to be solved.
 
 We use `isTcReflexiveCo`, to ensure that we only use the hetero-kinded case
 if we really need to.  Of course `flattenArgsNom` should return `Refl`
-whenever possible, but Trac #15577 was an infinite loop because even
+whenever possible, but #15577 was an infinite loop because even
 though the coercion was homo-kinded, `kind_co` was not `Refl`, so we
 made a new (identical) CFunEqCan, and then the entire process repeated.
 -}
@@ -2003,7 +2003,7 @@ canEqTyVar2 dflags ev eq_rel swapped tv1 rhs
   | Just rhs' <- metaTyVarUpdateOK dflags tv1 rhs  -- No occurs check
      -- Must do the occurs check even on tyvar/tyvar
      -- equalities, in case have  x ~ (y :: ..x...)
-     -- Trac #12593
+     -- #12593
   = do { new_ev <- rewriteEqEvidence ev swapped lhs rhs' rewrite_co1 rewrite_co2
        ; continueWith (CTyEqCan { cc_ev = new_ev, cc_tyvar = tv1
                                 , cc_rhs = rhs', cc_eq_rel = eq_rel }) }
@@ -2268,7 +2268,7 @@ rewriteEvidence old_ev@(CtDerived {}) new_pred _co
     -- Why?  Because for *Derived* constraints, c, the coercion, which
     -- was produced by flattening, may contain suspended calls to
     -- (ctEvExpr c), which fails for Derived constraints.
-    -- (Getting this wrong caused Trac #7384.)
+    -- (Getting this wrong caused #7384.)
     continueWith (old_ev { ctev_pred = new_pred })
 
 rewriteEvidence old_ev new_pred co
diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs
index 4736ded2f293ca9d9a84ee09ffb6e35e1bd001df..736f44e21120b334860a4de2b9f460d8bb90248b 100644
--- a/compiler/typecheck/TcDeriv.hs
+++ b/compiler/typecheck/TcDeriv.hs
@@ -160,7 +160,7 @@ And then translate it to:
 
 Note [Newtype deriving superclasses]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-(See also Trac #1220 for an interesting exchange on newtype
+(See also #1220 for an interesting exchange on newtype
 deriving and superclasses.)
 
 The 'tys' here come from the partial application in the deriving
@@ -184,7 +184,7 @@ when the dict is constructed in TcInstDcls.tcInstDecl2
 
 Note [Unused constructors and deriving clauses]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-See Trac #3221.  Consider
+See #3221.  Consider
    data T = T1 | T2 deriving( Show )
 Are T1 and T2 unused?  Well, no: the deriving clause expands to mention
 both of them.  So we gather defs/uses from deriving just like anything else.
@@ -373,7 +373,7 @@ renameDeriv is_boot inst_infos bagBinds
 {-
 Note [Newtype deriving and unused constructors]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this (see Trac #1954):
+Consider this (see #1954):
 
   module Bug(P) where
   newtype P a = MkP (IO a) deriving Monad
@@ -392,7 +392,7 @@ of genInst.
 
 Note [Staging of tcDeriving]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Here's a tricky corner case for deriving (adapted from Trac #2721):
+Here's a tricky corner case for deriving (adapted from #2721):
 
     class C a where
       type T a
@@ -468,7 +468,7 @@ Note [Avoid RebindableSyntax when deriving]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 The RebindableSyntax extension interacts awkwardly with the derivation of
 any stock class whose methods require the use of string literals. The Show
-class is a simple example (see Trac #12688):
+class is a simple example (see #12688):
 
   {-# LANGUAGE RebindableSyntax, OverloadedStrings #-}
   newtype Text = Text String
@@ -532,7 +532,7 @@ makeDerivSpecs is_boot deriv_infos deriv_decls
 {-
 Note [Flattening deriving clauses]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider what happens if you run this program (from Trac #10684) without
+Consider what happens if you run this program (from #10684) without
 DeriveGeneric enabled:
 
     data A = A deriving (Show, Generic)
@@ -914,7 +914,7 @@ Notice that the arg tys might not be the same as the family tycon arity
 
 Note [Unify kinds in deriving]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #8534)
+Consider (#8534)
     data T a b = MkT a deriving( Functor )
     -- where Functor :: (*->*) -> Constraint
 
@@ -923,7 +923,7 @@ So T :: forall k. * -> k -> *.   We want to get
 Notice the '*' argument to T.
 
 Moreover, as well as instantiating T's kind arguments, we may need to instantiate
-C's kind args.  Consider (Trac #8865):
+C's kind args.  Consider (#8865):
   newtype T a b = MkT (Either a b) deriving( Category )
 where
   Category :: forall k. (k -> k -> *) -> Constraint
@@ -957,7 +957,7 @@ Now we get a kind substitution.  We then need to:
   3. Apply that extended substitution to the non-dropped args (types and
      kinds) of the type and class
 
-Forgetting step (2) caused Trac #8893:
+Forgetting step (2) caused #8893:
   data V a = V [a] deriving Functor
   data P (x::k->*) (a:k) = P (x a) deriving Functor
   data C (x::k->*) (a:k) = C (V (P x a)) deriving Functor
@@ -969,7 +969,7 @@ and occurrence sites.
 
 This can lead to some surprising results when *visible* kind binder is
 unified (in contrast to the above examples, in which only non-visible kind
-binders were considered). Consider this example from Trac #11732:
+binders were considered). Consider this example from #11732:
 
     data T k (a :: k) = MkT deriving Functor
 
@@ -1000,7 +1000,7 @@ The only distinction is that GHC instantiates equality constraints directly
 during the deriving process.
 
 Another quirk of this design choice manifests when typeclasses have visible
-kind parameters. Consider this code (also from Trac #11732):
+kind parameters. Consider this code (also from #11732):
 
     class Cat k (cat :: k -> k -> *) where
       catId   :: cat a a
@@ -1027,7 +1027,7 @@ Functor (* -> *). But that's not enough: the `via` type, Proxy, has the kind
 unify (k -> *) with (* -> *).
 
 Currently, all of this unification is implemented kludgily with the pure
-unifier, which is rather tiresome. Trac #14331 lays out a plan for how this
+unifier, which is rather tiresome. #14331 lays out a plan for how this
 might be made cleaner.
 
 Note [Unification of two kind variables in deriving]
@@ -1061,7 +1061,7 @@ This is bad, because applying that substitution yields the following instance:
    instance Category k_new (T k1 c) where ...
 
 In other words, keeping k1 in unmapped_tvks taints the substitution, resulting
-in an ill-kinded instance (this caused Trac #11837).
+in an ill-kinded instance (this caused #11837).
 
 To prevent this, we need to filter out any variable from all_tkvs which either
 
@@ -1089,7 +1089,7 @@ When deriving, we need to perform eta-reduction analysis to ensure that none of
 the eta-reduced type variables are mentioned elsewhere in the declaration. But
 we need to be careful, because if we don't expand through the Const type
 synonym, we will mistakenly believe that f is an eta-reduced type variable and
-fail to derive Functor, even though the code above is correct (see Trac #11416,
+fail to derive Functor, even though the code above is correct (see #11416,
 where this was first noticed). For this reason, we expand the type synonyms in
 the eta-reduced types before doing any analysis.
 -}
@@ -1317,7 +1317,7 @@ mk_coerce_based_eqn mk_mechanism coerced_ty
            meths = classMethods cls
            meth_preds ty
              | null meths = [] -- No methods => no constraints
-                               -- (Trac #12814)
+                               -- (#12814)
              | otherwise = rep_pred_o ty : coercible_constraints ty
            coercible_constraints ty
              = [ mkPredOrigin (DerivOriginCoerce meth t1 t2 sa_wildcard)
@@ -1612,7 +1612,7 @@ mkNewTypeEqn
                  --    (such as Functor)
                  --
                  -- and the previous cases won't catch it. This fixes the bug
-                 -- reported in Trac #10598.
+                 -- reported in #10598.
                  | might_be_newtype_derivable && newtype_deriving
                 -> mk_eqn_newtype rep_inst_ty
                  -- Otherwise, throw an error for a stock class
@@ -1627,7 +1627,7 @@ mkNewTypeEqn
                  | newtype_deriving           -> bale_out cant_derive_err
                  -- Try newtype deriving!
                  -- Here we suggest GeneralizedNewtypeDeriving even in cases
-                 -- where it may not be applicable. See Trac #9600.
+                 -- where it may not be applicable. See #9600.
                  | otherwise                  -> bale_out (non_std $$ suggest_gnd)
 
                -- DeriveAnyClass
@@ -2063,7 +2063,7 @@ Note [Deriving strategies]
 GHC has a notion of deriving strategies, which allow the user to explicitly
 request which approach to use when deriving an instance (enabled with the
 -XDerivingStrategies language extension). For more information, refer to the
-original Trac ticket (#10598) or the associated wiki page:
+original issue (#10598) or the associated wiki page:
 https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DerivingStrategies
 
 A deriving strategy can be specified in a deriving clause:
diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs
index d38c92287999539277fa6f27c8ecee8a1f7ca75e..d834b09bbe910a92a439b3f5f3b862d3be58fb39 100644
--- a/compiler/typecheck/TcDerivInfer.hs
+++ b/compiler/typecheck/TcDerivInfer.hs
@@ -365,7 +365,7 @@ Note [Simplifying the instance context].
 
 In the functor-like case, we may need to unify some kind variables with * in
 order for the generated instance to be well-kinded. An example from
-Trac #10524:
+#10524:
 
   newtype Compose (f :: k2 -> *) (g :: k1 -> k2) (a :: k1)
     = Compose (f (g a)) deriving Functor
@@ -848,7 +848,7 @@ Here:
 Note that it is vital that we instantiate the `c` in $gdm_bar's type with a new
 unification variable for each iteration of simplifyDeriv. If we re-use the same
 unification variable across multiple iterations, then bad things can happen,
-such as Trac #14933.
+such as #14933.
 
 Similarly for 'baz', givng the constraint C2
 
diff --git a/compiler/typecheck/TcDerivUtils.hs b/compiler/typecheck/TcDerivUtils.hs
index 32a7aca922aeb8b5c1733ff1ba091858330bea60..cb5f6da02d90c368ef3e6c29c2ae4ddb367f173a 100644
--- a/compiler/typecheck/TcDerivUtils.hs
+++ b/compiler/typecheck/TcDerivUtils.hs
@@ -474,7 +474,7 @@ hasStockDeriving clas
 {-
 Note [Deriving and unused record selectors]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this (see Trac #13919):
+Consider this (see #13919):
 
   module Main (main) where
 
@@ -505,7 +505,7 @@ getDataConFixityFun :: TyCon -> TcM (Name -> Fixity)
 -- If the TyCon is locally defined, we want the local fixity env;
 -- but if it is imported (which happens for standalone deriving)
 -- we need to get the fixity env from the interface file
--- c.f. RnEnv.lookupFixity, and Trac #9830
+-- c.f. RnEnv.lookupFixity, and #9830
 getDataConFixityFun tc
   = do { this_mod <- getModule
        ; if nameIsLocalOrFrom this_mod name
@@ -938,7 +938,7 @@ of the type constructor is used truly universally quantified.  Example
      T6 :: T a (b,b)            -- No!  'b' is constrained
 
 Notice that only the first of these constructors is vanilla H-98. We only
-need to take care about the last argument (b in this case).  See Trac #8678.
+need to take care about the last argument (b in this case).  See #8678.
 Eg. for T1-T3 we can write
 
      fmap f (T1 a b) = T1 a (f b)
@@ -970,5 +970,5 @@ Here, the existential context (C (Show a) b) does technically mention the last
 type variable b. But this is OK, because expanding the type synonym C would
 give us the context (Show a), which doesn't mention b. Therefore, we must make
 sure to expand type synonyms before performing this check. Not doing so led to
-Trac #13813.
+#13813.
 -}
diff --git a/compiler/typecheck/TcEnv.hs b/compiler/typecheck/TcEnv.hs
index 7337345ed0acfa907e695050e0cce54139845fe7..f0be9a83ab1d8fecfc954d3e47142eb39487fdd8 100644
--- a/compiler/typecheck/TcEnv.hs
+++ b/compiler/typecheck/TcEnv.hs
@@ -671,7 +671,7 @@ tcInitTidyEnv
             ; tyvar2 <- zonkTcTyVarToTyVar tyvar1
               -- Be sure to zonk here!  Tidying applies to zonked
               -- types, so if we don't zonk we may create an
-              -- ill-kinded type (Trac #14175)
+              -- ill-kinded type (#14175)
             ; go (env', extendVarEnv subst tyvar tyvar2) bs }
       | otherwise
       = go (env, subst) bs
@@ -758,20 +758,20 @@ So to check for this we put in the TcLclEnv a binding for all the family
 constructors, bound to AFamDataCon, so that if we trip over 'MkT' when
 type checking 'S' we'll produce a decent error message.
 
-Trac #12088 describes this limitation. Of course, when MkT and S live in
+#12088 describes this limitation. Of course, when MkT and S live in
 different modules then all is well.
 
 Note [Don't promote pattern synonyms]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 We never promote pattern synonyms.
 
-Consider this (Trac #11265):
+Consider this (#11265):
   pattern A = True
   instance Eq A
 We want a civilised error message from the occurrence of 'A'
 in the instance, yet 'A' really has not yet been type checked.
 
-Similarly (Trac #9161)
+Similarly (#9161)
   {-# LANGUAGE PatternSynonyms, DataKinds #-}
   pattern A = ()
   b :: A
@@ -879,7 +879,7 @@ tcGetDefaultTys
   = do  { dflags <- getDynFlags
         ; let ovl_strings = xopt LangExt.OverloadedStrings dflags
               extended_defaults = xopt LangExt.ExtendedDefaultRules dflags
-                                        -- See also Trac #1974
+                                        -- See also #1974
               flags = (ovl_strings, extended_defaults)
 
         ; mb_defaults <- getDeclaredDefaultTys
@@ -913,7 +913,7 @@ This has type (forall a. IO a); it prints "hello", and returns 'undefined'.  We
 want the GHCi repl loop to try to print that 'undefined'.  The neatest thing is to
 default the 'a' to (), rather than to Integer (which is what would otherwise happen;
 and then GHCi doesn't attempt to print the ().  So in interactive mode, we add
-() to the list of defaulting types.  See Trac #1200.
+() to the list of defaulting types.  See #1200.
 
 Additionally, the list type [] is added as a default specialization for
 Traversable and Foldable. As such the default default list now has types of
@@ -1112,7 +1112,7 @@ notFound name
        ; case stage of   -- See Note [Out of scope might be a staging error]
            Splice {}
              | isUnboundName name -> failM  -- If the name really isn't in scope
-                                            -- don't report it again (Trac #11941)
+                                            -- don't report it again (#11941)
              | otherwise -> stageRestrictionError (quotes (ppr name))
            _ -> failWithTc $
                 vcat[text "GHC internal error:" <+> quotes (ppr name) <+>
@@ -1145,5 +1145,5 @@ This is really a staging error, because we can't run code involving 'x'.
 But in fact the type checker processes types first, so 'x' won't even be
 in the type envt when we look for it in $(foo x).  So inside splices we
 report something missing from the type env as a staging error.
-See Trac #5752 and #5795.
+See #5752 and #5795.
 -}
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index 3f0f82cb1d3616a992072e4b6039a1bc00406797..b5d98d07c98f33368100fdbb322f6909793d4914 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -219,7 +219,7 @@ report_unsolved type_errors expr_holes
                                  -- See Note [Suppressing error messages]
                                  -- Suppress low-priority errors if there
                                  -- are insolule errors anywhere;
-                                 -- See Trac #15539 and c.f. setting ic_status
+                                 -- See #15539 and c.f. setting ic_status
                                  -- in TcSimplify.setImplicationStatus
                             , cec_warn_redundant = warn_redundant
                             , cec_binds    = binds_var }
@@ -381,7 +381,7 @@ ReportErrorSpec, as used in reportWanteds.
 
 But we need to take care: flags can turn errors into warnings, and we
 don't want those warnings to suppress subsequent errors (including
-suppressing the essential addTcEvBind for them: Trac #15152). So in
+suppressing the essential addTcEvBind for them: #15152). So in
 tryReporter we use askNoErrs to see if any error messages were
 /actually/ produced; if not, we don't switch on suppression.
 
@@ -424,7 +424,7 @@ reportImplic ctxt implic@(Implic { ic_skols = tvs, ic_telescope = m_telescope
           -- type errors.  You could imagine using the /enclosing/
           -- bindings (in cec_binds), but that may not have enough stuff
           -- in scope for the bindings to be well typed.  So we just
-          -- switch off deferred type errors altogether.  See Trac #14605.
+          -- switch off deferred type errors altogether.  See #14605.
 
     ctxt' = ctxt1 { cec_tidy     = env1
                   , cec_encl     = implic' : cec_encl ctxt
@@ -433,7 +433,7 @@ reportImplic ctxt implic@(Implic { ic_skols = tvs, ic_telescope = m_telescope
                         -- Suppress inessential errors if there
                         -- are insolubles anywhere in the
                         -- tree rooted here, or we've come across
-                        -- a suppress-worthy constraint higher up (Trac #11541)
+                        -- a suppress-worthy constraint higher up (#11541)
 
                   , cec_binds    = evb }
 
@@ -497,7 +497,7 @@ reportBadTelescope _ _ Nothing skols
 {- Note [Redundant constraints in instance decls]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 For instance declarations, we don't report unused givens if
-they can give rise to improvement.  Example (Trac #10100):
+they can give rise to improvement.  Example (#10100):
     class Add a b ab | a b -> ab, a ab -> b
     instance Add Zero b b
     instance Add a b ab => Add (Succ a) b (Succ ab)
@@ -627,7 +627,7 @@ reportWanteds ctxt tc_lvl (WC { wc_simple = simples, wc_impl = implics })
           -- Reason: we don't report all given errors
           --         (see mkGivenErrorReporter), and we should only suppress
           --         subsequent errors if we actually report this one!
-          --         Trac #13446 is an example
+          --         #13446 is an example
 
     -- See Note [Given errors]
     has_gadt_match [] = False
@@ -816,7 +816,7 @@ reportGroup mk_err ctxt cts =
                             -- Add deferred bindings for all
                             -- Redundant if we are going to abort compilation,
                             -- but that's hard to know for sure, and if we don't
-                            -- abort, we need bindings for all (e.g. Trac #12156)
+                            -- abort, we need bindings for all (e.g. #12156)
   where
     isMonadFailInstanceMissing ct =
         case ctLocOrigin (ctLoc ct) of
@@ -842,7 +842,7 @@ maybeReportHoleError ctxt ct err
   -- Always report an error for out-of-scope variables
   -- Unless -fdefer-out-of-scope-variables is on,
   -- in which case the messages are discarded.
-  -- See Trac #12170, #12406
+  -- See #12170, #12406
   | isOutOfScopeCt ct
   = -- If deferring, report a warning only if -Wout-of-scope-variables is on
     case cec_out_of_scope_holes ctxt of
@@ -1157,7 +1157,7 @@ mkHoleError _ _ ct@(CHoleCan { cc_hole = ExprHole (OutOfScope occ rdr_env0) })
 mkHoleError tidy_simples ctxt ct@(CHoleCan { cc_hole = hole })
   -- Explicit holes, like "_" or "_f"
   = do { (ctxt, binds_msg, ct) <- relevantBindings False ctxt ct
-               -- The 'False' means "don't filter the bindings"; see Trac #8191
+               -- The 'False' means "don't filter the bindings"; see #8191
 
        ; show_hole_constraints <- goptM Opt_ShowHoleConstraints
        ; let constraints_msg
@@ -1431,13 +1431,13 @@ Consider
 Here the second equation is unreachable. The original constraint
 (a~Int) from the signature gets rewritten by the pattern-match to
 (Bool~Int), so the danger is that we report the error as coming from
-the *signature* (Trac #7293).  So, for Given errors we replace the
+the *signature* (#7293).  So, for Given errors we replace the
 env (and hence src-loc) on its CtLoc with that from the immediately
 enclosing implication.
 
 Note [Error messages for untouchables]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #9109)
+Consider (#9109)
   data G a where { GBool :: G Bool }
   foo x = case x of GBool -> True
 
@@ -1745,7 +1745,7 @@ mkTyVarEqErr' dflags ctxt report ct oriented tv1 co1 ty2
 
   | otherwise
   = reportEqErr ctxt report ct oriented (mkTyVarTy tv1) ty2
-        -- This *can* happen (Trac #6123, and test T2627b)
+        -- This *can* happen (#6123, and test T2627b)
         -- Consider an ambiguous top-level constraint (a ~ F a)
         -- Not an occurs check, because F is a type function.
   where
@@ -2106,7 +2106,7 @@ mkExpectedActualMsg _ _ _ _ _ = panic "mkExpectedAcutalMsg"
 
 {- Note [Insoluble occurs check wins]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider [G] a ~ [a],  [W] a ~ [a] (Trac #13674).  The Given is insoluble
+Consider [G] a ~ [a],  [W] a ~ [a] (#13674).  The Given is insoluble
 so we don't use it for rewriting.  The Wanted is also insoluble, and
 we don't solve it from the Given.  It's very confusing to say
     Cannot solve a ~ [a] from given constraints a ~ [a]
@@ -2317,11 +2317,11 @@ untouchable type variable.  So suggestAddSig sees if the offending
 type variable is bound by an *inferred* signature, and suggests
 adding a declared signature instead.
 
-This initially came up in Trac #8968, concerning pattern synonyms.
+This initially came up in #8968, concerning pattern synonyms.
 
 Note [Disambiguating (X ~ X) errors]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-See Trac #8278
+See #8278
 
 Note [Reporting occurs-check errors]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2669,7 +2669,7 @@ something like
     No instance for (Num Int) arising from the literal ‘3’
     There are instances for similar types:
       instance Num GHC.Types.Int -- Defined in ‘GHC.Num’
-Discussion in Trac #9611.
+Discussion in #9611.
 
 Note [Highlighting ambiguous type variables]
 ~-------------------------------------------
@@ -2835,7 +2835,7 @@ the TcS monad, and we are in TcM here.
 
 Note [Kind arguments in error messages]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-It can be terribly confusing to get an error message like (Trac #9171)
+It can be terribly confusing to get an error message like (#9171)
 
     Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
                 with actual type ‘GetParam Base (GetParam Base Int)’
@@ -2939,10 +2939,10 @@ getSkolemInfo (implic:implics) tvs
 -- We must be careful to pass it a zonked type variable, too.
 --
 -- We always remove closed top-level bindings, though,
--- since they are never relevant (cf Trac #8233)
+-- since they are never relevant (cf #8233)
 
 relevantBindings :: Bool  -- True <=> filter by tyvar; False <=> no filtering
-                          -- See Trac #8191
+                          -- See #8191
                  -> ReportErrCtxt -> Ct
                  -> TcM (ReportErrCtxt, SDoc, Ct)
 -- Also returns the zonked and tidied CtOrigin of the constraint
diff --git a/compiler/typecheck/TcEvidence.hs b/compiler/typecheck/TcEvidence.hs
index 9ee23ebfeab65b525f56408fe2105be0ef6adc52..b5209a47911f1f0fb3c5d844106e51b57bce3c3e 100644
--- a/compiler/typecheck/TcEvidence.hs
+++ b/compiler/typecheck/TcEvidence.hs
@@ -584,7 +584,7 @@ data EvTypeable
     -- ^ Dictionary for a type literal,
     -- e.g. @Typeable "foo"@ or @Typeable 3@
     -- The 'EvTerm' is evidence of, e.g., @KnownNat 3@
-    -- (see Trac #10348)
+    -- (see #10348)
   deriving Data.Data
 
 -- | Evidence for @CallStack@ implicit parameters.
@@ -633,7 +633,7 @@ Instead we make a binding
     g1 :: a~Bool = g |> ax7 a
 and the constraint
     [G] g1 :: a~Bool
-See Trac [7238] and Note [Bind new Givens immediately] in TcRnTypes
+See #7238 and Note [Bind new Givens immediately] in TcRnTypes
 
 Note [EvBinds/EvTerm]
 ~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/typecheck/TcExpr.hs b/compiler/typecheck/TcExpr.hs
index d8c53aade242392ff391bb9e70772e2552fdb8e9..4d813b0086cf94e781c1380675bc5af8317c728c 100644
--- a/compiler/typecheck/TcExpr.hs
+++ b/compiler/typecheck/TcExpr.hs
@@ -382,10 +382,10 @@ tcExpr expr@(OpApp fix arg1 op arg2) res_ty
 
        -- Make sure that the argument type has kind '*'
        --   ($) :: forall (r:RuntimeRep) (a:*) (b:TYPE r). (a->b) -> a -> b
-       -- Eg we do not want to allow  (D#  $  4.0#)   Trac #5570
+       -- Eg we do not want to allow  (D#  $  4.0#)   #5570
        --    (which gives a seg fault)
        --
-       -- The *result* type can have any kind (Trac #8739),
+       -- The *result* type can have any kind (#8739),
        -- so we don't need to check anything for that
        ; _ <- unifyKind (Just (XHsType $ NHsCoreTy arg2_sigma))
                         (tcTypeKind arg2_sigma) liftedTypeKind
@@ -447,7 +447,7 @@ tcExpr expr@(SectionR x op arg2) res_ty
     fn_orig = lexprCtOrigin op
     -- It's important to use the origin of 'op', so that call-stacks
     -- come out right; they are driven by the OccurrenceOf CtOrigin
-    -- See Trac #13285
+    -- See #13285
 
 tcExpr expr@(SectionL x arg1 op) res_ty
   = do { (op', op_ty) <- tcInferFun op
@@ -467,7 +467,7 @@ tcExpr expr@(SectionL x arg1 op) res_ty
     fn_orig = lexprCtOrigin op
     -- It's important to use the origin of 'op', so that call-stacks
     -- come out right; they are driven by the OccurrenceOf CtOrigin
-    -- See Trac #13285
+    -- See #13285
 
 tcExpr expr@(ExplicitTuple x tup_args boxity) res_ty
   | all tupArgPresent tup_args
@@ -700,7 +700,7 @@ The result type should be (T a b' c)
 not (T a b c),   because 'b' *is not* mentioned in a non-updated field
 not (T a b' c'), because 'c' *is*     mentioned in a non-updated field
 NB that it's not good enough to look at just one constructor; we must
-look at them all; cf Trac #3219
+look at them all; cf #3219
 
 After all, upd should be equivalent to:
         upd t x = case t of
@@ -1362,7 +1362,7 @@ tcArgs fun orig_fun_ty fun_orig orig_args herald
 
 {- Note [Required quantifiers in the type of a term]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #15859)
+Consider (#15859)
 
   data A k :: k -> Type      -- A      :: forall k -> k -> Type
   type KindOf (a :: k) = k   -- KindOf :: forall k. k -> Type
@@ -1390,7 +1390,7 @@ Note [Visible type application zonk]
 
 So we must zonk inner_ty as well, to guarantee consistency between zonk(tv)
 and inner_ty.  Otherwise we can build an ill-kinded type.  An example was
-Trac #14158, where we had:
+#14158, where we had:
    id :: forall k. forall (cat :: k -> k -> *). forall (a :: k). cat a a
 and we had the visible type application
   id @(->)
@@ -1405,7 +1405,7 @@ and we had the visible type application
   but we must first zonk the inner_ty to get
       forall (a :: TYPE q1). cat a a
   so that the result of substitution is well-kinded
-  Failing to do so led to Trac #14158.
+  Failing to do so led to #14158.
 -}
 
 ----------------
@@ -1704,7 +1704,7 @@ So for partial signatures we apply the MR if no context is given.  So
    e :: _ => IO _     do not apply the MR
 just like in TcBinds.decideGeneralisationPlan
 
-This makes a difference (Trac #11670):
+This makes a difference (#11670):
    peek :: Ptr a -> IO CLong
    peek ptr = peekElemOff undefined 0 :: _
 from (peekElemOff undefined 0) we get
@@ -1844,7 +1844,7 @@ tcUnboundId :: HsExpr GhcRn -> UnboundVar -> ExpRhoType -> TcM (HsExpr GhcTcId)
 -- Id; and indeed the evidence for the CHoleCan does bind it, so it's
 -- not unbound any more!
 tcUnboundId rn_expr unbound res_ty
- = do { ty <- newOpenFlexiTyVarTy  -- Allow Int# etc (Trac #12531)
+ = do { ty <- newOpenFlexiTyVarTy  -- Allow Int# etc (#12531)
       ; let occ = unboundVarOcc unbound
       ; name <- newSysName occ
       ; let ev = mkLocalId name ty
@@ -2691,7 +2691,7 @@ with update
    r { x=e1, y=e2, z=e3 }, we
 
 Finding the smallest subset is hard, so the code here makes
-a decent stab, no more.  See Trac #7989.
+a decent stab, no more.  See #7989.
 -}
 
 naughtyRecordSel :: RdrName -> SDoc
diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs
index 80202b7cbc4d60c8c17d4ddc0aa00737841b0aab..39a33f3fd74083d90dafcabd8f94fc4db98e6cb0 100644
--- a/compiler/typecheck/TcFlatten.hs
+++ b/compiler/typecheck/TcFlatten.hs
@@ -222,7 +222,7 @@ v:alpha in common envt).)
 
 Note [Unflattening can force the solver to iterate]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Look at Trac #10340:
+Look at #10340:
    type family Any :: *   -- No instances
    get :: MonadState s m => m s
    instance MonadState s (State s) where ...
@@ -426,7 +426,7 @@ Maybe that doesn't matter: we would still be left with unsolved
 G a ~ Bool.
 
 --------------------------
-Trac #9318 has a very simple program leading to
+#9318 has a very simple program leading to
 
   [W] F Int ~ Int
   [W] F Int ~ Bool
@@ -625,7 +625,7 @@ is this.  Consider flattening (Eq (F (G Int) (H Bool)):
 
   * Processing w3 first is BAD, because we can't reduce i t,so it'll
     get put into the inert set, and later kicked out when w1, w2 are
-    solved.  In Trac #9872 this led to inert sets containing hundreds
+    solved.  In #9872 this led to inert sets containing hundreds
     of suspended calls.
 
   * So we want to process w1, w2 first.
@@ -894,7 +894,7 @@ faster. This doesn't seem quite worth it, yet.
 Note [flatten_exact_fam_app_fully performance]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-The refactor of GRefl seems to cause performance trouble for T9872x: the allocation of flatten_exact_fam_app_fully_performance increased. See note [Generalized reflexive coercion] in TyCoRep for more information about GRefl and Trac #15192 for the current state.
+The refactor of GRefl seems to cause performance trouble for T9872x: the allocation of flatten_exact_fam_app_fully_performance increased. See note [Generalized reflexive coercion] in TyCoRep for more information about GRefl and #15192 for the current state.
 
 The explicit pattern match in homogenise_result helps with T9872a, b, c.
 
@@ -1269,7 +1269,7 @@ the (F a) to a skolem, and return (T fsk).  We don't need to expand the
 synonym.  This works because TcTyConAppCo can deal with synonyms
 (unlike TyConAppCo), see Note [TcCoercions] in TcEvidence.
 
-But (Trac #8979) for
+But (#8979) for
    type T a = (F a, a)    where F is a type function
 we must expand the synonym in (say) T Int, to expose the type function
 to the flattener.
@@ -1617,7 +1617,7 @@ only if (a) the work item can rewrite the inert AND
         (b) the inert cannot rewrite the work item
 
 This is significantly harder to think about. It can save a LOT of work
-in occurs-check cases, but we don't care about them much.  Trac #5837
+in occurs-check cases, but we don't care about them much.  #5837
 is an example; all the constraints here are Givens
 
              [G] a ~ TF (a,Int)
diff --git a/compiler/typecheck/TcForeign.hs b/compiler/typecheck/TcForeign.hs
index 4e5feb4d4302c3e949d909cc4e0209a2fbe231f6..877ba805f253a11e7f9605cbf85e56a3e99fbc4e 100644
--- a/compiler/typecheck/TcForeign.hs
+++ b/compiler/typecheck/TcForeign.hs
@@ -206,7 +206,7 @@ used even though it is not mentioned expclitly in the source, so we don't
 want to report it as "defined but not used" or "imported but not used".
 eg     newtype D = MkD Int
        foreign import foo :: D -> IO ()
-Here 'MkD' us used.  See Trac #7408.
+Here 'MkD' us used.  See #7408.
 
 GHC also expands type functions during this process, so it's not enough
 just to look at the free variables of the declaration.
diff --git a/compiler/typecheck/TcGenDeriv.hs b/compiler/typecheck/TcGenDeriv.hs
index e4f50ddaf7fa3db4d91d796b64cc89a94f554fbf..4d731db15c69e89d6ed84b0c1b8632ab08c6501a 100644
--- a/compiler/typecheck/TcGenDeriv.hs
+++ b/compiler/typecheck/TcGenDeriv.hs
@@ -217,7 +217,7 @@ gen_Eq_binds loc tycon = do
         nested_eq_expr tys as bs
           = foldr1 and_Expr (zipWith3Equal "nested_eq" nested_eq tys as bs)
           -- Using 'foldr1' here ensures that the derived code is correctly
-          -- associated. See Trac #10859.
+          -- associated. See #10859.
           where
             nested_eq ty a b = nlHsPar (eq_Expr ty (nlHsVar a) (nlHsVar b))
 
@@ -278,7 +278,7 @@ Several special cases:
 Note [Game plan for deriving Ord]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 It's a bad idea to define only 'compare', and build the other binary
-comparisons on top of it; see Trac #2130, #4019.  Reason: we don't
+comparisons on top of it; see #2130, #4019.  Reason: we don't
 want to laboriously make a three-way comparison, only to extract a
 binary result, something like this:
      (>) (I# x) (I# y) = case <# x y of
@@ -870,7 +870,7 @@ gen_Ix_binds loc tycon = do
                  con_pat cs_needed] $
           if con_arity == 0
              -- If the product type has no fields, inRange is trivially true
-             -- (see Trac #12853).
+             -- (see #12853).
              then true_Expr
              else foldl1 and_Expr (zipWith3Equal "single_con_inRange" in_range
                     as_needed bs_needed cs_needed)
@@ -927,12 +927,12 @@ rather than
    Ident "T1" <- lexP
 The latter desugares to inline code for matching the Ident and the
 string, and this can be very voluminous. The former is much more
-compact.  Cf Trac #7258, although that also concerned non-linearity in
+compact.  Cf #7258, although that also concerned non-linearity in
 the occurrence analyser, a separate issue.
 
 Note [Read for empty data types]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-What should we get for this?  (Trac #7931)
+What should we get for this?  (#7931)
    data Emp deriving( Read )   -- No data constructors
 
 Here we want
@@ -1060,7 +1060,7 @@ gen_Read_binds get_fixity loc tycon
 
     -- For constructors and field labels ending in '#', we hackily
     -- let the lexer generate two tokens, and look for both in sequence
-    -- Thus [Ident "I"; Symbol "#"].  See Trac #5041
+    -- Thus [Ident "I"; Symbol "#"].  See #5041
     ident_h_pat s | Just (ss, '#') <- snocView s = [ ident_pat ss, symbol_pat "#" ]
                   | otherwise                    = [ ident_pat s ]
 
@@ -1313,7 +1313,7 @@ gen_Data_binds loc rep_tc
 
        -- Make unique names for the data type and constructor
        -- auxiliary bindings.  Start with the name of the TyCon/DataCon
-       -- but that might not be unique: see Trac #12245.
+       -- but that might not be unique: see #12245.
        ; dt_occ  <- chooseUniqueOccTc (mkDataTOcc (getOccName rep_tc))
        ; dc_occs <- mapM (chooseUniqueOccTc . mkDataCOcc . getOccName)
                          (tyConDataCons rep_tc)
@@ -1430,7 +1430,7 @@ gen_data dflags data_type_name constr_names loc rep_tc
         -- because D :: * -> *
         -- even though rep_tc has kind * -> * -> * -> *
         -- Hence looking for the kind of fam_tc not rep_tc
-        -- See Trac #4896
+        -- See #4896
     tycon_kind = case tyConFamInst_maybe rep_tc of
                     Just (fam_tc, _) -> tyConKind fam_tc
                     Nothing          -> tyConKind rep_tc
@@ -1684,7 +1684,7 @@ TcDeriv.genInst. See #8503 for more discussion.
 
 Note [Newtype-deriving trickiness]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #12768):
+Consider (#12768):
   class C a where { op :: D a => a -> a }
 
   instance C a  => C [a] where { op = opList }
@@ -2091,7 +2091,7 @@ mkRdrFunBindEC arity catch_all
    --     foldMap _ z = mempty
    -- It's needed if there no data cons at all,
    -- which can happen with -XEmptyDataDecls
-   -- See Trac #4302
+   -- See #4302
    matches' = if null matches
               then [mkMatch (mkPrefixFunRhs fun)
                             (replicate (arity - 1) nlWildPat ++ [z_Pat])
@@ -2111,7 +2111,7 @@ mkRdrFunBindSE arity
    --     compare _ _ = error "Void compare"
    -- It's needed if there no data cons at all,
    -- which can happen with -XEmptyDataDecls
-   -- See Trac #4302
+   -- See #4302
    matches' = if null matches
               then [mkMatch (mkPrefixFunRhs fun)
                             (replicate arity nlWildPat)
@@ -2425,7 +2425,7 @@ We often want to make a top-level auxiliary binding.  E.g. for comparison we hae
 Of course these top-level bindings should all have distinct name, and we are
 generating RdrNames here.  We can't just use the TyCon or DataCon to distinguish
 because with standalone deriving two imported TyCons might both be called T!
-(See Trac #7947.)
+(See #7947.)
 
 So we use package name, module name and the name of the parent
 (T in this example) as part of the OccName we generate for the new binding.
diff --git a/compiler/typecheck/TcGenFunctor.hs b/compiler/typecheck/TcGenFunctor.hs
index 02f45ad31657616c4c90188a73b4c7ffa5748b10..240fc27103782b7753d87d8ee3a013388c7357c1 100644
--- a/compiler/typecheck/TcGenFunctor.hs
+++ b/compiler/typecheck/TcGenFunctor.hs
@@ -391,7 +391,7 @@ functorLikeTraverse var (FT { ft_triv = caseTrivial,     ft_var = caseVar
          -- When folding over an unboxed tuple, we must explicitly drop the
          -- runtime rep arguments, or else GHC will generate twice as many
          -- variables in a unboxed tuple pattern match and expression as it
-         -- actually needs. See Trac #12399
+         -- actually needs. See #12399
          (xrs,xcs) = unzip (map (go co) (dropRuntimeRepArgs args))
     go co (ForAllTy (Bndr v vis) x)
        | isVisibleArgFlag vis = panic "unexpected visible binder"
@@ -1051,7 +1051,7 @@ Only E1's argument is an occurrence of a universally quantified type variable
 that is syntactically equivalent to the last type parameter, so only E1's
 argument will be folded over in a derived Foldable instance.
 
-See Trac #10447 for the original discussion on this feature. Also see
+See #10447 for the original discussion on this feature. Also see
 https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DeriveFunctor
 for a more in-depth explanation.
 
@@ -1154,7 +1154,7 @@ This is unsatisfying for two reasons:
 1. The Traversable instance doesn't typecheck! Int# is of kind #, but pure
    expects an argument whose type is of kind *. This effectively prevents
    Traversable from being derived for any datatype with an unlifted argument
-   type (Trac #11174).
+   type (#11174).
 
 2. The generated code contains superfluous expressions. By the Monoid laws,
    we can reduce (f a <> mempty) to (f a), and by the Applicative laws, we can
diff --git a/compiler/typecheck/TcGenGenerics.hs b/compiler/typecheck/TcGenGenerics.hs
index 123cfd35352df7b0168960c03c10ceff11ec901b..8e328b0eedde4de5f62839368e7be3aedafaebf4 100644
--- a/compiler/typecheck/TcGenGenerics.hs
+++ b/compiler/typecheck/TcGenGenerics.hs
@@ -906,7 +906,7 @@ a Generic(1) instance is being derived, not the fully instantiated type. As a
 result, tc_mkRepTy builds the most generalized Rep(1) instance possible using
 the type variables it learns from the TyCon (i.e., it uses tyConTyVars). This
 can cause problems when the instance has instantiated type variables
-(see Trac #11732). As an example:
+(see #11732). As an example:
 
     data T a = MkT a
     deriving instance Generic (T Int)
@@ -990,7 +990,7 @@ Note [Generics compilation speed tricks]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Deriving Generic(1) is known to have a large constant factor during
 compilation, which contributes to noticeable compilation slowdowns when
-deriving Generic(1) for large datatypes (see Trac #5642).
+deriving Generic(1) for large datatypes (see #5642).
 
 To ease the pain, there is a trick one can play when generating definitions for
 to(1) and from(1). If you have a datatype like:
diff --git a/compiler/typecheck/TcHoleErrors.hs b/compiler/typecheck/TcHoleErrors.hs
index 3f2556c8c4c2c404c7c6c0136e0996d0985344ee..db47450aa1279cdbf032c1ab8cd16666af04de45 100644
--- a/compiler/typecheck/TcHoleErrors.hs
+++ b/compiler/typecheck/TcHoleErrors.hs
@@ -323,7 +323,7 @@ If -XScopedTypeVariables is enabled, this hole fit can even be copied verbatim.
 Note [Relevant Constraints]
 ~~~~~~~~~~~~~~~~~~~
 
-As highlighted by Trac #14273, we need to check any relevant constraints as well
+As highlighted by #14273, we need to check any relevant constraints as well
 as checking for subsumption. Relevant constraints are the simple constraints
 whose free unification variables are mentioned in the type of the hole.
 
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs
index 7755daf44bed227fd88547f634d474d59bf190cc..52783e72102474f68183abe8ff2d33bf2a46118f 100644
--- a/compiler/typecheck/TcHsSyn.hs
+++ b/compiler/typecheck/TcHsSyn.hs
@@ -1686,7 +1686,7 @@ zonkEvBind env bind@(EvBind { eb_lhs = var, eb_rhs = term })
 
          -- Optimise the common case of Refl coercions
          -- See Note [Optimise coercion zonking]
-         -- This has a very big effect on some programs (eg Trac #5030)
+         -- This has a very big effect on some programs (eg #5030)
 
        ; term' <- case getEqPredTys_maybe (idType var') of
            Just (r, ty1, ty2) | ty1 `eqType` ty2
@@ -1708,7 +1708,7 @@ Rather, we can zonk the variable, and if its type is (ty ~ ty), we can just
 use Refl on the right, ignoring the actual coercion on the RHS.
 
 This can have a very big effect, because the constraint solver sometimes does go
-to a lot of effort to prove Refl!  (Eg when solving  10+3 = 10+3; cf Trac #5030)
+to a lot of effort to prove Refl!  (Eg when solving  10+3 = 10+3; cf #5030)
 
 
 ************************************************************************
@@ -1724,7 +1724,7 @@ Problem:
 
     In TcMType.zonkTcTyVar, we short-circuit (Indirect ty) to
     (Indirect zty), see Note [Sharing in zonking] in TcMType. But we
-    /can't/ do this when zonking a TcType to a Type (Trac #15552, esp
+    /can't/ do this when zonking a TcType to a Type (#15552, esp
     comment:3).  Suppose we have
 
        alpha -> alpha
@@ -1752,7 +1752,7 @@ Problem:
     the same as zonkTcTypeToType. (If we distinguished TcType from
     Type, this issue would have been a type error!)
 
-Solution: (see Trac #15552 for other variants)
+Solution: (see #15552 for other variants)
 
     One possible solution is simply not to do the short-circuiting.
     That has less sharing, but maybe sharing is rare. And indeed,
diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs
index 0357c1046d0f98704d5c5be76e4f06d00a33d169..7438c4823b409ac80c9f13a2a7dfeebf1b229d1e 100644
--- a/compiler/typecheck/TcHsType.hs
+++ b/compiler/typecheck/TcHsType.hs
@@ -458,7 +458,7 @@ Consider this GHCi command
 We will only get the 'forall' if we /refrain/ from saturating those
 invisible binders. But generally we /do/ saturate those invisible
 binders (see tcInferApps), and we want to do so for nested application
-even in GHCi.  Consider for example (Trac #16287)
+even in GHCi.  Consider for example (#16287)
   ghci> type family F :: k
   ghci> data T :: (forall k. k) -> Type
   ghci> :kind T F
@@ -585,7 +585,7 @@ tc_infer_hs_type mode (HsKindSig _ ty sig)
                  -- We must typecheck the kind signature, and solve all
                  -- its equalities etc; from this point on we may do
                  -- things like instantiate its foralls, so it needs
-                 -- to be fully determined (Trac #14904)
+                 -- to be fully determined (#14904)
        ; traceTc "tc_infer_hs_type:sig" (ppr ty $$ ppr sig')
        ; ty' <- tc_lhs_type mode ty sig'
        ; return (ty', sig') }
@@ -721,7 +721,7 @@ tc_hs_type mode rn_ty@(HsTupleTy _ HsBoxedOrConstraintTuple hs_tys) exp_kind
        ; (tys, kinds) <- mapAndUnzipM (tc_infer_lhs_type mode) hs_tys
        ; kinds <- mapM zonkTcType kinds
            -- Infer each arg type separately, because errors can be
-           -- confusing if we give them a shared kind.  Eg Trac #7410
+           -- confusing if we give them a shared kind.  Eg #7410
            -- (Either Int, Int), we do not want to get an error saying
            -- "the second argument of a tuple should have kind *->*"
 
@@ -1244,7 +1244,7 @@ a's kind, so we'll call matchExpectedFunKind, and unify
 At this point we must zonk the function type to expose the arrrow, so
 that (a Int) will satisfy (PKTI).
 
-The absence of this caused Trac #14174 and #14520.
+The absence of this caused #14174 and #14520.
 
 The calls to mkAppTyM is the other place we are very careful.
 
@@ -1427,7 +1427,7 @@ tcTyVar mode name         -- Could be a tyvar, a tycon, or a datacon
                    ; unless (data_kinds || specialPromotedDc dc) $
                        promotionErr name NoDataKindsDC
                    ; when (isFamInstTyCon (dataConTyCon dc)) $
-                       -- see Trac #15245
+                       -- see #15245
                        promotionErr name FamDataConPE
                    ; let (_, _, _, theta, _, _) = dataConFullSig dc
                    ; traceTc "tcTyVar" (ppr dc <+> ppr theta $$ ppr (dc_theta_illegal_constraint theta))
@@ -1460,7 +1460,7 @@ Note [GADT kind self-reference]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 A promoted type cannot be used in the body of that type's declaration.
-Trac #11554 shows this example, which made GHC loop:
+#11554 shows this example, which made GHC loop:
 
   import Data.Kind
   data P (x :: k) = Q
@@ -1473,7 +1473,7 @@ TyConPE promotion error is given when tcTyVar checks an ATcTyCon in kind mode.
 Any ATcTyCon is a TyCon being defined in the current recursive group (see data
 type decl for TcTyThing), and all such TyCons are illegal in kinds.
 
-Trac #11962 proposes checking the head of a data declaration separately from
+#11962 proposes checking the head of a data declaration separately from
 its constructors. This would allow the example above to pass.
 
 Note [Body kind of a HsForAllTy]
@@ -1920,7 +1920,7 @@ monomorphic kind, with no quantification whatsoever. That's why
 we use mkAnonTyConBinder for all arguments when figuring out
 tc_binders.
 
-But notice that (Trac #16322 comment:3)
+But notice that (#16322 comment:3)
 
 * The algorithm successfully kind-checks this declaration:
     data T2 ka (a::ka) = MkT2 (T2 Type a)
@@ -2437,7 +2437,7 @@ And also see Note [Avoid name clashes for associated data types].
 For (b) suppose we have
    data T :: forall k. k -> forall k. k -> *
 where the two k's are identical even up to their uniques.  Surprisingly,
-this can happen: see Trac #14515.
+this can happen: see #14515.
 
 It's reasonably easy to solve all this; just run down the list with a
 substitution; hence the recursive 'go' function.  But it has to be
@@ -2564,7 +2564,7 @@ An annoying difficulty happens if there are more than 62 inferred
 constraints. Then we need to fill in the TcTyVar with (say) a 70-tuple.
 Where do we find the TyCon?  For good reasons we only have constraint
 tuples up to 62 (see Note [How tuples work] in TysWiredIn).  So how
-can we make a 70-tuple?  This was the root cause of Trac #14217.
+can we make a 70-tuple?  This was the root cause of #14217.
 
 It's incredibly tiresome, because we only need this type to fill
 in the hole, to communicate to the error reporting machinery.  Nothing
@@ -2612,7 +2612,7 @@ tcHsPatSigType ctxt sig_ty
             <- solveLocalEqualities "tcHsPatSigType" $
                  -- Always solve local equalities if possible,
                  -- else casts get in the way of deep skolemisation
-                 -- (Trac #16033)
+                 -- (#16033)
                tcWildCardBinders sig_wcs        $ \ wcs ->
                tcExtendNameTyVarEnv sig_tkv_prs $
                do { sig_ty <- tcHsOpenType hs_ty
@@ -2733,7 +2733,7 @@ Here
  * Finally, in '<blah>' we have the envt "b" :-> beta, "c" :-> gamma,
    so we return the pairs ("b" :-> beta, "c" :-> gamma) from tcHsPatSigType,
 
-Another example (Trac #13881):
+Another example (#13881):
    fl :: forall (l :: [a]). Sing l -> Sing l
    fl (SNil :: Sing (l :: [y])) = SNil
 When we reach the pattern signature, 'l' is in scope from the
@@ -2854,7 +2854,7 @@ tcLHsKindSig ctxt hs_kind
        -- No generalization, so we must promote
        ; kind <- zonkPromoteType kind
          -- This zonk is very important in the case of higher rank kinds
-         -- E.g. Trac #13879    f :: forall (p :: forall z (y::z). <blah>).
+         -- E.g. #13879    f :: forall (p :: forall z (y::z). <blah>).
          --                          <more blah>
          --      When instantiating p's kind at occurrences of p in <more blah>
          --      it's crucial that the kind we instantiate is fully zonked,
diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs
index 7314dd7f0e87dd2f91fb2a3bf97ee693bd8bd80c..9642756b99ea2705985934184f7474f3277af915 100644
--- a/compiler/typecheck/TcInstDcls.hs
+++ b/compiler/typecheck/TcInstDcls.hs
@@ -239,7 +239,7 @@ Why do we use this different strategy?  Because otherwise we
 end up with non-inlined dictionaries that look like
     $df = $cop |> blah
 which adds an extra indirection to every use, which seems stupid.  See
-Trac #4138 for an example (although the regression reported there
+#4138 for an example (although the regression reported there
 wasn't due to the indirection).
 
 There is an awkward wrinkle though: we want to be very
@@ -254,7 +254,7 @@ above.  We ensure that this doesn't happen by putting an INLINE
 pragma on the dfun itself; after all, it ends up being just a cast.
 
 There is one more dark corner to the INLINE story, even more deeply
-buried.  Consider this (Trac #3772):
+buried.  Consider this (#3772):
 
     class DeepSeq a => C a where
       gen :: Int -> a
@@ -433,7 +433,7 @@ Given a declaration bracket
 
 there is really no point in generating the derived code for deriving(
 Show) and then type-checking it. This will happen at the call site
-anyway, and the type check should never fail!  Moreover (Trac #6005)
+anyway, and the type check should never fail!  Moreover (#6005)
 the scoping of the generated code inside the bracket does not seem to
 work out.
 
@@ -677,7 +677,7 @@ tcDataFamInstDecl mb_clsinfo
                  -- Put the eta-removed tyvars at the end
                  -- Remember, qtvs is in arbitrary order, except kind vars are
                  -- first, so there is no reason to suppose that the eta_tvs
-                 -- (obtained from the pats) are at the end (Trac #11148)
+                 -- (obtained from the pats) are at the end (#11148)
 
        -- Eta-expand the representation tycon until it has reult kind *
        -- See also Note [Arity of data families] in FamInstEnv
@@ -910,7 +910,7 @@ There are several fiddly subtleties lurking here
   the TyConBndrVis on Drep's arguments. In particular do we have
     (forall (k::*). blah) or (* -> blah)?
 
-  We must match whatever D does!  In Trac #15817 we had
+  We must match whatever D does!  In #15817 we had
       data family X a :: forall k. * -> *   -- Note: a forall that is not used
       data instance X Int b = MkX
 
@@ -1257,11 +1257,11 @@ checkInstConstraints thing_inside
 {-
 Note [Recursive superclasses]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-See Trac #3731, #4809, #5751, #5913, #6117, #6161, which all
+See #3731, #4809, #5751, #5913, #6117, #6161, which all
 describe somewhat more complicated situations, but ones
 encountered in practice.
 
-See also tests tcrun020, tcrun021, tcrun033, and Trac #11427.
+See also tests tcrun020, tcrun021, tcrun033, and #11427.
 
 ----- THE PROBLEM --------
 The problem is that it is all too easy to create a class whose
@@ -1326,7 +1326,7 @@ since it is smaller than the thing we are building (UserOfRegs r (Maybe a).
 But for (i2) that isn't the case, so we must add an explicit, and
 perhaps surprising, (Ord r) argument to the instance declaration.
 
-Here's another example from Trac #6161:
+Here's another example from #6161:
 
        class       Super a => Duper a  where ...
        class Duper (Fam a) => Foo a    where ...
@@ -1934,8 +1934,8 @@ to disambiguate:
    fooIntInt = $dmfoo @Int @Int
 
 Lacking VTA we'd get ambiguity errors involving the default method.  This applies
-equally to vanilla default methods (Trac #1061) and generic default methods
-(Trac #12220).
+equally to vanilla default methods (#1061) and generic default methods
+(#12220).
 
 Historical note: before we had VTA we had to generate
 post-type-checked code, which took a lot more code, and didn't work for
@@ -2052,7 +2052,7 @@ Note that
 
   * The specialised dictionary $s$dfIxPair is very much needed, in case we
     call a function that takes a dictionary, but in a context where the
-    specialised dictionary can be used.  See Trac #7797.
+    specialised dictionary can be used.  See #7797.
 
   * The ClassOp rule for 'range' works equally well on $s$dfIxPair, because
     it still has a DFunUnfolding.  See Note [ClassOp/DFun selection]
diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index 277e3249d427b9111d8bdd0951d24795bcbe6143..3a80d5a62c4679074f2f0e2098f9bbcd6056edcd 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -97,7 +97,7 @@ to float. This means that
  * When floating an equality outwards, we don't need to worry about floating its
    associated flattening constraints.
 
- * Another tricky case becomes easy: Trac #4935
+ * Another tricky case becomes easy: #4935
        type instance F True a b = a
        type instance F False a b = b
 
@@ -628,7 +628,7 @@ we keep?  More subtle than you might think!
            Binds:     d3 = sc_sel d2, d2 = sc_sel d1
            Work item: d3 :: C a
            Then it'd be ridiculous to replace d1 with d3 in the inert set!
-           Hence the findNeedEvVars test.  See Trac #14774.
+           Hence the findNeedEvVars test.  See #14774.
 
   * Finally, when there is still a choice, use KeepInert rather than
     KeepWork, for two reasons:
@@ -744,7 +744,7 @@ findMatchingIrreds irreds ev
 
 {- Note [Solving irreducible equalities]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #14333)
+Consider (#14333)
   [G] a b ~R# c d
   [W] c d ~R# a b
 Clearly we should be able to solve this! Even though the constraints are
@@ -905,7 +905,7 @@ Which, because solving `Eq [a]` demands `Eq a` which we cannot solve, produces:
 
 Note [Shortcut solving: type families]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Suppose we have (Trac #13943)
+Suppose we have (#13943)
   class Take (n :: Nat) where ...
   instance {-# OVERLAPPING #-}                    Take 0 where ..
   instance {-# OVERLAPPABLE #-} (Take (n - 1)) => Take n where ..
@@ -1008,7 +1008,7 @@ Passing along the solved_dicts important for two reasons:
   solved_dicts state  ensures that we remember what we have already
   tried to solve to avoid looping.
 
-* As Trac #15164 showed, it can be important to exploit sharing between
+* As #15164 showed, it can be important to exploit sharing between
   goals. E.g. To solve G we may need G1 and G2. To solve G1 we may need H;
   and to solve G2 we may need H. If we don't spot this sharing we may
   solve H twice; and if this pattern repeats we may get exponentially bad
@@ -1671,7 +1671,7 @@ where
   newtype N b = MkN b
 and we want to get alpha := N b.
 
-See also Trac #15144, which was caused by unifying a representational
+See also #15144, which was caused by unifying a representational
 equality (in the unflattener).
 
 
@@ -1688,7 +1688,7 @@ constraint right away.  This avoids two dangers
  Danger 1: If we send the original constraint on down the pipeline
            it may react with an instance declaration, and in delicate
            situations (when a Given overlaps with an instance) that
-           may produce new insoluble goals: see Trac #4952
+           may produce new insoluble goals: see #4952
 
  Danger 2: If we don't rewrite the constraint, it may re-react
            with the same thing later, and produce the same equality
@@ -1763,7 +1763,7 @@ And there's a risk of complaining about Bool ~ [a].  But in fact
 the Wanted matches the second instance, so we never get as far
 as the fundeps.
 
-Trac #7875 is a case in point.
+#7875 is a case in point.
 -}
 
 emitFunDepDeriveds :: [FunDepEqn CtLoc] -> TcS ()
@@ -1924,7 +1924,7 @@ improveTopFunEqs ev fam_tc args fsk
        ; mapM_ (unifyDerived loc Nominal) eqns }
   where
     loc = ctEvLoc ev  -- ToDo: this location is wrong; it should be FunDepOrigin2
-                      -- See Trac #14778
+                      -- See #14778
 
 improve_top_fun_eqs :: FamInstEnvs
                     -> TyCon -> [TcType] -> TcType
@@ -1988,7 +1988,7 @@ improve_top_fun_eqs fam_envs fam_tc args rhs_ty
                   -- If the current substitution bind [k -> *], and
                   -- one of the un-substituted tyvars is (a::k), we'd better
                   -- be sure to apply the current substitution to a's kind.
-                  -- Hence instFlexiX.   Trac #13135 was an example.
+                  -- Hence instFlexiX.   #13135 was an example.
 
              ; return [ Pair (substTyUnchecked subst ax_arg) arg
                         -- NB: the ax_arg part is on the left
@@ -2100,12 +2100,12 @@ very well is this:
 
 Examples:
 
-* Trac #5837 has [G] a ~ TF (a,Int), with an instance
+* #5837 has [G] a ~ TF (a,Int), with an instance
     type instance TF (a,b) = (TF a, TF b)
   This readily loops when solving givens.  But with the FunEq occurs
   check principle, it rapidly gets stuck which is fine.
 
-* Trac #12444 is a good example, explained in comment:2.  We have
+* #12444 is a good example, explained in comment:2.  We have
     type instance F (Succ x) = Succ (F x)
     [W] alpha ~ Succ (F alpha)
   If we allow the reduction to happen, we get an infinite loop
@@ -2127,7 +2127,7 @@ we do *not* need to expand type synonyms because the matcher will do that for us
 Note [Improvement orientation]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 A very delicate point is the orientation of derived equalities
-arising from injectivity improvement (Trac #12522).  Suppse we have
+arising from injectivity improvement (#12522).  Suppse we have
   type family F x = t | t -> x
   type instance F (a, Int) = (Int, G a)
 where G is injective; and wanted constraints
@@ -2342,7 +2342,7 @@ checkInstanceOK loc what pred
 
 {- Note [Instances in no-evidence implications]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-In Trac #15290 we had
+In #15290 we had
   [G] forall p q. Coercible p q => Coercible (m p) (m q))
   [W] forall <no-ev> a. m (Int, IntStateT m a)
                           ~R#
@@ -2441,7 +2441,7 @@ The partial solution is that:
 The end effect is that, much as we do for overlapping instances, we
 delay choosing a class instance if there is a possibility of another
 instance OR a given to match our constraint later on. This fixes
-Trac #4981 and #5002.
+#4981 and #5002.
 
 Other notes:
 
@@ -2463,10 +2463,10 @@ Other notes:
   constraints, but it is possible. I've added a test case in
   typecheck/should-compile/GivenOverlapping.hs
 
-* Another "live" example is Trac #10195; another is #10177.
+* Another "live" example is #10195; another is #10177.
 
 * We ignore the overlap problem if -XIncoherentInstances is in force:
-  see Trac #6002 for a worked-out example where this makes a
+  see #6002 for a worked-out example where this makes a
   difference.
 
 * Moreover notice that our goals here are different than the goals of
@@ -2487,7 +2487,7 @@ Other notes:
   and suppose we have -XNoMonoLocalBinds, so that we attempt to find the most
   general type for 'v'.  When generalising v's type we'll simplify its
   Q [alpha] constraint, but we don't have Q [a] in the 'givens', so we
-  will use the instance declaration after all. Trac #11948 was a case
+  will use the instance declaration after all. #11948 was a case
   in point.
 
 All of this is disgustingly delicate, so to discourage people from writing
@@ -2530,7 +2530,7 @@ And less obviously to:
   superclasses invert the instance;  e.g.
       class (c1, c2) => (% c1, c2 %)
       instance (c1, c2) => (% c1, c2 %)
-  Example in Trac #14218
+  Example in #14218
 
 Exammples: T5853, T10432, T5315, T9222, T2627b, T3028b
 
diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs
index 0c9e0e223efa9ea17bf2632bee742c291098b190..d6a753f76b2787db35d9f356076467e67e0fadbd 100644
--- a/compiler/typecheck/TcMType.hs
+++ b/compiler/typecheck/TcMType.hs
@@ -683,7 +683,7 @@ influences the way it is tidied; see TypeRep.tidyTyVarBndr.
 Note [Unification variables need fresh Names]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Whenever we allocate a unification variable (MetaTyVar) we give
-it a fresh name.   Trac #16221 is a very tricky case that illustrates
+it a fresh name.   #16221 is a very tricky case that illustrates
 why this is important:
 
    data SameKind :: k -> k -> *
@@ -996,14 +996,14 @@ new_meta_tv_x info subst tv
         ; return (subst1, new_tv) }
   where
     substd_kind = substTyUnchecked subst (tyVarKind tv)
-      -- NOTE: Trac #12549 is fixed so we could use
+      -- NOTE: #12549 is fixed so we could use
       -- substTy here, but the tc_infer_args problem
       -- is not yet fixed so leaving as unchecked for now.
       -- OLD NOTE:
       -- Unchecked because we call newMetaTyVarX from
       -- tcInstTyBinder, which is called from tcInferApps
       -- which does not yet take enough trouble to ensure
-      -- the in-scope set is right; e.g. Trac #12785 trips
+      -- the in-scope set is right; e.g. #12785 trips
       -- if we use substTy here
 
 newMetaTyVarTyAtLevel :: TcLevel -> TcKind -> TcM TcType
@@ -1255,7 +1255,7 @@ collect_cand_qtvs is_dep bound dvs ty
       = do { tv_kind <- zonkTcType (tyVarKind tv)
                  -- This zonk is annoying, but it is necessary, both to
                  -- ensure that the collected candidates have zonked kinds
-                 -- (Trac #15795) and to make the naughty check
+                 -- (#15795) and to make the naughty check
                  -- (which comes next) works correctly
            ; if intersectsVarSet bound (tyCoVarsOfType tv_kind)
 
@@ -1364,7 +1364,7 @@ non-dependent variables) and
 Step (2) is often unimportant, because the kind variable is often
 also free in the type.  Eg
      Typeable k (a::k)
-has free vars {k,a}.  But the type (see Trac #7916)
+has free vars {k,a}.  But the type (see #7916)
     (f::k->*) (a::k)
 has free vars {f,a}, but we must add 'k' as well! Hence step (2).
 
@@ -1553,7 +1553,7 @@ defaultTyVar default_kind tv
   | isTyVarTyVar tv
     -- Do not default TyVarTvs. Doing so would violate the invariants
     -- on TyVarTvs; see Note [Signature skolems] in TcType.
-    -- Trac #13343 is an example; #14555 is another
+    -- #13343 is an example; #14555 is another
     -- See Note [Inferring kinds for type declarations] in TcTyClsDecls
   = return False
 
@@ -1848,7 +1848,7 @@ zonkImplication implic@(Implic { ic_skols  = skols
                                , ic_wanted = wanted
                                , ic_info   = info })
   = do { skols'  <- mapM zonkTyCoVarKind skols  -- Need to zonk their kinds!
-                                                -- as Trac #7230 showed
+                                                -- as #7230 showed
        ; given'  <- mapM zonkEvVar given
        ; info'   <- zonkSkolemInfo info
        ; wanted' <- zonkWCRec wanted
@@ -1892,7 +1892,7 @@ Why?, for example:
   simple wanted and plugin loop, looks for @CDictCan@s. If a plugin is in use,
   constraints are zonked before being passed to the plugin. This means if we
   don't preserve a canonical form, @expandSuperClasses@ fails to expand
-  superclasses. This is what happened in Trac #11525.
+  superclasses. This is what happened in #11525.
 
 - For CHoleCan, once we forget that it's a hole, we can never recover that info.
 
diff --git a/compiler/typecheck/TcMatches.hs b/compiler/typecheck/TcMatches.hs
index 4286a5463a6ef86f7f61edfda47e9b0b1e409556..48410e0a7c3e89c01cdcb4304b62d5216c52cba2 100644
--- a/compiler/typecheck/TcMatches.hs
+++ b/compiler/typecheck/TcMatches.hs
@@ -823,7 +823,7 @@ tcDoStmt ctxt (BindStmt _ pat rhs bind_op fail_op) res_ty thing_inside
   = do  {       -- Deal with rebindable syntax:
                 --       (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty
                 -- This level of generality is needed for using do-notation
-                -- in full generality; see Trac #1537
+                -- in full generality; see #1537
 
           ((rhs', pat', new_res_ty, thing), bind_op')
             <- tcSyntaxOp DoOrigin bind_op [SynRho, SynFun SynAny SynRho] res_ty $
@@ -987,7 +987,7 @@ we want to typecheck 'bar' in the knowledge that it should be an IO thing,
 pushing info from the context into the RHS.  To do this, we check the
 rebindable syntax first, and push that information into (tcMonoExprNC rhs).
 Otherwise the error shows up when checking the rebindable syntax, and
-the expected/inferred stuff is back to front (see Trac #3613).
+the expected/inferred stuff is back to front (see #3613).
 
 Note [typechecking ApplicativeStmt]
 
@@ -1084,7 +1084,7 @@ tcApplicativeStmts ctxt pairs rhs_ty thing_inside
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 An applicative-do is supposed to take place in parallel, so
 constraints bound in one arm can't possibly be available in another
-(Trac #13242).  Our current rule is this (more details and discussion
+(#13242).  Our current rule is this (more details and discussion
 on the ticket). Consider
 
    ...stmts...
diff --git a/compiler/typecheck/TcPat.hs b/compiler/typecheck/TcPat.hs
index f24fb4a3d0849dcc8402032f9d7a9ceb3b5ce295..38ca85969ae8513576b93d52e8967494dd9a5bf3 100644
--- a/compiler/typecheck/TcPat.hs
+++ b/compiler/typecheck/TcPat.hs
@@ -743,7 +743,7 @@ tcDataConPat penv (dL->L con_span con_name) data_con pat_ty
         ; checkExistentials ex_tvs all_arg_tys penv
 
         ; tenv <- instTyVarsWith PatOrigin univ_tvs ctxt_res_tys
-                  -- NB: Do not use zipTvSubst!  See Trac #14154
+                  -- NB: Do not use zipTvSubst!  See #14154
                   -- We want to create a well-kinded substitution, so
                   -- that the instantiated type is well-kinded
 
@@ -795,7 +795,7 @@ tcDataConPat penv (dL->L con_span con_name) data_con pat_ty
         ; checkTc (no_equalities || gadts_on || families_on)
                   (text "A pattern match on a GADT requires the" <+>
                    text "GADTs or TypeFamilies language extension")
-                  -- Trac #2905 decided that a *pattern-match* of a GADT
+                  -- #2905 decided that a *pattern-match* of a GADT
                   -- should require the GADT language flag.
                   -- Re TypeFamilies see also #7156
 
@@ -1006,7 +1006,7 @@ tcConArgs con_like arg_tys (RecCon (HsRecFields rpats dd)) penv thing_inside
 
                 -- No matching field; chances are this field label comes from some
                 -- other record type (or maybe none).  If this happens, just fail,
-                -- otherwise we get crashes later (Trac #8570), and similar:
+                -- otherwise we get crashes later (#8570), and similar:
                 --      f (R { foo = (a,b) }) = a+b
                 -- If foo isn't one of R's fields, we don't want to crash when
                 -- typechecking the "a+b".
diff --git a/compiler/typecheck/TcPatSyn.hs b/compiler/typecheck/TcPatSyn.hs
index 50721dc67a67aa1ca168ec10ff372da8d109f32a..5dcee99bfde3f345c982da7fc5db29d04147783b 100644
--- a/compiler/typecheck/TcPatSyn.hs
+++ b/compiler/typecheck/TcPatSyn.hs
@@ -110,14 +110,14 @@ If type inference for a pattern synonym fails, we can't continue with
 the rest of tc_patsyn_finish, because we may get knock-on errors, or
 even a crash.  E.g. from
    pattern What = True :: Maybe
-we get a kind error; and we must stop right away (Trac #15289).
+we get a kind error; and we must stop right away (#15289).
 
 We stop if there are /any/ unsolved constraints, not just insoluble
 ones; because pattern synonyms are top-level things, we will never
 solve them later if we can't solve them now.  And if we were to carry
 on, tc_patsyn_finish does zonkTcTypeToType, which defaults any
 unsolved unificatdion variables to Any, which confuses the error
-reporting no end (Trac #15685).
+reporting no end (#15685).
 
 So we use simplifyTop to completely solve the constraint, report
 any errors, throw an exception.
@@ -151,7 +151,7 @@ tcInferPatSynDecl (PSB { psb_id = lname@(dL->L _ name), psb_args = details
              named_taus = (name, pat_ty) : map mk_named_tau args
              mk_named_tau arg
                = (getName arg, mkSpecForAllTys ex_tvs (varType arg))
-               -- The mkSpecForAllTys is important (Trac #14552), albeit
+               -- The mkSpecForAllTys is important (#14552), albeit
                -- slightly artifical (there is no variable with this funny type).
                -- We do not want to quantify over variable (alpha::k)
                -- that mention the existentially-bound type variables
@@ -246,7 +246,7 @@ No problem.  But note that 's' is not fixed by the type of the
 pattern (AST a), nor is it existentially bound.  It's really only
 fixed by the type of the continuation.
 
-Trac #14552 showed that this can go wrong if the kind of 's' mentions
+#14552 showed that this can go wrong if the kind of 's' mentions
 existentially bound variables.  We obviously can't make a type like
   $mP :: forall (s::k->*) a. Prj s => AST a -> (forall k. s a -> r)
                                    -> r -> r
@@ -270,7 +270,7 @@ Recall that
 (NB: technically the (k1~k2) existential dictionary is not necessary,
 but it's there at the moment.)
 
-Now consider (Trac #14394):
+Now consider (#14394):
    pattern Foo = HRefl
 in a non-poly-kinded module.  We don't want to get
     pattern Foo :: () => (* ~ *, b ~ a) => a :~~: b
@@ -310,7 +310,7 @@ See also Note [Lift equality constaints when quantifying] in TcType
 
 Note [Coercions that escape]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Trac #14507 showed an example where the inferred type of the matcher
+#14507 showed an example where the inferred type of the matcher
 for the pattern synonym was somethign like
    $mSO :: forall (r :: TYPE rep) kk (a :: k).
            TypeRep k a
@@ -409,7 +409,7 @@ tcCheckPatSynDecl psb@PSB{ psb_id = lname@(dL->L _ name), psb_args = details
        ; (implics, ev_binds) <- buildImplicationFor tclvl skol_info univ_tvs req_dicts wanted
 
        -- Solve the constraints now, because we are about to make a PatSyn,
-       -- which should not contain unification variables and the like (Trac #10997)
+       -- which should not contain unification variables and the like (#10997)
        ; simplifyTopImplic implics
 
        -- ToDo: in the bidirectional case, check that the ex_tvs' are all distinct
@@ -446,7 +446,7 @@ Consider
 
 This should work.  But in the matcher we must match against MkT, and then
 instantiate its argument 'x', to get a function of type (Int -> Int).
-Equality is not enough!  Trac #13752 was an example.
+Equality is not enough!  #13752 was an example.
 
 
 Note [The pattern-synonym signature splitting rule]
@@ -455,7 +455,7 @@ Given a pattern signature, we must split
      the kind-generalised variables, and
      the implicitly-bound variables
 into universal and existential.  The rule is this
-(see discussion on Trac #11224):
+(see discussion on #11224):
 
      The universal tyvars are the ones mentioned in
           - univ_tvs: the user-specified (forall'd) universals
@@ -476,7 +476,7 @@ how do we split the arg_tys from req_ty?  Consider
 
 This is an odd example because Q has only one syntactic argument, and
 so presumably is defined by a view pattern matching a function.  But
-it can happen (Trac #11977, #12108).
+it can happen (#11977, #12108).
 
 We don't know Q's arity from the pattern signature, so we have to wait
 until we see the pattern declaration itself before deciding res_ty is,
@@ -549,7 +549,7 @@ a pattern synonym.  What about the /building/ side?
   TauTvs) in tcCheckPatSynDecl.  But (a) strengthening the check here
   is redundant since tcPatSynBuilderBind does the job, (b) it was
   still incomplete (TyVarTvs can unify with each other), and (c) it
-  didn't even work (Trac #13441 was accepted with
+  didn't even work (#13441 was accepted with
   ExplicitBidirectional, but rejected if expressed in
   ImplicitBidirectional form.  Conclusion: trying to be too clever is
   a bad idea.
@@ -1007,12 +1007,12 @@ tcPatToExpr name args pat = go pat
 
     -- We should really be able to invert list patterns, even when
     -- rebindable syntax is on, but doing so involves a bit of
-    -- refactoring; see Trac #14380.  Until then we reject with a
+    -- refactoring; see #14380.  Until then we reject with a
     -- helpful error message.
     notInvertibleListPat p
       = Left (vcat [ not_invertible_msg p
                    , text "Reason: rebindable syntax is on."
-                   , text "This is fixable: add use-case to Trac #14380" ])
+                   , text "This is fixable: add use-case to #14380" ])
 
 {- Note [Builder for a bidirectional pattern synonym]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1081,7 +1081,7 @@ When making the binding for the *builder*, though, we don't want
   $buildL x = Left x :: Either [a] [b]
 because that wil either mean (forall a b. Either [a] [b]), or we'll
 get a complaint that 'a' and 'b' are out of scope. (Actually the
-latter; Trac #9867.)  No, the job of the signature is done, so when
+latter; #9867.)  No, the job of the signature is done, so when
 converting the pattern to an expression (for the builder RHS) we
 simply discard the signature.
 
diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs
index 9c60709d3cfb1afffc5a3f4ae9736dce3fa03826..60ff3335dd13dbeb52f4087b0651287d76dda71d 100644
--- a/compiler/typecheck/TcRnDriver.hs
+++ b/compiler/typecheck/TcRnDriver.hs
@@ -24,7 +24,7 @@ module TcRnDriver (
         getModuleInterface,
         tcRnDeclsi,
         isGHCiMonad,
-        runTcInteractive,    -- Used by GHC API clients (Trac #8878)
+        runTcInteractive,    -- Used by GHC API clients (#8878)
         tcRnLookupName,
         tcRnGetInfo,
         tcRnModule, tcRnModuleTcRnM,
@@ -535,7 +535,7 @@ tc_rn_src_decls ds
         -- Get TH-generated top-level declarations and make sure they don't
         -- contain any splices since we don't handle that at the moment
         --
-        -- The plumbing here is a bit odd: see Trac #10853
+        -- The plumbing here is a bit odd: see #10853
       ; th_topdecls_var <- fmap tcg_th_topdecls getGblEnv
       ; th_ds <- readTcRef th_topdecls_var
       ; writeTcRef th_topdecls_var []
@@ -763,7 +763,7 @@ type env, do a setGloblaTypeEnv etc; but that all seems very indirect.
 It is much more directly simply to extract the DFunIds from the
 md_types of the SelfBootInfo.
 
-See Trac #4003, #16038 for why we need to take care here.
+See #4003, #16038 for why we need to take care here.
 -}
 
 checkHiBootIface' :: [ClsInst] -> TypeEnv -> [AvailInfo]
@@ -854,12 +854,12 @@ checkHiBootIface'
           --    That ensures that the TyCon etc inside the type are
           --    the ones defined in this module, not the ones gotten
           --    from the hi-boot file, which may have a lot less info
-          --    (Trac #8743, comment:10).
+          --    (#8743, comment:10).
           --
           --  * The DFunIds from boot_details are /GlobalIds/, because
           --    they come from typechecking M.hi-boot.
           --    But all bindings in this module should be for /LocalIds/,
-          --    otherwise dependency analysis fails (Trac #16038). This
+          --    otherwise dependency analysis fails (#16038). This
           --    is another reason for using mkExportedVanillaId, rather
           --    that modifying boot_dfun, to make local_boot_fun.
 
@@ -1754,7 +1754,7 @@ check_main dflags tcg_env explicit_mod_hdr
               -- The ev_binds of the `main` function may contain deferred
               -- type error when type of `main` is not `IO a`. The `ev_binds`
               -- must be put inside `runMainIO` to ensure the deferred type
-              -- error can be emitted correctly. See Trac #13838.
+              -- error can be emitted correctly. See #13838.
               ; rhs = nlHsApp (mkLHsWrap co (nlHsVar run_main_id)) $
                         mkHsDictLet ev_binds main_expr
               ; main_bind = mkVarBind root_main_id rhs }
@@ -2154,10 +2154,10 @@ naked expressions. Deferring type errors here is unhelpful because the
 expression gets evaluated right away anyway. It also would potentially emit
 two redundant type-error warnings, one from each plan.
 
-Trac #14963 reveals another bug that when deferred type errors is enabled
+#14963 reveals another bug that when deferred type errors is enabled
 in GHCi, any reference of imported/loaded variables (directly or indirectly)
 in interactively issued naked expressions will cause ghc panic. See more
-detailed dicussion in Trac #14963.
+detailed dicussion in #14963.
 
 The interactively issued declarations, statements, as well as the modules
 loaded into GHCi, are not affected. That means, for declaration, you could
diff --git a/compiler/typecheck/TcRnExports.hs b/compiler/typecheck/TcRnExports.hs
index ea52b12741b367bbf346edbccd3623a8cd63bde1..f584a7fceba65ec9783be4d0a30dd27e26679f23 100644
--- a/compiler/typecheck/TcRnExports.hs
+++ b/compiler/typecheck/TcRnExports.hs
@@ -65,7 +65,7 @@ it re-exports @GHC@, which includes @takeMVar#@, whose type includes
 
 Note [Exports of data families]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Suppose you see (Trac #5306)
+Suppose you see (#5306)
         module M where
           import X( F )
           data instance F Int = FInt
@@ -92,7 +92,7 @@ You just have to use an explicit export list:
 
 Note [Avails of associated data families]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Suppose you have (Trac #16077)
+Suppose you have (#16077)
 
     {-# LANGUAGE TypeFamilies #-}
     module A (module A) where
@@ -718,12 +718,12 @@ dupExport_ok :: Name -> IE GhcPs -> IE GhcPs -> Bool
 --        import A( f )
 --        import B( f )
 --
--- Example of "yes" (Trac #2436)
+-- Example of "yes" (#2436)
 --    module M( C(..), T(..) ) where
 --         class C a where { data T a }
 --         instance C Int where { data T Int = TInt }
 --
--- Example of "yes" (Trac #2436)
+-- Example of "yes" (#2436)
 --    module Foo ( T ) where
 --      data family T a
 --    module Bar ( T(..), module Foo ) where
diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs
index 8b720d6b621673eac4fb402aa728ccfe538626f2..951cc7a5a63a2bdcbe18706a1bda4aa4f4df5193 100644
--- a/compiler/typecheck/TcRnMonad.hs
+++ b/compiler/typecheck/TcRnMonad.hs
@@ -358,7 +358,7 @@ initTcWithGbl hsc_env gbl_env loc do_this
       -- If we succeed (maybe_res = Just r), there should be
       -- no unsolved constraints.  But if we exit via an
       -- exception (maybe_res = Nothing), we may have skipped
-      -- solving, so don't panic then (Trac #13466)
+      -- solving, so don't panic then (#13466)
       ; lie <- readIORef (tcl_lie lcl_env)
       ; when (isJust maybe_res && not (isEmptyWC lie)) $
         pprPanic "initTc: unsolved constraints" (ppr lie)
@@ -1645,7 +1645,7 @@ emitWildCardHoleConstraints wcs
 
 {- Note [Constraints and errors]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this (Trac #12124):
+Consider this (#12124):
 
   foo :: Maybe Int
   foo = return (case Left 3 of
@@ -1673,7 +1673,7 @@ However suppose we throw an exception inside an invocation of
 captureConstraints, and discard all the constraints. Some of those
 constraints might be "variable out of scope" Hole constraints, and that
 might have been the actual original cause of the exception!  For
-example (Trac #12529):
+example (#12529):
    f = p @ Int
 Here 'p' is out of scope, so we get an insolube Hole constraint. But
 the visible type application fails in the monad (thows an exception).
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index 9cf338b9d00b9d842be517f6c070a176078701d9..bfedaf2ccc2ec0f1bd38dc2d60b92b0f0b374950 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -2021,7 +2021,7 @@ dropDerivedCt ct
 When we discard Derived constraints, in dropDerivedSimples, we must
 set the cc_pend_sc flag to True, so that if we re-process this
 CDictCan we will re-generate its derived superclasses. Otherwise
-we might miss some fundeps.  Trac #13662 showed this up.
+we might miss some fundeps.  #13662 showed this up.
 
 See Note [The superclass story] in TcCanonical.
 -}
@@ -2108,15 +2108,15 @@ But (tiresomely) we do keep *some* Derived constraints:
 
         Others not-definitely-insoluble ones like [D] a ~ Int do not
         reflect unreachable code; indeed if fundeps generated proofs, it'd
-        be a useful equality.  See Trac #14763.   So we discard them.
+        be a useful equality.  See #14763.   So we discard them.
 
       - Given/Wanted interacGiven or Wanted interacting with an
         instance declaration (FunDepOrigin2)
 
-      - Given/Wanted interactions (FunDepOrigin1); see Trac #9612
+      - Given/Wanted interactions (FunDepOrigin1); see #9612
 
       - But for Wanted/Wanted interactions we do /not/ want to report an
-        error (Trac #13506).  Consider [W] C Int Int, [W] C Int Bool, with
+        error (#13506).  Consider [W] C Int Int, [W] C Int Bool, with
         a fundep on class C.  We don't want to report an insoluble Int~Bool;
         c.f. "wanteds do not rewrite wanteds".
 
@@ -2302,7 +2302,7 @@ Note that
   * Superclasses help only for Wanted constraints.  Derived constraints
     are not really "unsolved" and we certainly don't want them to
     trigger superclass expansion. This was a good part of the loop
-    in  Trac #11523
+    in  #11523
 
   * Even for Wanted constraints, we say "no" for implicit parameters.
     we have [W] ?x::ty, expanding superclasses won't help:
@@ -2315,7 +2315,7 @@ Note that
     is low because the unsolved set is usually empty anyway (errors
     aside), and the first non-imlicit-parameter will terminate the search.
 
-    The special case is worth it (Trac #11480, comment:2) because it
+    The special case is worth it (#11480, comment:2) because it
     applies to CallStack constraints, which aren't type errors. If we have
        f :: (C a) => blah
        f x = ...undefined...
@@ -2492,7 +2492,7 @@ ppr_bag doc bag
 
 {- Note [Given insolubles]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #14325, comment:)
+Consider (#14325, comment:)
     class (a~b) => C a b
 
     foo :: C a c => a -> c
@@ -2516,7 +2516,7 @@ The same applies to Derived constraints that /arise from/ Givens.
 E.g.   f :: (C Int [a]) => blah
 where a fundep means we get
        [D] Int ~ [a]
-By the same reasoning we must not suppress other errors (Trac #15767)
+By the same reasoning we must not suppress other errors (#15767)
 
 Bottom line: insolubleWC (called in TcSimplify.setImplicationStatus)
              should ignore givens even if they are insoluble.
@@ -3015,7 +3015,7 @@ a representational equality to rewrite a nominal one.
 Note [Wanteds do not rewrite Wanteds]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 We don't allow Wanteds to rewrite Wanteds, because that can give rise
-to very confusing type error messages.  A good example is Trac #8450.
+to very confusing type error messages.  A good example is #8450.
 Here's another
    f :: a -> Bool
    f x = ( [x,'c'], [x,True] ) `seq` True
diff --git a/compiler/typecheck/TcRules.hs b/compiler/typecheck/TcRules.hs
index 2955704e56dbcf138b004d217756d459e35055f9..f1d549568a354fe01214117bf6a2f841b300fe12 100644
--- a/compiler/typecheck/TcRules.hs
+++ b/compiler/typecheck/TcRules.hs
@@ -159,7 +159,7 @@ generateRuleConstraints ty_bndrs tm_bndrs lhs rhs
               -- bndr_wanted constraints can include wildcard hole
               -- constraints, which we should not forget about.
               -- It may mention the skolem type variables bound by
-              -- the RULE.  c.f. Trac #10072
+              -- the RULE.  c.f. #10072
 
        ; tcExtendTyVarEnv tv_bndrs $
          tcExtendIdEnv    id_bndrs $
@@ -412,7 +412,7 @@ getRuleQuantCts :: WantedConstraints -> (Cts, WantedConstraints)
 --
 -- NB: we must look inside implications, because with
 --     -fdefer-type-errors we generate implications rather eagerly;
---     see TcUnify.implicationNeeded. Not doing so caused Trac #14732.
+--     see TcUnify.implicationNeeded. Not doing so caused #14732.
 --
 -- Unlike simplifyInfer, we don't leave the WantedConstraints unchanged,
 --   and attempt to solve them from the quantified constraints.  That
diff --git a/compiler/typecheck/TcSMonad.hs b/compiler/typecheck/TcSMonad.hs
index d4d3d03b4002dbcbdd07e7879ffafa1c28fd5bb5..c52e624d8d03c62aa5b94e8087ff7859f96a2cd0 100644
--- a/compiler/typecheck/TcSMonad.hs
+++ b/compiler/typecheck/TcSMonad.hs
@@ -211,7 +211,7 @@ It's very important to process equalities /first/:
   and then kicking it out later.  That's extra work compared to just
   doing the equality first.
 
-* (Avoiding fundep iteration) As Trac #14723 showed, it's possible to
+* (Avoiding fundep iteration) As #14723 showed, it's possible to
   get non-termination if we
       - Emit the Derived fundep equalities for a class constraint,
         generating some fresh unification variables.
@@ -244,7 +244,7 @@ see Note [The equality types story] in TysPrim.
 
 Failing to prioritise these is inefficient (more kick-outs etc).
 But, worse, it can prevent us spotting a "recursive knot" among
-Wanted constraints.  See comment:10 of Trac #12734 for a worked-out
+Wanted constraints.  See comment:10 of #12734 for a worked-out
 example.
 
 So we arrange to put these particular class constraints in the wl_eqs.
@@ -978,7 +978,7 @@ head of the top-level application chain (a t1 .. tn).  See
 TcType.isTyVarHead. This is encoded in (K3b).
 
 Beware: if we make this test succeed too often, we kick out too much,
-and the solver might loop.  Consider (Trac #14363)
+and the solver might loop.  Consider (#14363)
   work item:   [G] a ~R f b
   inert item:  [G] b ~R f a
 In GHC 8.2 the completeness tests more aggressive, and kicked out
@@ -1234,7 +1234,7 @@ This is triggered by test case typecheck/should_compile/SplitWD.
 
 Note [Examples of how Derived shadows helps completeness]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Trac #10009, a very nasty example:
+#10009, a very nasty example:
 
     f :: (UnF (F b) ~ b) => F b -> ()
 
@@ -1274,7 +1274,7 @@ useful unification.
 
 But (a) I have been unable to come up with an example of this
         happening
-    (b) see Trac #12660 for how adding the derived shadows
+    (b) see #12660 for how adding the derived shadows
         of a Given led to an infinite loop.
     (c) It's unlikely that rewriting derived Givens will lead
         to a unification because Givens don't mention touchable
@@ -1314,7 +1314,7 @@ because we've already added its superclasses.  So we won't re-add
 them.  If we forget the pend_sc flag, our cunning scheme for avoiding
 generating superclasses repeatedly will fail.
 
-See Trac #11379 for a case of this.
+See #11379 for a case of this.
 
 Note [Do not do improvement for WOnly]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1345,7 +1345,7 @@ Reasons:
   with the inert [W] C Int b in the inert set; after all,
   it's the very constraint from which the [D] C Int Bool
   was split!  We can avoid this by not doing improvement
-  on [W] constraints. This came up in Trac #12860.
+  on [W] constraints. This came up in #12860.
 -}
 
 maybeEmitShadow :: InertCans -> Ct -> TcS Ct
@@ -1498,7 +1498,7 @@ addInertForAll new_qci
 
 {- Note [Do not add duplicate quantified instances]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this (Trac #15244):
+Consider this (#15244):
 
   f :: (C g, D g) => ....
   class S g => C g where ...
@@ -1549,7 +1549,7 @@ rewrite the inerts. But we *must* kick out the first one, to get:
           [D] fmv1 ~ fmv2
 
 and now improvement will discover [D] alpha ~ beta. This is important;
-eg in Trac #9587.
+eg in #9587.
 
 So in kickOutRewritable we look at all the tyvars of the
 CFunEqCan, including the fsk.
@@ -1808,7 +1808,7 @@ constructors match.
 
 Similarly, if we have a CHoleCan, we'd like to rewrite it with any
 Givens, to give as informative an error messasge as possible
-(Trac #12468, #11325).
+(#12468, #11325).
 
 Hence:
  * In the main simlifier loops in TcSimplify (solveWanteds,
@@ -2155,7 +2155,7 @@ where beta is a unification variable that has already been unified
 to () in an outer scope.  Then we can float the (alpha ~ Int) out
 just fine. So when deciding whether the givens contain an equality,
 we should canonicalise first, rather than just looking at the original
-givens (Trac #8644).
+givens (#8644).
 
 So we simply look at the inert, canonical Givens and see if there are
 any equalities among them, the calculation of has_given_eqs.  There
@@ -2207,7 +2207,7 @@ b) 'a' will have been completely substituted out in the inert set,
    so we can safely discard it.  Notably, it doesn't need to be
    returned as part of 'fsks'
 
-For an example, see Trac #9211.
+For an example, see #9211.
 
 See also TcUnify Note [Deeper level on the left] for how we ensure
 that the right variable is on the left of the equality when both are
@@ -2215,7 +2215,7 @@ tyvars.
 
 You might wonder whether the skokem really needs to be bound "in the
 very same implication" as the equuality constraint.
-(c.f. Trac #15009) Consider this:
+(c.f. #15009) Consider this:
 
   data S a where
     MkS :: (a ~ Int) => S a
@@ -2400,7 +2400,7 @@ Consider
 
 The call to 'g' gives rise to a Wanted constraint (?x::Int, C a).
 We must /not/ solve this from the Given (?x::Int, C a), because of
-the intervening binding for (?x::Int).  Trac #14218.
+the intervening binding for (?x::Int).  #14218.
 
 We deal with this by arranging that we always fail when looking up a
 tuple constraint that hides an implicit parameter. Not that this applies
diff --git a/compiler/typecheck/TcSigs.hs b/compiler/typecheck/TcSigs.hs
index 7b00165c523a48e6c00a869b2eac52d8b99a088e..d2e4a62546cd68a473ffc3297621b389779a294f 100644
--- a/compiler/typecheck/TcSigs.hs
+++ b/compiler/typecheck/TcSigs.hs
@@ -321,7 +321,7 @@ which is over-conservative
 
 Note [Pattern synonym signatures]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Pattern synonym signatures are surprisingly tricky (see Trac #11224 for example).
+Pattern synonym signatures are surprisingly tricky (see #11224 for example).
 In general they look like this:
 
    pattern P :: forall univ_tvs. req_theta
@@ -347,7 +347,7 @@ It's important that we solve /all/ the equalities in a pattern
 synonym signature, because we are going to zonk the signature to
 a Type (not a TcType), in TcPatSyn.tc_patsyn_finish, and that
 fails if there are un-filled-in coercion variables mentioned
-in the type (Trac #15694).
+in the type (#15694).
 
 The best thing is simply to use solveEqualities to solve all the
 equalites, rather than leaving them in the ambient constraints
@@ -379,7 +379,7 @@ tcPatSynSig name sig_ty
                  ; prov    <- tcHsContext hs_prov
                  ; body_ty <- tcHsOpenType hs_body_ty
                      -- A (literal) pattern can be unlifted;
-                     -- e.g. pattern Zero <- 0#   (Trac #12094)
+                     -- e.g. pattern Zero <- 0#   (#12094)
                  ; return (req, prov, body_ty) }
 
        ; let ungen_patsyn_ty = build_patsyn_type [] implicit_tvs univ_tvs
@@ -495,7 +495,7 @@ tcInstSig hs_sig@(PartialSig { psig_hs_ty = hs_ty
         --         two separate signatures.  Cloning here seems like
         --         the easiest way to do so, and is very similar to
         --         the tcInstType in the CompleteSig case
-        -- See Trac #14643
+        -- See #14643
        ; (subst, tvs') <- newMetaTyVarTyVars tvs
                          -- Why newMetaTyVarTyVars?  See TcBinds
                          -- Note [Quantified variables in partial type signatures]
@@ -687,7 +687,7 @@ Some wrinkles
    the "deeply" stuff may be too much, because it introduces lambdas,
    though I think it can be made to work without too much trouble.)
 
-2. We need to take care with type families (Trac #5821).  Consider
+2. We need to take care with type families (#5821).  Consider
       type instance F Int = Bool
       f :: Num a => a -> F a
       {-# SPECIALISE foo :: Int -> Bool #-}
@@ -754,7 +754,7 @@ tcSpecPrag poly_id prag@(SpecSig _ fun_name hs_tys inl)
 -- Example: SPECIALISE for a class method: the Name in the SpecSig is
 --          for the selector Id, but the poly_id is something like $cop
 -- However we want to use fun_name in the error message, since that is
--- what the user wrote (Trac #8537)
+-- what the user wrote (#8537)
   = addErrCtxt (spec_ctxt prag) $
     do  { warnIf (not (isOverloadedTy poly_ty || isInlinePragma inl))
                  (text "SPECIALISE pragma for non-overloaded function"
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index 418aa987e45cdec3c2fa65880d157eba9b3e2578..cd9d8585f5f0cd85c1a4515814d0df6dcbdbbfff 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -91,7 +91,7 @@ captureTopConstraints :: TcM a -> TcM (a, WantedConstraints)
 -- other things too) throws an exception without adding any error
 -- messages; it just puts the unsolved constraints back into the
 -- monad. See TcRnMonad Note [Constraints and errors]
--- Trac #16376 is an example of what goes wrong if you don't do this.
+-- #16376 is an example of what goes wrong if you don't do this.
 --
 -- NB: the caller should bring any environments into scope before
 -- calling this, so that the reportUnsolved has access to the most
@@ -321,7 +321,7 @@ than just accumulate an error message, for two reasons:
            <type> |> co-hole
     where co-hole is not filled in.  Eeek!  That un-filled-in
     hole actually causes GHC to crash with "fvProv falls into a hole"
-    See Trac #11563, #11520, #11516, #11399
+    See #11563, #11520, #11516, #11399
 
 So it's important to use 'checkNoErrs' here!
 
@@ -333,12 +333,12 @@ constraints.  But if we *don't* do defaulting we may report a whole
 lot of errors that would be solved by defaulting; these errors are
 quite spurious because fixing the single insoluble error means that
 defaulting happens again, which makes all the other errors go away.
-This is jolly confusing: Trac #9033.
+This is jolly confusing: #9033.
 
 So it seems better to always do type-class defaulting.
 
 However, always doing defaulting does mean that we'll do it in
-situations like this (Trac #5934):
+situations like this (#5934):
    run :: (forall s. GenST s) -> Int
    run = fromInteger 0
 We don't unify the return type of fromInteger with the given function
@@ -359,7 +359,7 @@ We may have a deeply buried constraint
 which we couldn't solve because of the kind incompatibility, and 'a' is free.
 Then when we default 'a' we can solve the constraint.  And we want to do
 that before starting in on type classes.  We MUST do it before reporting
-errors, because it isn't an error!  Trac #7967 was due to this.
+errors, because it isn't an error!  #7967 was due to this.
 
 Note [Top-level Defaulting Plan]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -510,7 +510,7 @@ Note [No defaulting in the ambiguity check]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 When simplifying constraints for the ambiguity check, we use
 solveWantedsAndDrop, not simpl_top, so that we do no defaulting.
-Trac #11947 was an example:
+#11947 was an example:
    f :: Num a => Int -> Int
 This is ambiguous of course, but we don't want to default the
 (Num alpha) constraint to (Num Int)!  Doing so gives a defaulting
@@ -623,11 +623,11 @@ If we fail to prove unsatisfiability we (arbitrarily) try just once to
 find superclasses, using try_harder.  Reason: we might have a type
 signature
    f :: F op (Implements push) => ..
-where F is a type function.  This happened in Trac #3972.
+where F is a type function.  This happened in #3972.
 
 We could do more than once but we'd have to have /some/ limit: in the
 the recursive case, we would go on forever in the common case where
-the constraints /are/ satisfiable (Trac #10592 comment:12!).
+the constraints /are/ satisfiable (#10592 comment:12!).
 
 For stratightforard situations without type functions the try_harder
 step does nothing.
@@ -780,7 +780,7 @@ simplifyInfer rhs_tclvl infer_mode sigs name_taus wanteds
 
        -- We must produce bindings for the psig_theta_vars, because we may have
        -- used them in evidence bindings constructed by solveWanteds earlier
-       -- Easiest way to do this is to emit them as new Wanteds (Trac #14643)
+       -- Easiest way to do this is to emit them as new Wanteds (#14643)
        ; ct_loc <- getCtLocM AnnOrigin Nothing
        ; let psig_wanted = [ CtWanted { ctev_pred = idType psig_theta_var
                                       , ctev_dest = EvVarDest psig_theta_var
@@ -880,11 +880,11 @@ That is the reason for the partitionBag in emitResidualConstraints,
 which takes the CoVars free in the inferred type, and pulls their
 constraints out.  (NB: this set of CoVars should be closed-over-kinds.)
 
-All rather subtle; see Trac #14584.
+All rather subtle; see #14584.
 
 Note [Add signature contexts as givens]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this (Trac #11016):
+Consider this (#11016):
   f2 :: (?x :: Int) => _
   f2 = ?x
 or this
@@ -934,7 +934,7 @@ If the monomorphism restriction does not apply, then we quantify as follows:
   not going to become further constrained), and re-simplify the
   candidate constraints.
 
-  Motivation for re-simplification (Trac #7857): imagine we have a
+  Motivation for re-simplification (#7857): imagine we have a
   constraint (C (a->b)), where 'a :: TYPE l1' and 'b :: TYPE l2' are
   not free in the envt, and instance forall (a::*) (b::*). (C a) => C
   (a -> b) The instance doesn't match while l1,l2 are polymorphic, but
@@ -991,7 +991,7 @@ decideQuantification infer_mode rhs_tclvl name_taus psigs candidates
                = pickQuantifiablePreds (mkVarSet qtvs) candidates
              -- NB: do /not/ run pickQuantifiablePreds over psig_theta,
              -- because we always want to quantify over psig_theta, and not
-             -- drop any of them; e.g. CallStack constraints.  c.f Trac #14658
+             -- drop any of them; e.g. CallStack constraints.  c.f #14658
 
              theta = mkMinimalBySCs id $  -- See Note [Minimize by Superclasses]
                      (psig_theta ++ quantifiable_candidates)
@@ -1056,13 +1056,13 @@ decideMonoTyVars infer_mode name_taus psigs candidates
              --
              -- (`minusVarSet` mono_tvs1`): a type variable is only
              --   "constrained" (so that the MR bites) if it is not
-             --   free in the environment (Trac #13785)
+             --   free in the environment (#13785)
              --
              -- (`delVarSetList` psig_qtvs): if the user has explicitly
              --   asked for quantification, then that request "wins"
              --   over the MR.  Note: do /not/ delete psig_qtvs from
              --   mono_tvs1, because mono_tvs1 cannot under any circumstances
-             --   be quantified (Trac #14479); see
+             --   be quantified (#14479); see
              --   Note [Quantification and partial signatures], Wrinkle 3, 4
 
              mono_tvs = mono_tvs2 `unionVarSet` constrained_tvs
@@ -1194,7 +1194,7 @@ decideQuantifiedTyVars mono_tvs name_taus psigs candidates
        --
        -- Keep the psig_tys first, so that candidateQTyVarsOfTypes produces
        -- them in that order, so that the final qtvs quantifies in the same
-       -- order as the partial signatures do (Trac #13524)
+       -- order as the partial signatures do (#13524)
        ; dv@DV {dv_kvs = cand_kvs, dv_tvs = cand_tvs} <- candidateQTyVarsOfTypes $
                                                          psig_tys ++ candidates ++ tau_tys
        ; let pick     = (`dVarSetIntersectVarSet` grown_tcvs)
@@ -1290,14 +1290,14 @@ sure to quantify over them.  This leads to several wrinkles:
   Bottom line: Try to quantify over any variable free in psig_theta,
   just like the tau-part of the type.
 
-* Wrinkle 3 (Trac #13482). Also consider
+* Wrinkle 3 (#13482). Also consider
     f :: forall a. _ => Int -> Int
     f x = if (undefined :: a) == undefined then x else 0
   Here we get an (Eq a) constraint, but it's not mentioned in the
   psig_theta nor the type of 'f'.  But we still want to quantify
   over 'a' even if the monomorphism restriction is on.
 
-* Wrinkle 4 (Trac #14479)
+* Wrinkle 4 (#14479)
     foo :: Num a => a -> a
     foo xxx = g xxx
       where
@@ -1340,7 +1340,7 @@ Reasons:
     - Avoid downstream errors
     - Do not perform an ambiguity test on a bogus type, which might well
       fail spuriously, thereby obfuscating the original insoluble error.
-      Trac #14000 is an example
+      #14000 is an example
 
 I tried an alternative approach: simply failM, after emitting the
 residual implication constraint; the exception will be caught in
@@ -1353,7 +1353,7 @@ NB that we must include *derived* errors in the check for insolubles.
 Example:
     (a::*) ~ Int#
 We get an insoluble derived error *~#, and we don't want to discard
-it before doing the isInsolubleWC test!  (Trac #8262)
+it before doing the isInsolubleWC test!  (#8262)
 
 Note [Default while Inferring]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1405,7 +1405,7 @@ to check the original wanted.
 Note [Avoid unnecessary constraint simplification]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     -------- NB NB NB (Jun 12) -------------
-    This note not longer applies; see the notes with Trac #4361.
+    This note not longer applies; see the notes with #4361.
     But I'm leaving it in here so we remember the issue.)
     ----------------------------------------
 When inferring the type of a let-binding, with simplifyInfer,
@@ -1768,7 +1768,7 @@ warnRedundantGivens (SigSkol ctxt _ _)
        _                           -> False
 
   -- To think about: do we want to report redundant givens for
-  -- pattern synonyms, PatSynSigSkol? c.f Trac #9953, comment:21.
+  -- pattern synonyms, PatSynSigSkol? c.f #9953, comment:21.
 warnRedundantGivens (InstSkol {}) = True
 warnRedundantGivens _             = False
 
@@ -1854,7 +1854,7 @@ Now d2 is available for solving.  But it may not be needed!  Usually
 such dead superclass selections will eventually be dropped as dead
 code, but:
 
- * It won't always be dropped (Trac #13032).  In the case of an
+ * It won't always be dropped (#13032).  In the case of an
    unlifted-equality superclass like d2 above, we generate
        case heq_sc d1 of d2 -> ...
    and we can't (in general) drop that case exrpession in case
@@ -1877,7 +1877,7 @@ This led to a remarkable 25% overall compiler allocation decrease in
 test T12227.
 
 But we don't get to discard all redundant equality superclasses, alas;
-see Trac #15205.
+see #15205.
 
 Note [Tracking redundant constraints]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1969,7 +1969,7 @@ works:
 
 ----- Shortcomings
 
-Consider (see Trac #9939)
+Consider (see #9939)
     f2 :: (Eq a, Ord a) => a -> a -> Bool
     -- Ord a redundant, but Eq a is reported
     f2 x y = (x == y)
@@ -1981,7 +1981,7 @@ really not easy to detect that!
 Note [Cutting off simpl_loop]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 It is very important not to iterate in simpl_loop unless there is a chance
-of progress.  Trac #8474 is a classic example:
+of progress.  #8474 is a classic example:
 
   * There's a deeply-nested chain of implication constraints.
        ?x:alpha => ?y1:beta1 => ... ?yn:betan => [W] ?x:Int
@@ -2117,12 +2117,12 @@ There is one caveat:
     float out of such implications, which meant it would happily infer
     non-principal types.)
 
-   HOWEVER (Trac #12797) in findDefaultableGroups we are not worried about
+   HOWEVER (#12797) in findDefaultableGroups we are not worried about
    the most-general type; and we /do/ want to float out of equalities.
    Hence the boolean flag to approximateWC.
 
 ------ Historical note -----------
-There used to be a second caveat, driven by Trac #8155
+There used to be a second caveat, driven by #8155
 
    2. We do not float out an inner constraint that shares a type variable
       (transitively) with one that is trapped by a skolem.  Eg
@@ -2141,7 +2141,7 @@ There used to be a second caveat, driven by Trac #8155
 
 But this transitive closure stuff gives rise to a complex rule for
 when defaulting actually happens, and one that was never documented.
-Moreover (Trac #12923), the more complex rule is sometimes NOT what
+Moreover (#12923), the more complex rule is sometimes NOT what
 you want.  So I simply removed the extra code to implement the
 contamination stuff.  There was zero effect on the testsuite (not even
 #8155).
@@ -2185,8 +2185,8 @@ To see (b), suppose the constraint is (C ((a :: OpenKind) -> Int)), and we
 have an instance (C ((x:*) -> Int)).  The instance doesn't match -- but it
 should!  If we don't solve the constraint, we'll stupidly quantify over
 (C (a->Int)) and, worse, in doing so skolemiseQuantifiedTyVar will quantify over
-(b:*) instead of (a:OpenKind), which can lead to disaster; see Trac #7332.
-Trac #7641 is a simpler example.
+(b:*) instead of (a:OpenKind), which can lead to disaster; see #7332.
+#7641 is a simpler example.
 
 Note [Promoting unification variables]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2482,7 +2482,7 @@ Here (1,2,3) are handled by the "seed_skols" calculation, and
 (4) is done by the transCloVarSet call.
 
 The possible dependence on givens, and evidence bindings, is more
-subtle than we'd realised at first.  See Trac #14584.
+subtle than we'd realised at first.  See #14584.
 
 
 *********************************************************************************
@@ -2541,7 +2541,7 @@ findDefaultableGroups (default_tys, (ovl_strings, extended_defaults)) wanteds
 
         -- Finds unary type-class constraints
         -- But take account of polykinded classes like Typeable,
-        -- which may look like (Typeable * (a:*))   (Trac #8931)
+        -- which may look like (Typeable * (a:*))   (#8931)
     find_unary :: Ct -> Either (Ct, Class, TyVar) Ct
     find_unary cc
         | Just (cls,tys)   <- getClassPredTys_maybe (ctPred cc)
diff --git a/compiler/typecheck/TcSplice.hs b/compiler/typecheck/TcSplice.hs
index 1aba34e802958407b7edcdce9b53e57f63297b43..c495a72d49995e4469610860a47790f7136c3eb0 100644
--- a/compiler/typecheck/TcSplice.hs
+++ b/compiler/typecheck/TcSplice.hs
@@ -572,7 +572,7 @@ tcTopSpliceExpr isTypedSplice tc_action
                    -- going to run this code, but we do an unsafe
                    -- coerce, so we get a seg-fault if, say we
                    -- splice a type into a place where an expression
-                   -- is expected (Trac #7276)
+                   -- is expected (#7276)
     setStage (Splice isTypedSplice) $
     do {    -- Typecheck the expression
          (expr', wanted) <- captureConstraints tc_action
@@ -753,7 +753,7 @@ runMeta' show_code ppr_hs run_and_convert expr
         -- recovered giving it type f :: forall a.a, it'd be very dodgy
         -- to carry ont.  Mind you, the staging restrictions mean we won't
         -- actually run f, but it still seems wrong. And, more concretely,
-        -- see Trac #5358 for an example that fell over when trying to
+        -- see #5358 for an example that fell over when trying to
         -- reify a function with a "?" kind in it.  (These don't occur
         -- in type-correct programs.
         ; failIfErrsM
@@ -888,7 +888,7 @@ like that.  Here's how it's processed:
 
  * 'qReport' forces the message to ensure any exception hidden in unevaluated
    thunk doesn't get into the bag of errors. Otherwise the following splice
-   will triger panic (Trac #8987):
+   will triger panic (#8987):
         $(fail undefined)
    See also Note [Concealed TH exceptions]
 
@@ -1270,11 +1270,11 @@ reifyInstances th_nm th_tys
         ; ty <- zonkTcTypeToType ty
                 -- Substitute out the meta type variables
                 -- In particular, the type might have kind
-                -- variables inside it (Trac #7477)
+                -- variables inside it (#7477)
 
         ; traceTc "reifyInstances" (ppr ty $$ ppr (tcTypeKind ty))
         ; case splitTyConApp_maybe ty of   -- This expands any type synonyms
-            Just (tc, tys)                 -- See Trac #7910
+            Just (tc, tys)                 -- See #7910
                | Just cls <- tyConClass_maybe tc
                -> do { inst_envs <- tcGetInstEnvs
                      ; let (matches, unifies, _) = lookupInstEnv False inst_envs cls tys
@@ -1790,7 +1790,7 @@ reifyFamilyInstance is_poly_tvs (FamInst { fi_flavor = flavor
 
       DataFamilyInst rep_tc ->
         do { let -- eta-expand lhs types, because sometimes data/newtype
-                 -- instances are eta-reduced; See Trac #9692
+                 -- instances are eta-reduced; See #9692
                  -- See Note [Eta reduction for data families] in FamInstEnv
                  (ee_tvs, ee_lhs, _) = etaExpandCoAxBranch branch
                  fam'     = reifyName fam
diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index 2c9a672e8e3eb0c8f253374f0a196010f56a236b..a3e39adfe4c2a34366dd6187e16288baa2650f4c 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -715,7 +715,7 @@ Associated types
 ~~~~~~~~~~~~~~~~
 For associated types everything above is determined by the
 associated-type declaration alone, ignoring the class header.
-Here is an example (Trac #15592)
+Here is an example (#15592)
   class C (a :: k) b where
     type F (x :: b a)
 
@@ -755,11 +755,11 @@ Design alternatives
 ~~~~~~~~~~~~~~~~~~~
 * For associated types we considered putting the class variables
   before the local variables, in a nod to the treatment for class
-  methods. But it got too compilicated; see Trac #15592, comment:21ff.
+  methods. But it got too compilicated; see #15592, comment:21ff.
 
 * We rigidly require the ordering above, even though we could be much more
   permissive. Relevant musings are at
-  https://ghc.haskell.org/trac/ghc/ticket/15743#comment:7
+  https://gitlab.haskell.org/ghc/ghc/issues/15743#note_161623
   The bottom line conclusion is that, if the user wants a different ordering,
   then can specify it themselves, and it is better to be predictable and dumb
   than clever and capricious.
@@ -850,13 +850,13 @@ There are some wrinkles
   TyVarTvs, and /not/ default them to Type. By definition a TyVarTv is
   not allowed to unify with a type; it must stand for a type
   variable. Hence the check in TcSimplify.defaultTyVarTcS, and
-  TcMType.defaultTyVar.  Here's another example (Trac #14555):
+  TcMType.defaultTyVar.  Here's another example (#14555):
      data Exp :: [TYPE rep] -> TYPE rep -> Type where
         Lam :: Exp (a:xs) b -> Exp xs (a -> b)
   We want to kind-generalise over the 'rep' variable.
-  Trac #14563 is another example.
+  #14563 is another example.
 
-* Duplicate type variables. Consider Trac #11203
+* Duplicate type variables. Consider #11203
     data SameKind :: k -> k -> *
     data Q (a :: k1) (b :: k2) c = MkQ (SameKind a b)
   Here we will unify k1 with k2, but this time doing so is an error,
@@ -884,7 +884,7 @@ There are some wrinkles
 
 Note [Tricky scoping in generaliseTcTyCon]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider Trac #16342
+Consider #16342
   class C (a::ka) x where
     cop :: D a x => x -> Proxy a -> Proxy a
     cop _ x = x :: Proxy (a::ka)
@@ -1557,7 +1557,7 @@ However we store the default rhs (Proxy x -> y) in F's TyCon, using
 F's own type variables, so we need to convert it to (Proxy a -> b).
 We do this by calling tcMatchTys to match them up.  This also ensures
 that x's kind matches a's and similarly for y and b.  The error
-message isn't great, mind you.  (Trac #11361 was caused by not doing a
+message isn't great, mind you.  (#11361 was caused by not doing a
 proper tcMatchTys here.)
 
 Recall also that the left-hand side of an associated type family
@@ -1823,7 +1823,7 @@ kcTyFamInstEqn tc_fam_tc
          bindExplicitTKBndrs_Q_Tv AnyKind (mb_expl_bndrs `orElse` []) $
          do { (_fam_app, res_kind) <- tcFamTyPats tc_fam_tc hs_pats
             ; tcCheckLHsType hs_rhs_ty res_kind }
-             -- Why "_Tv" here?  Consider (Trac #14066
+             -- Why "_Tv" here?  Consider (#14066
              --  type family Bar x y where
              --      Bar (x :: a) (y :: b) = Int
              --      Bar (x :: c) (y :: d) = Bool
@@ -2448,7 +2448,7 @@ checkValidDataCon needs), but the first three fields may be bogus if
 the return type isn't valid (the last equation for rejigConRes).
 
 This is better than an earlier solution which reduced the number of
-errors reported in one pass.  See Trac #7175, and #10836.
+errors reported in one pass.  See #7175, and #10836.
 -}
 
 -- Example
@@ -2721,7 +2721,7 @@ mkGADTVars tmpl_tvs dc_tvs subst
           _ -> choose (t_tv':univs) (mkEqSpec t_tv' r_ty : eqs)
                       (extendTvSubst t_sub t_tv (mkTyVarTy t_tv'))
                          -- We've updated the kind of t_tv,
-                         -- so add it to t_sub (Trac #14162)
+                         -- so add it to t_sub (#14162)
                       r_sub t_tvs
             where
               t_tv' = updateTyVarKind (substTy t_sub) t_tv
@@ -2838,11 +2838,11 @@ TyCon of the right kind, but with no interesting behaviour
 where Fun is a type family of arity 1.  The RHS is invalid, but we
 want to go on checking validity of subsequent type declarations.
 So we replace T with an abstract TyCon which will do no harm.
-See indexed-types/should_fail/BadSock and Trac #10896
+See indexed-types/should_fail/BadSock and #10896
 
 Some notes:
 
-* We must make fakes for promoted DataCons too. Consider (Trac #15215)
+* We must make fakes for promoted DataCons too. Consider (#15215)
       data T a = MkT ...
       data S a = ...T...MkT....
   If there is an error in the definition of 'T' we add a "fake type
@@ -3162,7 +3162,7 @@ checkValidClass cls
 
         -- Check that the class is unary, unless multiparameter type classes
         -- are enabled; also recognize deprecated nullary type classes
-        -- extension (subsumed by multiparameter type classes, Trac #8993)
+        -- extension (subsumed by multiparameter type classes, #8993)
         ; checkTc (multi_param_type_classes || cls_arity == 1 ||
                     (nullary_type_classes && cls_arity == 0))
                   (classArityErr cls_arity cls)
@@ -3238,7 +3238,7 @@ checkValidClass cls
                         -- Check that the associated type mentions at least
                         -- one of the class type variables
                         -- The check is disabled for nullary type classes,
-                        -- since there is no possible ambiguity (Trac #10020)
+                        -- since there is no possible ambiguity (#10020)
 
              -- Check that any default declarations for associated types are valid
            ; whenIsJust m_dflt_rhs $ \ (rhs, loc) ->
@@ -3253,7 +3253,7 @@ checkValidClass cls
     -- E.g for   class C a where
     --             default op :: forall b. (a~b) => blah
     -- we do not want to do an ambiguity check on a type with
-    -- a free TyVar 'a' (Trac #11608).  See TcType
+    -- a free TyVar 'a' (#11608).  See TcType
     -- Note [TyVars and TcTyVars during type checking] in TcType
     -- Hence the mkDefaultMethodType to close the type.
     check_dm ctxt sel_id vanilla_cls_pred vanilla_tau
@@ -3346,7 +3346,7 @@ where the method type constrains only the class variable(s).  (The extension
 we should not reject
   class C a where
     op :: (?x::Int) => a -> a
-as pointed out in Trac #11793. So the test here rejects the program if
+as pointed out in #11793. So the test here rejects the program if
   * -XConstrainedClassMethods is off
   * the tyvars of the constraint are non-empty
   * all the tyvars are class tyvars, none are locally quantified
@@ -3363,13 +3363,13 @@ representative example:
     meth :: D a => ()
   class C a => D a
 
-This fixes Trac #9415, #9739
+This fixes #9415, #9739
 
 Note [Default method type signatures must align]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 GHC enforces the invariant that a class method's default type signature
 must "align" with that of the method's non-default type signature, as per
-GHC Trac #12918. For instance, if you have:
+GHC #12918. For instance, if you have:
 
   class Foo a where
     bar :: forall b. Context => a -> b
@@ -3498,7 +3498,7 @@ signature for `each`, it would return (a -> f b) -> s -> f t like we desired.
 
 Note [Checking partial record field]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This check checks the partial record field selector, and warns (Trac #7169).
+This check checks the partial record field selector, and warns (#7169).
 
 For example:
 
@@ -3758,7 +3758,7 @@ badDataConTyCon data_con res_ty_tmpl actual_res_ty
        2 (text "instead of an instance of its parent type" <+> quotes (ppr res_ty_tmpl))
   where
     -- This suggestion is useful for suggesting how to correct code like what
-    -- was reported in Trac #12087:
+    -- was reported in #12087:
     --
     --   data F a where
     --     MkF :: Ord a => Eq a => a -> F a
diff --git a/compiler/typecheck/TcTyDecls.hs b/compiler/typecheck/TcTyDecls.hs
index e40fd3abf493cb5d879c3b346e1fa40a3b7579f6..205771b2db67f55fea29acf4b9c32dc858c87035 100644
--- a/compiler/typecheck/TcTyDecls.hs
+++ b/compiler/typecheck/TcTyDecls.hs
@@ -792,7 +792,7 @@ mkDefaultMethodType cls _   (GenericDM dm_ty) = mkSigmaTy tv_bndrs [pred] dm_ty
      --     used in code generated by the fill-in for missing
      --     methods in instances (TcInstDcls.mkDefMethBind), and
      --     then typechecked.  So we need the right visibilty info
-     --     (Trac #13998)
+     --     (#13998)
 
 {-
 ************************************************************************
@@ -805,7 +805,7 @@ mkDefaultMethodType cls _   (GenericDM dm_ty) = mkSigmaTy tv_bndrs [pred] dm_ty
 {-
 Note [Default method Ids and Template Haskell]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider this (Trac #4169):
+Consider this (#4169):
    class Numeric a where
      fromIntegerNum :: a
      fromIntegerNum = ...
diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs
index d4bac5c12b7315332aba987293a64d951718a9b4..14807da8eb4b5e8f827a6ae30e86aa4d98e45e2b 100644
--- a/compiler/typecheck/TcType.hs
+++ b/compiler/typecheck/TcType.hs
@@ -325,7 +325,7 @@ in addition to type variables! As a result, there are some places in TcType
 where we must take care to check that a variable is a _type_ variable (using
 isTyVar) before calling tcTyVarDetails--a partial function that is not defined
 for coercion variables--on the variable. Failing to do so led to
-GHC Trac #12785.
+GHC #12785.
 -}
 
 -- See Note [TcTyVars and TyVars in the typechecker]
@@ -863,7 +863,7 @@ promoteSkolemsX tclvl = mapAccumL (promoteSkolemX tclvl)
 --     (F, [Int]), not (F, [Int,Bool])
 --
 -- This is important for its use in deciding termination of type
--- instances (see Trac #11581).  E.g.
+-- instances (see #11581).  E.g.
 --    type instance G [Int] = ...(F Int <big type>)...
 -- we don't need to take <big type> into account when asking if
 -- the calls on the RHS are smaller than the LHS
@@ -970,7 +970,7 @@ which type variables are mentioned in a type.  It only matters
 occasionally -- see the calls to exactTyCoVarsOfType.
 
 Historical note: years and years ago this function was used during
-generalisation -- see Trac #1813.  But that code has long since died.
+generalisation -- see #1813.  But that code has long since died.
 -}
 
 exactTyCoVarsOfType :: Type -> TyCoVarSet
@@ -1077,7 +1077,7 @@ free in [G] b ~R f a.  But because the role of a type variable ('f' in
 this case) is nominal, the work item can't actually rewrite the inert item.
 Moreover, if we were to kick out the inert item the exact same situation
 would re-occur and we end up with an infinite loop in which each kicks
-out the other (Trac #14363).
+out the other (#14363).
 -}
 
 {-
@@ -1813,7 +1813,7 @@ pickQuantifiablePreds
 -- quantified over, given the type variables that are being quantified
 pickQuantifiablePreds qtvs theta
   = let flex_ctxt = True in  -- Quantify over non-tyvar constraints, even without
-                             -- -XFlexibleContexts: see Trac #10608, #10351
+                             -- -XFlexibleContexts: see #10608, #10351
          -- flex_ctxt <- xoptM Opt_FlexibleContexts
     mapMaybe (pick_me flex_ctxt) theta
   where
@@ -1852,7 +1852,7 @@ pickQuantifiablePreds qtvs theta
       = tyCoVarsOfTypes tys `intersectsVarSet` qtvs
         && (checkValidClsArgs flex_ctxt cls tys)
            -- Only quantify over predicates that checkValidType
-           -- will pass!  See Trac #10351.
+           -- will pass!  See #10351.
 
     -- See Note [Quantifying over equality constraints]
     quantify_equality NomEq  ty1 ty2 = quant_fun ty1 || quant_fun ty2
@@ -2557,11 +2557,11 @@ this actually is. There are two main tricks:
 
  2. Once we get into an implicit parameter or equality we
     can't get back to a class constraint, so it's safe
-    to say "size 0".  See Trac #4200.
+    to say "size 0".  See #4200.
 
 NB: we don't want to detect PredTypes in sizeType (and then call
 sizePred on them), or we might get an infinite loop if that PredType
-is irreducible. See Trac #5581.
+is irreducible. See #5581.
 -}
 
 type TypeSize = IntWithInf
diff --git a/compiler/typecheck/TcUnify.hs b/compiler/typecheck/TcUnify.hs
index 8a3e03c09ebba419d65b5e64c23298ae14f2ed7d..29aff60921dd1e5d5659962a54f476ed6c47246c 100644
--- a/compiler/typecheck/TcUnify.hs
+++ b/compiler/typecheck/TcUnify.hs
@@ -174,7 +174,7 @@ matchExpectedFunTys herald arity orig_ty thing_inside
        -- However unlike the meta-tyvar case, we are sure that the
        -- number of arguments doesn't match arity of the original
        -- type, so we can add a bit more context to the error message
-       -- (cf Trac #7869).
+       -- (cf #7869).
        --
        -- It is not always an error, because specialized type may have
        -- different arity, for example:
@@ -184,7 +184,7 @@ matchExpectedFunTys herald arity orig_ty thing_inside
        -- > f2 = undefined
        --
        -- But in that case we add specialized type into error context
-       -- anyway, because it may be useful. See also Trac #9605.
+       -- anyway, because it may be useful. See also #9605.
     go acc_arg_tys n ty = addErrCtxtM mk_ctxt $
                           defer acc_arg_tys n (mkCheckExpType ty)
 
@@ -302,7 +302,7 @@ matchActualFunTysPart herald ct_orig mb_thing arity orig_ty
        -- However unlike the meta-tyvar case, we are sure that the
        -- number of arguments doesn't match arity of the original
        -- type, so we can add a bit more context to the error message
-       -- (cf Trac #7869).
+       -- (cf #7869).
        --
        -- It is not always an error, because specialized type may have
        -- different arity, for example:
@@ -312,7 +312,7 @@ matchActualFunTysPart herald ct_orig mb_thing arity orig_ty
        -- > f2 = undefined
        --
        -- But in that case we add specialized type into error context
-       -- anyway, because it may be useful. See also Trac #9605.
+       -- anyway, because it may be useful. See also #9605.
     go n acc_args ty = addErrCtxtM (mk_ctxt (reverse acc_args) ty) $
                        defer n ty
 
@@ -399,7 +399,7 @@ matchExpectedTyConApp tc orig_ty
     -- Then we don't want to instantiate T's data constructors with
     --    (a::*) ~ Maybe
     -- because that'll make types that are utterly ill-kinded.
-    -- This happened in Trac #7368
+    -- This happened in #7368
     defer
       = do { (_, arg_tvs) <- newMetaTyVars (tyConTyVars tc)
            ; traceTc "matchExpectedTyConApp" (ppr tc $$ ppr (tyConTyVars tc) $$ ppr arg_tvs)
@@ -517,7 +517,7 @@ tcSubTypeDS_NC_O, and is the sole reason for the WpFun form of
 HsWrapper.
 
 Another powerful reason for doing this co/contra stuff is visible
-in Trac #9569, involving instantiation of constraint variables,
+in #9569, involving instantiation of constraint variables,
 and again involving eta-expansion.
 
 Wrinkle 3: Note [Higher rank types]
@@ -714,7 +714,7 @@ These examples are all fine:
      ty_expected isn't really polymorphic
 
 If we prematurely go to equality we'll reject a program we should
-accept (e.g. Trac #13752).  So the test (which is only to improve
+accept (e.g. #13752).  So the test (which is only to improve
 error message) is very conservative:
  * ty_actual is /definitely/ monomorphic
  * ty_expected is /definitely/ polymorphic
@@ -751,7 +751,7 @@ tc_sub_type_ds eq_orig inst_orig ctxt ty_actual ty_expected
     -- which, in the impredicative case unified  alpha := ty_a
     -- where th_a is a polytype.  Not only is this probably bogus (we
     -- simply do not have decent story for impredicative types), but it
-    -- caused Trac #12616 because (also bizarrely) 'deriving' code had
+    -- caused #12616 because (also bizarrely) 'deriving' code had
     -- -XImpredicativeTypes on.  I deleted the entire case.
 
     go (FunTy { ft_af = VisArg, ft_arg = act_arg, ft_res = act_res })
@@ -1003,7 +1003,7 @@ promoteTcType dest_lvl ty
 
 {- Note [Promoting a type]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider (Trac #12427)
+Consider (#12427)
 
   data T where
     MkT :: (Int -> Int) -> a -> T
@@ -1213,7 +1213,7 @@ alwaysBuildImplication :: SkolemInfo -> Bool
 alwaysBuildImplication _ = False
 
 {-  Commmented out for now while I figure out about error messages.
-    See Trac #14185
+    See #14185
 
 alwaysBuildImplication (SigSkol ctxt _ _)
   = case ctxt of
@@ -1269,7 +1269,7 @@ take care:
   top-level unlifted bindings, which are verboten. This only matters
   at top level, so we check for that
   See also Note [Deferred errors for coercion holes] in TcErrors.
-  cf Trac #14149 for an example of what goes wrong.
+  cf #14149 for an example of what goes wrong.
 
 * If you have
      f :: Int;  f = f_blah
@@ -1280,7 +1280,7 @@ take care:
       [W] C Int b1    -- from f_blah
       [W] C Int b2    -- from g_blan
   and fundpes can yield [D] b1 ~ b2, even though the two functions have
-  literally nothing to do with each other.  Trac #14185 is an example.
+  literally nothing to do with each other.  #14185 is an example.
   Building an implication keeps them separage.
 -}
 
@@ -1409,7 +1409,7 @@ uType t_or_k origin orig_ty1 orig_ty2
         --   type Foo = Int
         -- and we try to unify  Foo ~ Bool
         -- we'll end up saying "can't match Foo with Bool"
-        -- rather than "can't match "Int with Bool".  See Trac #4535.
+        -- rather than "can't match "Int with Bool".  See #4535.
     go ty1 ty2
       | Just ty1' <- tcView ty1 = go ty1' ty2
       | Just ty2' <- tcView ty2 = go ty1  ty2'
@@ -1509,7 +1509,7 @@ are guaranteed equal length.  But they aren't. Consider matching
         w (T x) ~ Foo (T x y)
 We do match (w ~ Foo) first, but in some circumstances we simply create
 a deferred constraint; and then go ahead and match (T x ~ T x y).
-This came up in Trac #3950.
+This came up in #3950.
 
 So either
    (a) either we must check for identical argument kinds
@@ -1768,7 +1768,7 @@ Wanteds and Givens, but either way, deepest wins!  Simple.
   skolems, so it's important that skolems have (accurate) level
   numbers.
 
-See Trac #15009 for an further analysis of why "deepest on the left"
+See #15009 for an further analysis of why "deepest on the left"
 is a good plan.
 
 Note [Fmv Orientation Invariant]
@@ -1824,7 +1824,7 @@ then we'll reduce the second constraint to
 and then replace all uses of 'a' with fsk.  That's bad because
 in error messages instead of saying 'a' we'll say (F [a]).  In all
 places, including those where the programmer wrote 'a' in the first
-place.  Very confusing!  See Trac #7862.
+place.  Very confusing!  See #7862.
 
 Solution: re-orient a~fsk to fsk~a, so that we preferentially eliminate
 the fsk.
@@ -1852,7 +1852,7 @@ an existing inert constraint, and hence we are less likely to be forced
 into kicking out and rewriting inert constraints.
 
 This is a performance optimisation only.  It turns out to fix
-Trac #14723 all by itself, but clearly not reliably so!
+#14723 all by itself, but clearly not reliably so!
 
 It's simple to implement (see nicer_to_update_tv2 in swapOverTyVars).
 But, to my surprise, it didn't seem to make any significant difference
diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index e7ca2e2caa7268281ab6b9568602f31588dc554d..b267547dd7b2f212262c7da70f064a84ff2a8b38 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -157,7 +157,7 @@ in the forall case of check_type, but that had two bad consequences:
   * If we try to check for ambiguity of a nested forall like
     (forall a. Eq a => b), the implication constraint doesn't bind
     all the skolems, which results in "No skolem info" in error
-    messages (see Trac #10432).
+    messages (see #10432).
 
 To avoid this, we call checkAmbiguity once, at the top, in checkValidType.
 (I'm still a bit worried about unbound skolems when the type mentions
@@ -237,7 +237,7 @@ checkUserTypeError :: Type -> TcM ()
 -- Check to see if the type signature mentions "TypeError blah"
 -- anywhere in it, and fail if so.
 --
--- Very unsatisfactorily (Trac #11144) we need to tidy the type
+-- Very unsatisfactorily (#11144) we need to tidy the type
 -- because it may have come from an /inferred/ signature, not a
 -- user-supplied one.  This is really only a half-baked fix;
 -- the other errors in checkValidType don't do tidying, and so
@@ -269,7 +269,7 @@ In a few places we do not want to check a user-specified type for ambiguity
   It may be that when we /use/ T, we'll give an 'a' or 'b' that somehow
   cure the ambiguity.  So we defer the ambiguity check to the use site.
 
-  There is also an implementation reason (Trac #11608).  In the RHS of
+  There is also an implementation reason (#11608).  In the RHS of
   a type synonym we don't (currently) instantiate 'a' and 'b' with
   TcTyVars before calling checkValidType, so we get asertion failures
   from doing an ambiguity check on a type with TyVars in it.  Fixing this
@@ -417,7 +417,7 @@ Note [Higher rank types]
 ~~~~~~~~~~~~~~~~~~~~~~~~
 Technically
             Int -> forall a. a->a
-is still a rank-1 type, but it's not Haskell 98 (Trac #5957).  So the
+is still a rank-1 type, but it's not Haskell 98 (#5957).  So the
 validity checker allow a forall after an arrow only if we allow it
 before -- that is, with Rank2Types or RankNTypes
 -}
@@ -549,7 +549,7 @@ exclusively `NoExpand` 100% of the time:
   If we expand `Bar Foo` immediately, we'll miss the fact that the `Foo` type
   synonyms is unsaturated.
 * If one never expands and only checks the arguments, then one can miss
-  erroneous programs like the one in Trac #16059:
+  erroneous programs like the one in #16059:
 
     type Foo b = Eq b => b
     f :: forall b (a :: Foo b). Int
@@ -927,7 +927,7 @@ checkConstraintsOK ve theta ty
   | allConstraintsAllowed (ve_ctxt ve) = return ()
   | otherwise
   = -- We are in a kind, where we allow only equality predicates
-    -- See Note [Constraints in kinds] in TyCoRep, and Trac #16263
+    -- See Note [Constraints in kinds] in TyCoRep, and #16263
     checkTcM (all isEqPred theta) $
     constraintTyErr (ve_tidy_env ve) ty
 
@@ -1015,7 +1015,7 @@ then when we saw
      (e :: (?x::Int) => t)
 it would be unclear how to discharge all the potential uses of the ?x
 in e.  For example, a constraint Foo [Int] might come out of e, and
-applying the instance decl would show up two uses of ?x.  Trac #8912.
+applying the instance decl would show up two uses of ?x.  #8912.
 -}
 
 checkValidTheta :: UserTypeCtxt -> ThetaType -> TcM ()
@@ -1055,7 +1055,7 @@ the context.
 
 But we record, in 'under_syn', whether we have looked under a synonym
 to avoid requiring language extensions at the use site.  Main example
-(Trac #9838):
+(#9838):
 
    {-# LANGUAGE ConstraintKinds #-}
    module A where
@@ -1093,7 +1093,7 @@ check_pred_help :: Bool    -- True <=> under a type synonym
                 -> PredType -> TcM ()
 check_pred_help under_syn env dflags ctxt pred
   | Just pred' <- tcView pred  -- Switch on under_syn when going under a
-                                 -- synonym (Trac #9838, yuk)
+                                 -- synonym (#9838, yuk)
   = check_pred_help True env dflags ctxt pred'
 
   | otherwise  -- A bit like classifyPredType, but not the same
@@ -1158,7 +1158,7 @@ check_irred_pred under_syn env dflags ctxt pred
   = do { -- If it looks like (x t1 t2), require ConstraintKinds
          --   see Note [ConstraintKinds in predicates]
          -- But (X t1 t2) is always ok because we just require ConstraintKinds
-         -- at the definition site (Trac #9838)
+         -- at the definition site (#9838)
         failIfTcM (not under_syn && not (xopt LangExt.ConstraintKinds dflags)
                                 && hasTyVarHead pred)
                   (predIrredErr env pred)
@@ -1179,7 +1179,7 @@ check_irred_pred under_syn env dflags ctxt pred
 {- Note [ConstraintKinds in predicates]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Don't check for -XConstraintKinds under a type synonym, because that
-was done at the type synonym definition site; see Trac #9838
+was done at the type synonym definition site; see #9838
 e.g.   module A where
           type C a = (Eq a, Ix a)   -- Needs -XConstraintKinds
        module B where
@@ -1281,7 +1281,7 @@ Note [Instance and Given overlap].  As that Note discusses, for the
 most part the clever stuff in TcInteract means that we don't use a
 top-level instance if a local Given might fire, so there is no
 fragility. But if we /infer/ the type of a local let-binding, things
-can go wrong (Trac #11948 is an example, discussed in the Note).
+can go wrong (#11948 is an example, discussed in the Note).
 
 So this warning is switched on only if we have NoMonoLocalBinds; in
 that case the warning discourages users from writing simplifiable
@@ -1291,7 +1291,7 @@ The warning only fires if the constraint in the signature
 matches the top-level instances in only one way, and with no
 unifiers -- that is, under the same circumstances that
 TcInteract.matchInstEnv fires an interaction with the top
-level instances.  For example (Trac #13526), consider
+level instances.  For example (#13526), consider
 
   instance {-# OVERLAPPABLE #-} Eq (T a) where ...
   instance                   Eq (T Char) where ..
@@ -1325,7 +1325,7 @@ okIPCtxt SigmaCtxt              = True
 okIPCtxt (DataTyCtxt {})        = True
 okIPCtxt (PatSynCtxt {})        = True
 okIPCtxt (TySynCtxt {})         = True   -- e.g.   type Blah = ?x::Int
-                                         -- Trac #11466
+                                         -- #11466
 
 okIPCtxt (KindSigCtxt {})       = False
 okIPCtxt (ClassSCCtxt {})       = False
@@ -1420,7 +1420,7 @@ tyConArityErr :: TyCon -> [TcType] -> SDoc
 -- For type-constructor arity errors, be careful to report
 -- the number of /visible/ arguments required and supplied,
 -- ignoring the /invisible/ arguments, which the user does not see.
--- (e.g. Trac #10516)
+-- (e.g. #10516)
 tyConArityErr tc tks
   = arityErr (ppr (tyConFlavour tc)) (tyConName tc)
              tc_type_arity tc_type_args
@@ -1484,7 +1484,7 @@ entirely different meaning. Suppose in M.hsig we see
 
 That says that any module satisfying M.hsig must provide a KnownNat
 instance for T.  We absolultely need that instance when compiling a
-module that imports M.hsig: see Trac #15379 and
+module that imports M.hsig: see #15379 and
 Note [Fabricating Evidence for Literals in Backpack] in ClsInst.
 
 Hence, checkValidInstHead accepts a user-written instance declaration
@@ -1632,7 +1632,7 @@ tcInstHeadTyAppAllTyVars :: Type -> Bool
 tcInstHeadTyAppAllTyVars ty
   | Just (tc, tys) <- tcSplitTyConApp_maybe (dropCasts ty)
   = ok (filterOutInvisibleTypes tc tys)  -- avoid kinds
-  | LitTy _ <- ty = True  -- accept type literals (Trac #13833)
+  | LitTy _ <- ty = True  -- accept type literals (#13833)
   | otherwise
   = False
   where
@@ -1742,7 +1742,7 @@ It checks for three things
        newtype T (c :: * -> * -> *) a b = MkT (c a b)
        instance Category c => Category (T c) where ...
     since the first argument to Category is a non-visible *, which sizeTypes
-    would count as a constructor! See Trac #11833.
+    would count as a constructor! See #11833.
 
   * Also check for a bizarre corner case, when the derived instance decl
     would look like
@@ -1750,7 +1750,7 @@ It checks for three things
     Note that 'b' isn't a parameter of T.  This gives rise to all sorts of
     problems; in particular, it's hard to compare solutions for equality
     when finding the fixpoint, and that means the inferContext loop does
-    not converge.  See Trac #5287.
+    not converge.  See #5287.
 
 Note [Equality class instances]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1790,7 +1790,7 @@ validDerivPred tv_set pred
 {- Note [Instances and constraint synonyms]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Currently, we don't allow instances for constraint synonyms at all.
-Consider these (Trac #13267):
+Consider these (#13267):
   type C1 a = Show (a -> Bool)
   instance C1 Int where    -- I1
     show _ = "ur"
@@ -1901,13 +1901,13 @@ checkInstTermination theta head_pred
    check :: VarSet -> PredType -> TcM ()
    check foralld_tvs pred
      = case classifyPredType pred of
-         EqPred {}    -> return ()  -- See Trac #4200.
+         EqPred {}    -> return ()  -- See #4200.
          IrredPred {} -> check2 foralld_tvs pred (sizeType pred)
          ClassPred cls tys
            | isTerminatingClass cls
            -> return ()
 
-           | isCTupleClass cls  -- Look inside tuple predicates; Trac #8359
+           | isCTupleClass cls  -- Look inside tuple predicates; #8359
            -> check_preds foralld_tvs tys
 
            | otherwise          -- Other ClassPreds
@@ -1965,7 +1965,7 @@ Are these OK?
 No: the type family in the instance head might blow up to an
 arbitrarily large type, depending on how 'a' is instantiated.
 So we require UndecidableInstances if we have a type family
-in the instance head.  Trac #15172.
+in the instance head.  #15172.
 
 Note [Invisible arguments and termination]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1978,7 +1978,7 @@ in the instance head and constraints. Question: Do we look at
 
 I think both will ensure termination, provided we are consistent.
 Currently we are /not/ consistent, which is really a bug.  It's
-described in Trac #15177, which contains a number of examples.
+described in #15177, which contains a number of examples.
 The suspicious bits are the calls to filterOutInvisibleTypes.
 -}
 
@@ -2084,7 +2084,7 @@ checkValidTyFamEqn fam_tc qvs typats rhs
          --             type instance F Int#             = ...
          --             type instance F Int              = forall a. a->a
          --             type instance F Int              = Int#
-         -- See Trac #9357
+         -- See #9357
        ; checkValidMonoType rhs
 
          -- We have a decidable instance unless otherwise permitted
@@ -2177,7 +2177,7 @@ checkFamPatBinders fam_tc qtvs pats rhs
            2 (vcat [ text "but not" <+> what2 <+> text "the family instance"
                    , mk_extra tvs ])
 
-    -- mk_extra: Trac #7536: give a decent error message for
+    -- mk_extra: #7536: give a decent error message for
     --         type T a = Int
     --         type instance F (T a) = a
     mk_extra tvs = ppWhen (any (`elemVarSet` dodgy_tvs) tvs) $
@@ -2336,7 +2336,7 @@ so inside of GHC, the instance looks closer to this:
     type instance T @(Maybe a) = (Nothing :: Maybe a)
 
 Here, we can see that `a` really is bound by a LHS type pattern, so `a` is in
-fact not unbound. Contrast that with this example (Trac #13985)
+fact not unbound. Contrast that with this example (#13985)
 
     type instance T = Proxy (Nothing :: Maybe a)
 
@@ -2365,7 +2365,7 @@ obvious, one can also write the instance like so:
 Note [Matching in the consistent-instantation check]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Matching the class-instance header to family-instance tyvars is
-tricker than it sounds.  Consider (Trac #13972)
+tricker than it sounds.  Consider (#13972)
     class C (a :: k) where
       type T k :: Type
     instance C Left where
@@ -2380,7 +2380,7 @@ from the class-instance header.
 We track the lexically-scoped type variables from the
 class-instance header in ai_tyvars.
 
-Here's another example (Trac #14045a)
+Here's another example (#14045a)
     class C (a :: k) where
       data S (a :: k)
     instance C (z :: Bool) where
@@ -2398,7 +2398,7 @@ somewhere deep inside the type
 
 Note [Checking consistent instantiation]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-See Trac #11450 for background discussion on this check.
+See #11450 for background discussion on this check.
 
   class C a b where
     type T a x b
@@ -2420,7 +2420,7 @@ Note that
     instance C [p] Int
       type T [q] y Int = ...
   But from GHC 8.2 onwards, we don't.  It's much simpler this way.
-  See Trac #11450.
+  See #11450.
 
 * When the class variable isn't used on the RHS of the type instance,
   it's tempting to allow wildcards, thus
@@ -2467,7 +2467,7 @@ Note that
       CAux (Either x y) = x -> y
 
   We decided that this restriction wasn't buying us much, so we opted not
-  to pursue that design (see also GHC Trac #13398).
+  to pursue that design (see also GHC #13398).
 
 Implementation
   * Form the mini-envt from the class type variables a,b
@@ -2802,7 +2802,7 @@ sizeTyConAppArgs _tc tys = sizeTypes tys -- (filterOutInvisibleTypes tc tys)
 -- We are considering whether class constraints terminate.
 -- Equality constraints and constraints for the implicit
 -- parameter class always terminate so it is safe to say "size 0".
--- See Trac #4200.
+-- See #4200.
 sizePred :: PredType -> Int
 sizePred ty = goClass ty
   where
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index 254f76ca3154f4bc39dd6ccf01d4c39d8859393a..8e4efbac50b750931080c70f691c3367b3f1f43c 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -209,7 +209,7 @@ pprCoAxBranchLHS :: TyCon -> CoAxBranch -> SDoc
 --   a conflict between equations (FamInst.conflictInstErr)
 -- For type families the RHS is important; for data families not so.
 --   Indeed for data families the RHS is a mysterious internal
---   type constructor, so we suppress it (Trac #14179)
+--   type constructor, so we suppress it (#14179)
 -- See FamInstEnv Note [Family instance overlap conflicts]
 pprCoAxBranchLHS = ppr_co_ax_branch pp_rhs
   where
@@ -342,7 +342,7 @@ Notes:
   where co :: (forall a. ty) ~ (ty1 -> ty2)
   Here 'co' is insoluble, but we don't want to crash in decoposePiCos.
   So decomposePiCos carefully tests both sides of the coercion to check
-  they are both foralls or both arrows.  Not doing this caused Trac #15343.
+  they are both foralls or both arrows.  Not doing this caused #15343.
 -}
 
 decomposePiCos :: HasDebugCallStack
@@ -718,7 +718,7 @@ mkAppCo co arg
 
   | Just (ty1, r) <- isReflCo_maybe co
   , Just (tc, tys) <- splitTyConApp_maybe ty1
-    -- Expand type synonyms; a TyConAppCo can't have a type synonym (Trac #9102)
+    -- Expand type synonyms; a TyConAppCo can't have a type synonym (#9102)
   = mkTyConAppCo r tc (zip_roles (tyConRolesX r tc) tys)
   where
     zip_roles (r1:_)  []            = [downgradeRole r1 Nominal arg]
@@ -2292,10 +2292,10 @@ Suppose we need `coercionKind (ForAllCo a1 (ForAllCo a2 ... (ForAllCo an
 co)...) )`.   We do not want to perform `n` single-type-variable
 substitutions over the kind of `co`; rather we want to do one substitution
 which substitutes for all of `a1`, `a2` ... simultaneously.  If we do one
-at a time we get the performance hole reported in Trac #11735.
+at a time we get the performance hole reported in #11735.
 
 Solution: gather up the type variables for nested `ForAllCos`, and
-substitute for them all at once.  Remarkably, for Trac #11735 this single
+substitute for them all at once.  Remarkably, for #11735 this single
 change reduces /total/ compile time by a factor of more than ten.
 
 -}
@@ -2334,7 +2334,7 @@ coercionRole = go
 {-
 Note [Nested InstCos]
 ~~~~~~~~~~~~~~~~~~~~~
-In Trac #5631 we found that 70% of the entire compilation time was
+In #5631 we found that 70% of the entire compilation time was
 being spent in coercionKind!  The reason was that we had
    (g @ ty1 @ ty2 .. @ ty100)    -- The "@s" are InstCos
 where
@@ -2342,7 +2342,7 @@ where
 If we deal with the InstCos one at a time, we'll do this:
    1.  Find the kind of (g @ ty1 .. @ ty99) : forall a100. phi'
    2.  Substitute phi'[ ty100/a100 ], a single tyvar->type subst
-But this is a *quadratic* algorithm, and the blew up Trac #5631.
+But this is a *quadratic* algorithm, and the blew up #5631.
 So it's very important to do the substitution simultaneously;
 cf Type.piResultTys (which in fact we call here).
 
diff --git a/compiler/types/FamInstEnv.hs b/compiler/types/FamInstEnv.hs
index 88f64bfc873efe147c0a1f453835ffe63f868744..8387f112cbcd495175ffeeb5b6c7acd57ec81271 100644
--- a/compiler/types/FamInstEnv.hs
+++ b/compiler/types/FamInstEnv.hs
@@ -589,7 +589,7 @@ Like types and classes, we build axioms fully quantified over all
 their variables, and tidy them when we build them. For example,
 we print out axioms and don't want to print stuff like
     F k k a b = ...
-Instead we must tidy those kind variables.  See Trac #7524.
+Instead we must tidy those kind variables.  See #7524.
 
 We could instead tidy when we print, but that makes it harder to get
 things like injectivity errors to come out right. Danger of
@@ -1233,7 +1233,7 @@ That's what the CoercionTy case is doing within normalise_type.
 Note [Normalisation and type synonyms]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 We need to be a bit careful about normalising in the presence of type
-synonyms (Trac #13035).  Suppose S is a type synonym, and we have
+synonyms (#13035).  Suppose S is a type synonym, and we have
    S t1 t2
 If S is family-free (on its RHS) we can just normalise t1 and t2 and
 reconstruct (S t1' t2').   Expanding S could not reveal any new redexes
@@ -1241,7 +1241,7 @@ because type families are saturated.
 
 But if S has a type family on its RHS we expand /before/ normalising
 the args t1, t2.  If we normalise t1, t2 first, we'll re-normalise them
-after expansion, and that can lead to /exponential/ behavour; see Trac #13035.
+after expansion, and that can lead to /exponential/ behavour; see #13035.
 
 Notice, though, that expanding first can in principle duplicate t1,t2,
 which might contain redexes. I'm sure you could conjure up an exponential
diff --git a/compiler/types/InstEnv.hs b/compiler/types/InstEnv.hs
index c45aa7cccd76dfc00c852ddab22261f198f6cea6..ebfd1213ca86d998f12aa5c5215ed7312b7a3466 100644
--- a/compiler/types/InstEnv.hs
+++ b/compiler/types/InstEnv.hs
@@ -136,7 +136,7 @@ We avoid this as follows:
   inside the DFunId. The rough-match fields allow us to say "definitely does not
   match", based only on Names.
 
-  This laziness is very important; see Trac #12367. Try hard to avoid pulling on
+  This laziness is very important; see #12367. Try hard to avoid pulling on
   the structured fields unless you really need the instance.
 
 * Another place to watch is InstEnv.instIsVisible, which needs the module to
@@ -517,7 +517,7 @@ match in module 'X' from package 'p', should be "in scope"; that is,
 The difficulty is that the "zillion packages" might include ones loaded
 through earlier invocations of the GHC API, or earlier module loads in GHCi.
 They might not be in the dependencies of M itself; and if not, the instances
-in them should not be visible.  Trac #2182, #8427.
+in them should not be visible.  #2182, #8427.
 
 There are two cases:
   * If the instance is *not an orphan*, then module X defines C, T, or W.
@@ -939,8 +939,8 @@ insert_overlapping new_item@(new_inst,_) (old_item@(old_inst,_) : old_items)
        -- Overlap permitted if either the more specific instance
        -- is marked as overlapping, or the more general one is
        -- marked as overlappable.
-       -- Latest change described in: Trac #9242.
-       -- Previous change: Trac #3877, Dec 10.
+       -- Latest change described in: #9242.
+       -- Previous change: #3877, Dec 10.
 
 {-
 Note [Incoherent instances]
diff --git a/compiler/types/Kind.hs b/compiler/types/Kind.hs
index 7989265ce0359496155eb91b6f83341d20b561e0..f59d23e1dc3c1aa59f6237c1e6a3ba4a81d7ddcc 100644
--- a/compiler/types/Kind.hs
+++ b/compiler/types/Kind.hs
@@ -52,7 +52,7 @@ For this single-method class we may generate a newtype, which in turn
 generates an axiom witnessing
     C a ~ (a -> a)
 so on the left we have Constraint, and on the right we have Type.
-See Trac #7451.
+See #7451.
 
 Bottom line: although 'Type' and 'Constraint' are distinct TyCons, with
 distinct uniques, they are treated as equal at all times except
diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs
index c521a856359ed432289e4ba93e4eb4c0e5537f54..eb7ecb10ea52b64e7aeb90d3c5655e6492db1d15 100644
--- a/compiler/types/OptCoercion.hs
+++ b/compiler/types/OptCoercion.hs
@@ -484,7 +484,7 @@ of arguments in a `CoTyConApp` can differ. Consider
   Any * Int                      :: *
   Any (*->*) Maybe Int  :: *
 
-Hence the need to compare argument lengths; see Trac #13658
+Hence the need to compare argument lengths; see #13658
  -}
 
 opt_univ :: LiftingContext -> SymFlag -> UnivCoProvenance -> Role
@@ -1164,7 +1164,7 @@ etaTyConAppCo_maybe tc co
   , let n = length tys1
   , tys2 `lengthIs` n      -- This can fail in an erroneous progam
                            -- E.g. T a ~# T a b
-                           -- Trac #14607
+                           -- #14607
   = ASSERT( tc == tc1 )
     Just (decomposeCo n co (tyConRolesX r tc1))
     -- NB: n might be <> tyConArity tc
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 27fde886132f46d1e8786f75019fac8b47dc4bda..dc64ce139a4484ba1ac41f799e40f471d6a4cc42 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -371,7 +371,7 @@ about it!
 
 {- -----------------------
       Commented out until the pattern match
-      checker can handle it; see Trac #16185
+      checker can handle it; see #16185
 
       For now we use the CPP macro #define FunTy FFunTy _
       (see HsVersions.h) to allow pattern matching on a
@@ -1279,7 +1279,7 @@ have no coercion variables.
 Note [Generalized reflexive coercion]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-GRefl is a generalized reflexive coercion (see Trac #15192). It wraps a kind
+GRefl is a generalized reflexive coercion (see #15192). It wraps a kind
 coercion, which might be reflexive (MRefl) or any coercion (MCo co). The typing
 rules for GRefl:
 
@@ -1436,7 +1436,7 @@ See Simplify.simplCoercionF, which generates such selections.
 Note [Roles]
 ~~~~~~~~~~~~
 Roles are a solution to the GeneralizedNewtypeDeriving problem, articulated
-in Trac #1496. The full story is in docs/core-spec/core-spec.pdf. Also, see
+in #1496. The full story is in docs/core-spec/core-spec.pdf. Also, see
 http://ghc.haskell.org/trac/ghc/wiki/RolesImplementation
 
 Here is one way to phrase the problem:
@@ -1587,7 +1587,7 @@ which makes the code complicated and inefficient.
 This only happens for NthCo. Caching the role solves the problem, and
 allows coercionKind and coercionRole to be simple.
 
-See Trac #11735
+See #11735
 
 Note [InstCo roles]
 ~~~~~~~~~~~~~~~~~~~
@@ -1756,7 +1756,7 @@ Note [CoercionHoles and coercion free variables]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Why does a CoercionHole contain a CoVar, as well as reference to
 fill in?  Because we want to treat that CoVar as a free variable of
-the coercion.  See Trac #14584, and Note [What prevents a
+the coercion.  See #14584, and Note [What prevents a
 constraint from floating] in TcSimplify, item (4):
 
         forall k. [W] co1 :: t1 ~# t2 |> co2
@@ -1849,14 +1849,14 @@ so we profiled several versions, exploring different implementation strategies.
    "in-scope set" filter found in the internals of FV, but without the
    determinism overhead.
 
-See Trac #14880.
+See #14880.
 
 Note [Closing over free variable kinds]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 tyCoVarsOfType and tyCoFVsOfType, while traversing a type, will also close over
 free variable kinds. In previous GHC versions, this happened naively: whenever
 we would encounter an occurrence of a free type variable, we would close over
-its kind. This, however is wrong for two reasons (see Trac #14880):
+its kind. This, however is wrong for two reasons (see #14880):
 
 1. Efficiency. If we have Proxy (a::k) -> Proxy (a::k) -> Proxy (a::k), then
    we don't want to have to traverse k more than once.
@@ -2182,7 +2182,7 @@ This is because FV includes the InterestingVarFun, which is useful here,
 because we can cleverly use it to restrict our calculations to CoVars - this
 is what getCoVarSet achieves.
 
-See Trac #14880.
+See #14880.
 
 -}
 
@@ -3814,7 +3814,7 @@ Note [When to print foralls]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Mostly we want to print top-level foralls when (and only when) the user specifies
 -fprint-explicit-foralls.  But when kind polymorphism is at work, that suppresses
-too much information; see Trac #9018.
+too much information; see #9018.
 
 So I'm trying out this rule: print explicit foralls if
   a) User specifies -fprint-explicit-foralls, or
@@ -3844,7 +3844,7 @@ remember to parenthesise the operator, thus
 
    (~>) a b -> b
 
-See Trac #2766.
+See #2766.
 -}
 
 pprDataCons :: TyCon -> SDoc
diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs
index ce40d7427883adfb2fa1b698f1f21bb176c4f89e..a943284612210538346bd8fff7143dc1d077335f 100644
--- a/compiler/types/TyCon.hs
+++ b/compiler/types/TyCon.hs
@@ -972,7 +972,7 @@ data AlgTyConRhs
                              -- Invariant: arity = #tvs in nt_etad_rhs;
                              -- See Note [Newtype eta]
                              -- Watch out!  If any newtypes become transparent
-                             -- again check Trac #1072.
+                             -- again check #1072.
     }
 
 mkSumTyConRhs :: [DataCon] -> AlgTyConRhs
@@ -1193,7 +1193,7 @@ For example consider
       T2 :: T Bool
       T3 :: T a
 What would [T1 ..] be?  [T1,T3] :: T Int? Easiest thing is to exclude them.
-See Trac #4528.
+See #4528.
 
 Note [Newtype coercions]
 ~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2642,7 +2642,7 @@ strictness analyser doesn't unbox infinitely deeply.
 More precisely, we keep a *count* of how many times we've seen it.
 This is to account for
    data instance T (a,b) = MkT (T a) (T b)
-Then (Trac #10482) if we have a type like
+Then (#10482) if we have a type like
         T (Int,(Int,(Int,(Int,Int))))
 we can still unbox deeply enough during strictness analysis.
 We have to treat T as potentially recursive, but it's still
diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs
index 555e73f3901907de736cafbbce93bca3db71b8f9..442614896765f64a2b6ec10f7226f6470525284f 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -349,7 +349,7 @@ We implement this by making 'coreView' convert 'Constraint' to 'TYPE
 LiftedRep' on the fly.  The function tcView (used in the type checker)
 does not do this.
 
-See also Trac #11715, which tracks removing this inconsistency.
+See also #11715, which tracks removing this inconsistency.
 
 -}
 
@@ -415,7 +415,7 @@ expandTypeSynonyms ty
             --     /idempotent/ substitution, even in the nested case
             --        type T a b = a -> b
             --        type S x y = T y x
-            -- (Trac #11665)
+            -- (#11665)
         in  mkAppTys (go subst' rhs) tys'
       | otherwise
       = TyConApp tc expanded_tys
@@ -686,7 +686,7 @@ Note [Decomposing fat arrow c=>t]
 Can we unify (a b) with (Eq a => ty)?   If we do so, we end up with
 a partial application like ((=>) Eq a) which doesn't make sense in
 source Haskell.  In contrast, we *can* unify (a b) with (t1 -> t2).
-Here's an example (Trac #9858) of how you might do it:
+Here's an example (#9858) of how you might do it:
    i :: (Typeable a, Typeable b) => Proxy (a b) -> TypeRep
    i p = typeRep p
 
@@ -1066,7 +1066,7 @@ piResultTys ty orig_args@(arg:args)
         -- have the right kind to apply to them; so panic.
         -- Without the explicit isEmptyVarEnv test, an ill-kinded type
         -- would give an infniite loop, which is very unhelpful
-        -- c.f. Trac #15473
+        -- c.f. #15473
         pprPanic "piResultTys2" (ppr ty $$ ppr orig_args $$ ppr all_args)
 
 applyTysX :: [TyVar] -> Type -> [Type] -> Type
@@ -1098,7 +1098,7 @@ So
 
 In other words we must intantiate the forall!
 
-Similarly (Trac #15428)
+Similarly (#15428)
    S :: forall k f. k -> f k
 and we are finding the kind of
    S * (* ->) Int Bool
@@ -1400,7 +1400,7 @@ with a fat arrow; that is, using mkInvisFunTy, not mkVisFunTy.
 
 Why? After all, we are in Core, where (=>) and (->) behave the same.
 Yes, but the /specialiser/ does treat dictionary arguments specially.
-Suppose we do w/w on 'foo' in module A, thus (Trac #11272, #6056)
+Suppose we do w/w on 'foo' in module A, thus (#11272, #6056)
    foo :: Ord a => Int -> blah
    foo a d x = case x of I# x' -> $wfoo @a d x'
 
@@ -1679,7 +1679,7 @@ tyConArgFlags tc = fun_kind_arg_flags (tyConKind tc)
 -- 'Specified' and the second argument (@Bool@) is 'Required'. It is precisely
 -- this sort of higher-rank situation in which 'appTyArgFlags' comes in handy,
 -- since @f Type Bool@ would be represented in Core using 'AppTy's.
--- (See also Trac #15792).
+-- (See also #15792).
 appTyArgFlags :: Type -> [Type] -> [ArgFlag]
 appTyArgFlags ty = fun_kind_arg_flags (typeKind ty)
 
@@ -2429,7 +2429,7 @@ and now we can make f' a join point:
   in ... jump f' 1 'b' ... jump f' 2 'c' ...
 
 It's not clear that this comes up often, however. TODO: Measure how often and
-add this analysis if necessary.  See Trac #14620.
+add this analysis if necessary.  See #14620.
 
 
 ************************************************************************
diff --git a/compiler/types/Unify.hs b/compiler/types/Unify.hs
index 9720afc5820ba506788e6e5333511d397617d2c6..3bcf5216037df49121b2b8f5e22669a94ba17aac 100644
--- a/compiler/types/Unify.hs
+++ b/compiler/types/Unify.hs
@@ -330,7 +330,7 @@ failure.
 tcUnifyTysFG ("fine-grained") returns one of three results: success, occurs-check
 failure ("MaybeApart"), or general failure ("SurelyApart").
 
-See also Trac #8162.
+See also #8162.
 
 It's worth noting that unification in the presence of infinite types is not
 complete. This means that, sometimes, a closed type family does not reduce
@@ -554,9 +554,9 @@ We also want to substitute inside f's kind, to get
    , g -> H k (f:*) ]
 If we don't do this, we may apply the substitution to something,
 and get an ill-formed type, i.e. one where typeKind will fail.
-This happened, for example, in Trac #9106.
+This happened, for example, in #9106.
 
-It gets worse.  In Trac #14164 we wanted to take the fixpoint of
+It gets worse.  In #14164 we wanted to take the fixpoint of
 this substitution
    [ xs_asV :-> F a_aY6 (z_aY7 :: a_aY6)
                         (rest_aWF :: G a_aY6 (z_aY7 :: a_aY6))
@@ -887,7 +887,7 @@ Previously, wrongly, we pushed 'co' in the (horrid) accumulating
 But that is obviously wrong because 'co' (from the template) ends
 up in 'kco', which in turn ends up in the range of the substitution.
 
-This all came up in Trac #13910.  Because we match tycon arguments
+This all came up in #13910.  Because we match tycon arguments
 left-to-right, the ambient substitution will already have a matching
 substitution for any kinds; so there is an easy fix: just apply
 the substitution-so-far to the coercion from the LHS.
@@ -901,7 +901,7 @@ Note that
   better way.
 
 * One better way is to ensure that type patterns (the template
-  in the matching process) have no casts.  See Trac #14119.
+  in the matching process) have no casts.  See #14119.
 
 Note [Polykinded tycon applications]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -913,7 +913,7 @@ and we are unifying
 These two TyConApps have the same TyCon at the front but they
 (legitimately) have different numbers of arguments.  They
 are surelyApart, so we can report that without looking any
-further (see Trac #15704).
+further (see #15704).
 -}
 
 -------------- unify_ty: the main workhorse -----------
@@ -1141,7 +1141,7 @@ bindTv env tv1 ty2
         ; checkRnEnv env free_tvs2
 
         -- Occurs check, see Note [Fine-grained unification]
-        -- Make sure you include 'kco' (which ty2 does) Trac #14846
+        -- Make sure you include 'kco' (which ty2 does) #14846
         ; occurs <- occursCheck env tv1 free_tvs2
 
         ; if occurs then maybeApart
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index d7b446c6eaf2fd964d9b115ed8e3a5ef3e001e92..623ba00244d1d657b6a91f9b8e82caa2463f8ddd 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -539,7 +539,7 @@ instance Binary Integer where
 
     {-
     -- This code is currently commented out.
-    -- See https://ghc.haskell.org/trac/ghc/ticket/3379#comment:10 for
+    -- See https://gitlab.haskell.org/ghc/ghc/issues/3379#note_104346 for
     -- discussion.
 
     put_ bh (S# i#) = do putByte bh 0; put_ bh (I# i#)
diff --git a/compiler/utils/MonadUtils.hs b/compiler/utils/MonadUtils.hs
index f4320ecb4d7612b1833513942bf0c63ab01314d4..1cfb943464c1f49634551bc511d2f829c52f01bd 100644
--- a/compiler/utils/MonadUtils.hs
+++ b/compiler/utils/MonadUtils.hs
@@ -78,7 +78,7 @@ The 'zipWithM'/'zipWithM_' functions are inlined so that the `zipWith` and
 Furthermore, 'zipWith3M'/'zipWith4M' and 'zipWith3M_' have been explicitly
 rewritten in a non-recursive way similarly to 'zipWithM'/'zipWithM_', and for
 more than just uniformity: after [D5241](https://phabricator.haskell.org/D5241)
-for Trac ticket #14037, all @zipN@/@zipWithN@ functions fuse, meaning
+for issue #14037, all @zipN@/@zipWithN@ functions fuse, meaning
 'zipWith3M'/'zipWIth4M' and 'zipWith3M_'@ now behave like 'zipWithM' and
 'zipWithM_', respectively, with regards to fusion.
 
diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs
index 7d06d740160ea9c44b4f6ed5d25ef50613fc641f..66518f95b637f2182cec6c08c98d7ab46a8a3442 100644
--- a/compiler/utils/Pretty.hs
+++ b/compiler/utils/Pretty.hs
@@ -32,7 +32,7 @@ source tree:
  * `compiler/utils/Pretty.hs` (this module). It is used by GHC only.
 
 There is an ongoing effort in https://github.com/haskell/pretty/issues/1 and
-https://ghc.haskell.org/trac/ghc/ticket/10735 to try to get rid of GHC's copy
+https://gitlab.haskell.org/ghc/ghc/issues/10735 to try to get rid of GHC's copy
 of Pretty.
 
 Currently, GHC's copy of Pretty resembles pretty-1.1.2.0, with the following
@@ -435,7 +435,7 @@ Note [Print Hexadecimal Literals]
 
 Relevant discussions:
  * Phabricator: https://phabricator.haskell.org/D4465
- * GHC Trac: https://ghc.haskell.org/trac/ghc/ticket/14872
+ * GHC Trac: https://gitlab.haskell.org/ghc/ghc/issues/14872
 
 There is a flag `-dword-hex-literals` that causes literals of
 type `Word#` or `Word64#` to be displayed in hexadecimal instead
diff --git a/configure.ac b/configure.ac
index a803a1faedb5a32eaf9575bbde34130deddcb357..00304463d45929039dd9832ee7cb30a979cfbdf0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -558,14 +558,14 @@ if test "$TargetOS_CPP" = "darwin"
 then
     AC_MSG_CHECKING(whether nm program is broken)
     # Some versions of XCode ship a broken version of `nm`. Detect and work
-    # around this issue. See : https://ghc.haskell.org/trac/ghc/ticket/11744
+    # around this issue. See : https://gitlab.haskell.org/ghc/ghc/issues/11744
     nmver=$(${NM} --version | grep version | sed 's/ //g')
     case "$nmver" in
         LLVMversion7.3.0|LLVMversion7.3.1)
             AC_MSG_RESULT(yes)
             echo "The detected nm program is broken."
             echo
-            echo "See: https://ghc.haskell.org/trac/ghc/ticket/11744"
+            echo "See: https://gitlab.haskell.org/ghc/ghc/issues/11744"
             echo
             echo "Try re-running configure with:"
             echo
@@ -936,7 +936,7 @@ dnl ** check for math library
 dnl    Keep that check as early as possible.
 dnl    as we need to know whether we need libm
 dnl    for math functions or not
-dnl    (see http://ghc.haskell.org/trac/ghc/ticket/3730)
+dnl    (see https://gitlab.haskell.org/ghc/ghc/issues/3730)
 AC_CHECK_LIB(m, atan, HaveLibM=YES, HaveLibM=NO)
 if test $HaveLibM = YES
 then
diff --git a/distrib/remilestoning.pl b/distrib/remilestoning.pl
index 60a23af518ddb2ee2a24d2eb8d35bfa5f32e4221..51eb19c66cbbc314ee96a504a5b9fd9c91a6b5c6 100644
--- a/distrib/remilestoning.pl
+++ b/distrib/remilestoning.pl
@@ -101,11 +101,11 @@ EOF
             my $title = $ticketsfor{$email}{$ticket}{"title"};
             print FH "\n";
             print FH "#$ticket $title:\n";
-            print FH "    http://ghc.haskell.org/trac/ghc/ticket/$ticket\n";
+            print FH "    https://gitlab.haskell.org/ghc/ghc/issues/$ticket\n";
         }
         print FH <<'EOF';
 
--- 
+--
 The GHC Team
 http://www.haskell.org/ghc/
 EOF
diff --git a/docs/users_guide/bugs.rst b/docs/users_guide/bugs.rst
index c563083cd6c82e8218b9b68c76afffbac630df49..9222a68b1595536e4bdf8c15b118bdc7e59f977b 100644
--- a/docs/users_guide/bugs.rst
+++ b/docs/users_guide/bugs.rst
@@ -487,7 +487,7 @@ Known bugs or infelicities
 --------------------------
 
 The bug tracker lists bugs that have been reported in GHC but not yet
-fixed: see the `GHC Trac <http://ghc.haskell.org/trac/ghc/>`__. In
+fixed: see the `GHC issue tracker <https://gitlab.haskell.org/ghc/ghc/issues>`__. In
 addition to those, GHC also has the following known bugs or
 infelicities. These bugs are more permanent; it is unlikely that any of
 them will be fixed in the short term.
diff --git a/docs/users_guide/editing-guide.rst b/docs/users_guide/editing-guide.rst
index 27ddbd2e2916ff8424511184aa420a9148187106..fcff03b6fea19bb897c2e9de3b6f322cccadd470 100644
--- a/docs/users_guide/editing-guide.rst
+++ b/docs/users_guide/editing-guide.rst
@@ -180,10 +180,10 @@ from other points in the document,
     See :ref:`options-platform` for details.
 
 
-To GHC Trac resources
-^^^^^^^^^^^^^^^^^^^^^
+To GHC resources
+^^^^^^^^^^^^^^^^
 
-There are special macros for conveniently linking to GHC Trac
+There are special macros for conveniently linking to GHC
 Wiki articles and tickets,
 
 .. code-block:: rest
@@ -250,7 +250,7 @@ Index entries
 
 Index entries can be included anywhere in the document as a block element.
 They look like,
-    
+
 .. code-block:: rest
 
     Here is some discussion on the Strict Haskell extension.
@@ -374,7 +374,7 @@ must match the definition exactly, including the arguments. A quick way to find
 the exact names and special characters is,
 
 .. code-block:: sh
-    
+
     $ git grep -- "flag:: -o "
 
 which will generate the appropriate,
diff --git a/docs/users_guide/ghc_config.py.in b/docs/users_guide/ghc_config.py.in
index 4ff77adc9d9e5c120b7eb8ee8ea261568ed0b4d7..dee8039a5afada017f866e4700bd6010ba430db2 100644
--- a/docs/users_guide/ghc_config.py.in
+++ b/docs/users_guide/ghc_config.py.in
@@ -1,6 +1,6 @@
 extlinks = {
-    'ghc-ticket': ('https://ghc.haskell.org/trac/ghc/ticket/%s', 'Trac #'),
-    'ghc-wiki': ('https://ghc.haskell.org/trac/ghc/wiki/%s', 'Trac #'),
+    'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '#'),
+    'ghc-wiki': ('https://ghc.haskell.org/trac/ghc/wiki/%s', '#'),
 }
 
 libs_base_uri = '../libraries'
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 67be116ae46aee8076ca777405c35da2f0b78719..2b4eb481f9fb8b714a7e3639fbbae0ae9b571842 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -5737,7 +5737,7 @@ Note also the following points
          pattern P x y v <- MkT True x y (v::a)
 
    Here the universal type variable `a` scopes over the definition of `P`,
-   but the existential `b` does not.  (c.f. discussion on Trac #14998.)
+   but the existential `b` does not.  (c.f. discussion on #14998.)
 
 -  For a bidirectional pattern synonym, a use of the pattern synonym as
    an expression has the type
@@ -7422,7 +7422,7 @@ But superclass constraints like these are sometimes useful, and the conservative
 check is annoying where no actual recursion is involved.
 
 Moreover genuninely-recursive superclasses are sometimes useful. Here's a real-life
-example (Trac #10318) ::
+example (#10318) ::
 
      class (Frac (Frac a) ~ Frac a,
             Fractional (Frac a),
@@ -10045,7 +10045,7 @@ Notes:
    instance (forall xx. c (Free c xx)) => Monad (Free c) where
        Free f >>= g = f g
 
-  See `Iceland Jack's summary <https://ghc.haskell.org/trac/ghc/ticket/14733#comment:6>`_.  The key point is that the bit to the right of the ``=>`` may be headed by a type *variable* (``c`` in this case), rather than a class.  It should not be one of the forall'd variables, though.
+  See `Iceland Jack's summary <https://gitlab.haskell.org/ghc/ghc/issues/14733#note_148352>`_.  The key point is that the bit to the right of the ``=>`` may be headed by a type *variable* (``c`` in this case), rather than a class.  It should not be one of the forall'd variables, though.
 
   (NB: this goes beyond what is described in `the paper <http://i.cs.hku.hk/~bruno//papers/hs2017.pdf>`_, but does not seem to introduce any new technical difficulties.)
 
@@ -12600,7 +12600,7 @@ In a few cases, even equality constraints cannot be deferred.  Specifically:
 
   This type signature contains a kind error which cannot be deferred.
 
-- Type equalities under a forall cannot be deferred (c.f. Trac #14605).
+- Type equalities under a forall cannot be deferred (c.f. #14605).
 
 .. _template-haskell:
 
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index d6240bc5cba3c6586b74a53b07890da738c0e342..9571c7e4aa3ec7eb5cc9be39b70b0966d610b187 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -509,7 +509,7 @@ by saying ``-fno-wombat``.
     that were not visible earlier; and optimisations like
     :ghc-flag:`-fspec-constr` can create functions with unused arguments which
     are eliminated by late demand analysis. Improvements are modest, but
-    so is the cost. See notes on the :ghc-wiki:`Trac wiki page <LateDmd>`.
+    so is the cost. See notes on the :ghc-wiki:`wiki page <LateDmd>`.
 
 .. ghc-flag:: -fliberate-case
     :shortdesc: Turn on the liberate-case transformation. Implied by :ghc-flag:`-O2`.
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 5e26685a695569d46f2d3084733161991934e586..e386fe6058f97ccb92636e4f302127623380a846 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -657,7 +657,7 @@ runGHCi paths maybe_exprs = do
                                    $ topHandler e
                                    -- this used to be topHandlerFastExit, see #2228
             runInputTWithPrefs defaultPrefs defaultSettings $ do
-                -- make `ghc -e` exit nonzero on invalid input, see Trac #7962
+                -- make `ghc -e` exit nonzero on invalid input, see #7962
                 _ <- runCommands' hdle
                      (Just $ hdle (toException $ ExitFailure 1) >> return ())
                      (return Nothing)
@@ -3068,16 +3068,16 @@ internally generated by GHC, eg:
     $tcFoo :: GHC.Types.TyCon = _
     $trModule :: GHC.Types.Module = _ .
 
-The filter was introduced as a fix for Trac #12525 [1]. Comment:1 [2] to this
+The filter was introduced as a fix for #12525 [1]. Comment:1 [2] to this
 ticket contains an analysis of the situation and suggests the solution
 implemented above.
 
-The same filter was also implemented to fix Trac #11051 [3]. See the
+The same filter was also implemented to fix #11051 [3]. See the
 Note [What to show to users] in compiler/main/InteractiveEval.hs
 
-[1] https://ghc.haskell.org/trac/ghc/ticket/12525
-[2] https://ghc.haskell.org/trac/ghc/ticket/12525#comment:1
-[3] https://ghc.haskell.org/trac/ghc/ticket/11051
+[1] https://gitlab.haskell.org/ghc/ghc/issues/12525
+[2] https://gitlab.haskell.org/ghc/ghc/issues/12525#note_123489
+[3] https://gitlab.haskell.org/ghc/ghc/issues/11051
 -}
 
 
diff --git a/ghc/Main.hs b/ghc/Main.hs
index 2202f7116a84ba15263444ede82f1ac1d5eca038..f5836f5fe6daefb29e69a256461f16cc858e5555 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -872,7 +872,7 @@ to get a hash of the package's ABI.
 
 -- | Print ABI hash of input modules.
 --
--- The resulting hash is the MD5 of the GHC version used (Trac #5328,
+-- The resulting hash is the MD5 of the GHC version used (#5328,
 -- see 'hiVersion') and of the existing ABI hash from each module (see
 -- 'mi_mod_hash').
 abiHash :: [String] -- ^ List of module names
diff --git a/hadrian/README.md b/hadrian/README.md
index 77c3cd09507f7ebb005f167565493d47bb708582..9531bdb6678be819d1dfcaa40b9ba9ee845041f9 100644
--- a/hadrian/README.md
+++ b/hadrian/README.md
@@ -120,7 +120,7 @@ messages by Shake oracles.
 * `--lint`: run [Shake Lint](https://shakebuild.com/manual#lint) during the
 build to check that the build system is well formed. Note that the Lint check
 currently fails under certain circumstances, as discussed in
-[this ticket](https://ghc.haskell.org/trac/ghc/ticket/15971).
+[this ticket](https://gitlab.haskell.org/ghc/ghc/issues/15971).
 
 #### User settings
 
@@ -254,7 +254,7 @@ Here are a few simple suggestions that might help you fix the build:
   [wiki](https://github.com/snowleopard/hadrian/wiki)
   and Shake's [debugging tutorial](https://shakebuild.com/debugging).
 
-If nothing helps, don't hesitate to create a GHC Trac ticket, choosing the
+If nothing helps, don't hesitate to create a GHC issue, choosing the
 component `Build System (Hadrian)`.
 
 Current limitations
diff --git a/hadrian/src/Rules/Gmp.hs b/hadrian/src/Rules/Gmp.hs
index e4f7e53b4823c7f08d65f1a72a1206cb22d37da2..5666ab39052514d85cba0a14308b6dd6b511f1c2 100644
--- a/hadrian/src/Rules/Gmp.hs
+++ b/hadrian/src/Rules/Gmp.hs
@@ -14,7 +14,7 @@ gmpObjects = do
     need [gmpPath -/- gmpLibraryH]
     -- The line below causes a Shake Lint failure on Windows, which forced us to
     -- disable Lint by default. See more details here:
-    -- https://ghc.haskell.org/trac/ghc/ticket/15971.
+    -- https://gitlab.haskell.org/ghc/ghc/issues/15971.
     map (unifyPath . (gmpPath -/-)) <$>
         liftIO (getDirectoryFilesIO gmpPath [gmpObjectsDir -/- "*.o"])
 
diff --git a/hadrian/src/Rules/Register.hs b/hadrian/src/Rules/Register.hs
index d215938385d198bc0dac16460503b0c5ac13a078..f278cc76f9d5cd42631ed1120fd463e661103c92 100644
--- a/hadrian/src/Rules/Register.hs
+++ b/hadrian/src/Rules/Register.hs
@@ -120,7 +120,7 @@ buildConf _ context@Context {..} conf = do
     -- The above two steps produce an entry in the package database, with copies
     -- of many of the files we have build, e.g. Haskell interface files. We need
     -- to record this side effect so that Shake can cache these files too.
-    -- See why we need 'fixWindows': https://ghc.haskell.org/trac/ghc/ticket/16073
+    -- See why we need 'fixWindows': https://gitlab.haskell.org/ghc/ghc/issues/16073
     let fixWindows path = do
             win <- windowsHost
             version  <- setting GhcVersion
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index 55ef19a57b00fb72da2c06e0da79770c36b8bf13..f7e5c4505141eadbafe646056d343a61d6a8c928 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -118,7 +118,7 @@ testRules = do
 
         -- Execute the test target.
         -- We override the verbosity setting to make sure the user can see
-        -- the test output: https://ghc.haskell.org/trac/ghc/ticket/15951.
+        -- the test output: https://gitlab.haskell.org/ghc/ghc/issues/15951.
         withVerbosity Loud $ buildWithCmdOptions env $
             target (vanillaContext Stage2 compiler) RunTest [] []
 
diff --git a/hadrian/src/Settings/Builders/RunTest.hs b/hadrian/src/Settings/Builders/RunTest.hs
index 837e6884255c36c1b6beeb5f31bf97a45b8d2abe..d4e6a244e85ec40a9d05cc986ae43936d2534ebd 100644
--- a/hadrian/src/Settings/Builders/RunTest.hs
+++ b/hadrian/src/Settings/Builders/RunTest.hs
@@ -44,7 +44,7 @@ runTestGhcFlags = do
         , ifMinGhcVer "711" "-fshow-warning-groups"
         , ifMinGhcVer "801" "-fdiagnostics-color=never"
         , ifMinGhcVer "801" "-fno-diagnostics-show-caret"
-        , pure "-Werror=compat" -- See Trac #15278
+        , pure "-Werror=compat" -- See #15278
         , pure "-dno-debug-output"
         ]
 
diff --git a/hadrian/src/Settings/Flavours/Common.hs b/hadrian/src/Settings/Flavours/Common.hs
index a1eb2fbba98b57e78aa22a01eb6de3ffa5d2e5f2..054633ffe2f612cc4e62ef66b3dde95518f24a56 100644
--- a/hadrian/src/Settings/Flavours/Common.hs
+++ b/hadrian/src/Settings/Flavours/Common.hs
@@ -2,7 +2,7 @@ module Settings.Flavours.Common where
 
 import Expression
 
--- See https://ghc.haskell.org/trac/ghc/ticket/15286 and
+-- See https://gitlab.haskell.org/ghc/ghc/issues/15286 and
 -- https://phabricator.haskell.org/D4880
 naturalInBaseFixArgs :: Args
 naturalInBaseFixArgs = mconcat
diff --git a/includes/MachDeps.h b/includes/MachDeps.h
index 2be4ee0b4f856e8f23827d1a4cc5cdfb794d488c..d6f329f19f53ecdd722595741db81f33eea7fc90 100644
--- a/includes/MachDeps.h
+++ b/includes/MachDeps.h
@@ -18,7 +18,7 @@
 /* Don't allow stage1 (cross-)compiler embed assumptions about target
  * platform. When ghc-stage1 is being built by ghc-stage0 is should not
  * refer to target defines. A few past examples:
- *  - https://ghc.haskell.org/trac/ghc/ticket/13491
+ *  - https://gitlab.haskell.org/ghc/ghc/issues/13491
  *  - https://phabricator.haskell.org/D3122
  *  - https://phabricator.haskell.org/D3405
  *
diff --git a/includes/Stg.h b/includes/Stg.h
index 57cb00d0a43753eca110bc1eec19de16b4d27494..547b36aaeb8beb1d3ef706e4119626191531de88 100644
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -262,7 +262,7 @@ typedef StgFunPtr       F_;
 /* foreign functions: */
 #define EFF_(f)   void f() /* See Note [External function prototypes] */
 
-/* Note [External function prototypes]  See Trac #8965, #11395
+/* Note [External function prototypes]  See #8965, #11395
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 In generated C code we need to distinct between two types
 of external symbols:
@@ -289,7 +289,7 @@ believe that all functions declared this way can be called without an
 argument save area, but if the callee has sufficiently many arguments then
 it will expect that area to be present, and will thus corrupt the caller's
 stack.  This happens in particular with calls to runInteractiveProcess in
-libraries/process/cbits/runProcess.c, and led to Trac #8965.
+libraries/process/cbits/runProcess.c, and led to #8965.
 
 The simplest fix appears to be to declare these external functions with an
 unspecified argument list rather than a void argument list.  This is no
diff --git a/libraries/base/Control/Arrow.hs b/libraries/base/Control/Arrow.hs
index 8d910277a23ec299b33b90a04309d707315a0ca2..13759dbbb4a89087fd85408226170ee313f5c067 100644
--- a/libraries/base/Control/Arrow.hs
+++ b/libraries/base/Control/Arrow.hs
@@ -2,7 +2,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 {-# OPTIONS_GHC -Wno-inline-rule-shadowing #-}
     -- The RULES for the methods of class Arrow may never fire
-    -- e.g. compose/arr;  see Trac #10528
+    -- e.g. compose/arr;  see #10528
 
 -----------------------------------------------------------------------------
 -- |
diff --git a/libraries/base/Control/Category.hs b/libraries/base/Control/Category.hs
index 37305bff1d1ba4b1b3e9ddb72de349f1a3322c1a..e8184956f21778c20d4bae889df7a2ca1624b8b0 100644
--- a/libraries/base/Control/Category.hs
+++ b/libraries/base/Control/Category.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE PolyKinds #-}
 {-# OPTIONS_GHC -Wno-inline-rule-shadowing #-}
     -- The RULES for the methods of class Category may never fire
-    -- e.g. identity/left, identity/right, association;  see Trac #10528
+    -- e.g. identity/left, identity/right, association;  see #10528
 
 -----------------------------------------------------------------------------
 -- |
@@ -16,7 +16,7 @@
 -- Stability   :  experimental
 -- Portability :  portable
 
--- http://ghc.haskell.org/trac/ghc/ticket/1773
+-- https://gitlab.haskell.org/ghc/ghc/issues/1773
 
 module Control.Category where
 
diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs
index fbdb99e5f4fe743a06477f1d3a533f4d6b24eb62..8223ec73d11370be4681b4e9077d8276228bfd60 100644
--- a/libraries/base/Control/Monad.hs
+++ b/libraries/base/Control/Monad.hs
@@ -260,8 +260,8 @@ By contrast, the implementation below with a local loop makes it possible to
 inline the entire definition (as happens for foldr, for example) thereby
 specialising for the particular action.
 
-For further information, see this Trac comment, which includes side-by-side
-Core: https://ghc.haskell.org/trac/ghc/ticket/11795#comment:6
+For further information, see this issue comment, which includes side-by-side
+Core: https://gitlab.haskell.org/ghc/ghc/issues/11795#note_118976
 -}
 
 -- | @'replicateM' n act@ performs the action @n@ times,
diff --git a/libraries/base/Control/Monad/ST/Imp.hs b/libraries/base/Control/Monad/ST/Imp.hs
index 666b535fd09c998d06c27914d6b4b0d75ccccbb7..cbcee8dd909035f4055e52ec3a1bbd839665ce77 100644
--- a/libraries/base/Control/Monad/ST/Imp.hs
+++ b/libraries/base/Control/Monad/ST/Imp.hs
@@ -75,7 +75,7 @@ using liftST:
 
 We knew that lazy blackholing could cause the computation to be re-run if the
 result was demanded strictly, but we thought that would be okay in the case of
-ST. However, that is not the case (see Trac #15349). Notably, the first time
+ST. However, that is not the case (see #15349). Notably, the first time
 the computation is executed, it may mutate variables that cause it to behave
 *differently* the second time it's run. That may allow it to terminate when it
 should not. More frighteningly, Arseniy Alekseyev produced a somewhat contrived
diff --git a/libraries/base/Control/Monad/Zip.hs b/libraries/base/Control/Monad/Zip.hs
index 0fada6f5a265441d4f525623d5e94aa7021de7d8..dc192bfc8168e5e636ce317790a07ce0a38b9ac9 100644
--- a/libraries/base/Control/Monad/Zip.hs
+++ b/libraries/base/Control/Monad/Zip.hs
@@ -52,7 +52,7 @@ class Monad m => MonadZip m where
     munzip mab = (liftM fst mab, liftM snd mab)
     -- munzip is a member of the class because sometimes
     -- you can implement it more efficiently than the
-    -- above default code.  See Trac #4370 comment by giorgidze
+    -- above default code.  See #4370 comment by giorgidze
 
 -- | @since 4.3.1.0
 instance MonadZip [] where
diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs
index fa199f1117ffd5a9266ed74eec9e003286699575..dfa55676f64151e8d3f4f72f64673c66fed25226 100644
--- a/libraries/base/Data/Data.hs
+++ b/libraries/base/Data/Data.hs
@@ -1108,7 +1108,7 @@ ratioDataType = mkDataType "GHC.Real.Ratio" [ratioConstr]
 
 -- NB: This Data instance intentionally uses the (%) smart constructor instead
 -- of the internal (:%) constructor to preserve the invariant that a Ratio
--- value is reduced to normal form. See Trac #10011.
+-- value is reduced to normal form. See #10011.
 
 -- | @since 4.0.0.0
 instance (Data a, Integral a) => Data (Ratio a) where
diff --git a/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs
index 9a031212f0e7ac2c91dc4da087b6d3fb7908b94f..037a44b99ea043f987a2fca257361e26a0c891cb 100644
--- a/libraries/base/Data/Foldable.hs
+++ b/libraries/base/Data/Foldable.hs
@@ -127,7 +127,7 @@ class Foldable t where
     -- and combine the results.
     foldMap :: Monoid m => (a -> m) -> t a -> m
     {-# INLINE foldMap #-}
-    -- This INLINE allows more list functions to fuse. See Trac #9848.
+    -- This INLINE allows more list functions to fuse. See #9848.
     foldMap f = foldr (mappend . f) mempty
 
     -- | A variant of 'foldMap' that is strict in the accumulator.
@@ -718,7 +718,7 @@ GHC used to proceed like this:
     in ...(c x1 y1)...(c x2 y2)....n...
 
 The trouble is that `c`, being big, will not be inlined.  And that can
-be absolutely terrible for performance, as we saw in Trac #8763.
+be absolutely terrible for performance, as we saw in #8763.
 
 It's much better to define
 
@@ -776,7 +776,7 @@ foldr1. This was problematic for space usage, as the semantics of maximumBy
 and minimumBy essentially require that they examine every element of the
 data structure. Using foldr1 to examine every element results in space usage
 proportional to the size of the data structure. For the common case of lists,
-this could be particularly bad (see Trac #10830).
+this could be particularly bad (see #10830).
 
 For the common case of lists, switching the implementations of maximumBy and
 minimumBy to foldl1 solves the issue, as GHC's strictness analysis can then
@@ -784,7 +784,7 @@ make these functions only use O(1) stack space. It is perhaps not the optimal
 way to fix this problem, as there are other conceivable data structures
 (besides lists) which might benefit from specialized implementations for
 maximumBy and minimumBy (see
-https://ghc.haskell.org/trac/ghc/ticket/10830#comment:26 for a further
+https://gitlab.haskell.org/ghc/ghc/issues/10830#note_129843 for a further
 discussion). But using foldl1 is at least always better than using foldr1, so
 GHC has chosen to adopt that approach for now.
 -}
diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs
index 132ee1467327fde2efda790112312ebc873d68ff..82cc9faa3b98a3aa49bbf90027f40e376641993c 100644
--- a/libraries/base/Data/OldList.hs
+++ b/libraries/base/Data/OldList.hs
@@ -1112,7 +1112,7 @@ and possibly to bear similarities to a 1982 paper by Richard O'Keefe:
 "A smooth applicative merge sort".
 
 Benchmarks show it to be often 2x the speed of the previous implementation.
-Fixes ticket http://ghc.haskell.org/trac/ghc/ticket/2143
+Fixes ticket https://gitlab.haskell.org/ghc/ghc/issues/2143
 -}
 
 sort = sortBy compare
diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs
index 1be6e27b74e3e33bb5784ec2fb4441ddf0caa008..17758710344ef767215ae1d4206f00d0b2c58acd 100644
--- a/libraries/base/Data/Typeable/Internal.hs
+++ b/libraries/base/Data/Typeable/Internal.hs
@@ -830,7 +830,7 @@ splitApps = go []
 -- appropriate module and constructor names.
 --
 -- The ticket to find a better way to deal with this is
--- Trac #14480.
+-- #14480.
 tyConTYPE :: TyCon
 tyConTYPE = mkTyCon (tyConPackage liftedRepTyCon) "GHC.Prim" "TYPE" 0
        (KindRepFun (KindRepTyConApp liftedRepTyCon []) (KindRepTYPE LiftedRep))
diff --git a/libraries/base/Debug/Trace.hs b/libraries/base/Debug/Trace.hs
index 7f40b1015606e1f4842a60ae97aaeb85432ff140..8e154163842c1c4424f1f6a4dd816d0b40258b2f 100644
--- a/libraries/base/Debug/Trace.hs
+++ b/libraries/base/Debug/Trace.hs
@@ -81,7 +81,7 @@ traceIO :: String -> IO ()
 traceIO msg = do
     withCString "%s\n" $ \cfmt -> do
      -- NB: debugBelch can't deal with null bytes, so filter them
-     -- out so we don't accidentally truncate the message.  See Trac #9395
+     -- out so we don't accidentally truncate the message.  See #9395
      let (nulls, msg') = partition (=='\0') msg
      withCString msg' $ \cmsg ->
       debugBelch cfmt cmsg
diff --git a/libraries/base/Foreign/Ptr.hs b/libraries/base/Foreign/Ptr.hs
index 45e6cf5483b2de818396b962ce0be6f99a9a392b..6a8170baeab8513843780eb3f6ccd80c2bc46940 100644
--- a/libraries/base/Foreign/Ptr.hs
+++ b/libraries/base/Foreign/Ptr.hs
@@ -110,7 +110,7 @@ Note [Exporting constructors of marshallable foreign types]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 One might expect that IntPtr, WordPtr, and the other newtypes in the
 Foreign.C.Types and System.Posix.Types modules to be abstract, but this is not
-the case in GHC (see Trac #5229 and #11983). In fact, we deliberately export
+the case in GHC (see #5229 and #11983). In fact, we deliberately export
 the constructors for these datatypes in order to satisfy a requirement of the
 Haskell 2010 Report (§ 8.4.2) that if a newtype is used in a foreign
 declaration, then its constructor must be visible.
@@ -118,7 +118,7 @@ declaration, then its constructor must be visible.
 This requirement was motivated by the fact that using a type in a foreign
 declaration necessarily exposes some information about the type to the user,
 so being able to use abstract types in a foreign declaration breaks their
-abstraction (see Trac #3008). As a result, the constructors of all FFI-related
+abstraction (see #3008). As a result, the constructors of all FFI-related
 newtypes in base must be exported in order to be useful for FFI programming,
 even at the cost of exposing their underlying, architecture-dependent types.
 -}
diff --git a/libraries/base/GHC/Arr.hs b/libraries/base/GHC/Arr.hs
index b08180d6fdcb780923eda7ce6810cc21f8d85ea6..cc0397ec07b6195e490ff5aa3c8a7de1ca9b9ef3 100644
--- a/libraries/base/GHC/Arr.hs
+++ b/libraries/base/GHC/Arr.hs
@@ -126,7 +126,7 @@ Note [Inlining index]
 We inline the 'index' operation,
 
  * Partly because it generates much faster code
-   (although bigger); see Trac #1216
+   (although bigger); see #1216
 
  * Partly because it exposes the bounds checks to the simplifier which
    might help a big.
@@ -151,13 +151,13 @@ is a property of the particular instances of index, bounds, and inRange,
 so GHC cannot guarantee it.
 
  * If you do (A) and not (B), then you might get a seg-fault,
-   by indexing at some bizarre location.  Trac #1610
+   by indexing at some bizarre location.  #1610
 
  * If you do (B) but not (A), you may get no complaint when you index
-   an array out of its semantic bounds.  Trac #2120
+   an array out of its semantic bounds.  #2120
 
 At various times we have had (A) and not (B), or (B) and not (A); both
-led to complaints.  So now we implement *both* checks (Trac #2669).
+led to complaints.  So now we implement *both* checks (#2669).
 
 For 1-d, 2-d, and 3-d arrays of Int we have specialised instances to avoid this.
 
@@ -787,7 +787,7 @@ There are two problems:
 2. This implementation relies on list fusion for efficiency. In order
    to implement the "amap/coerce" rule, we need to delay inlining amap
    until simplifier phase 1, which is when the eftIntList rule kicks
-   in and makes that impossible.  (c.f. Trac #8767)
+   in and makes that impossible.  (c.f. #8767)
 -}
 
 
diff --git a/libraries/base/GHC/Event/Manager.hs b/libraries/base/GHC/Event/Manager.hs
index 3ee911681223b5ac5970101e8b1b92bcc509be20..eda3e614901f4b28c762ca12fd27b314a8d7a324 100644
--- a/libraries/base/GHC/Event/Manager.hs
+++ b/libraries/base/GHC/Event/Manager.hs
@@ -372,7 +372,7 @@ registerFd mgr cb fd evs lt = do
     when we register an event.
 
     For more information, please read:
-        http://ghc.haskell.org/trac/ghc/ticket/7651
+        https://gitlab.haskell.org/ghc/ghc/issues/7651
 -}
 -- | Wake up the event manager.
 wakeManager :: EventManager -> IO ()
diff --git a/libraries/base/GHC/Float.hs b/libraries/base/GHC/Float.hs
index 75f6f8bd68f77e872da422d0da8f3edeea6d4fcc..0929421c5c448ea9d674531532b319f65c56b959 100644
--- a/libraries/base/GHC/Float.hs
+++ b/libraries/base/GHC/Float.hs
@@ -1294,7 +1294,7 @@ And with the rule:
 The running time of the program goes from 120 seconds to 0.198 seconds
 with the native backend, and 0.143 seconds with the C backend.
 
-A few more details in Trac #2251, and the patch message
+A few more details in #2251, and the patch message
 "Add RULES for realToFrac from Int".
 -}
 
diff --git a/libraries/base/GHC/IO.hs b/libraries/base/GHC/IO.hs
index 33113627a661c283deb15d81c6503df2c04ef176..0c28cf0352e037888f33daa108299d73cbba6809 100644
--- a/libraries/base/GHC/IO.hs
+++ b/libraries/base/GHC/IO.hs
@@ -440,7 +440,7 @@ evaluate a = IO $ \s -> seq# a s -- NB. see #2273, #5129
 {- $exceptions_and_strictness
 
 Laziness can interact with @catch@-like operations in non-obvious ways (see,
-e.g. GHC Trac #11555 and #13330). For instance, consider these subtly-different
+e.g. GHC #11555 and #13330). For instance, consider these subtly-different
 examples:
 
 > test1 = Control.Exception.catch (error "uh oh") (\(_ :: SomeException) -> putStrLn "it failed")
diff --git a/libraries/base/GHC/Int.hs b/libraries/base/GHC/Int.hs
index d87d352cb7b514aae474b61f9ac6f5383079e459..3185418d54ea15d46d63c55face4a56d5ef043b8 100644
--- a/libraries/base/GHC/Int.hs
+++ b/libraries/base/GHC/Int.hs
@@ -1148,7 +1148,7 @@ instance Ix Int64 where
 
 {- Note [Order of tests]
 ~~~~~~~~~~~~~~~~~~~~~~~~~
-(See Trac #3065, #5161.) Suppose we had a definition like:
+(See #3065, #5161.) Suppose we had a definition like:
 
     quot x y
      | y == 0                     = divZeroError
diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs
index d9b32ea9df69b2e3fb0fbcb8977931c4788d34ea..531669acd09cea531d265d0e227979dcc375f345 100644
--- a/libraries/base/GHC/List.hs
+++ b/libraries/base/GHC/List.hs
@@ -226,7 +226,7 @@ ensures that calls to FB functions can be written back to the original form
 when no fusion happens.
 
 Without these inline pragmas, the loop in perf/should_run/T13001 won't be
-allocation-free. Also see Trac #13001.
+allocation-free. Also see #13001.
 -}
 
 -- ----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/Read.hs b/libraries/base/GHC/Read.hs
index 2283942a8fca7e88a0548b543864d6bca48d7bc5..a79f4050794f220e7695e17cc2c7c1e6183ea5e0 100644
--- a/libraries/base/GHC/Read.hs
+++ b/libraries/base/GHC/Read.hs
@@ -383,7 +383,7 @@ readField fieldName readVal = do
 -- second argument is a parser for the field value.
 --
 -- Note that 'readField' does not suffice for this purpose due to
--- <https://ghc.haskell.org/trac/ghc/ticket/5041 Trac #5041>.
+-- <https://gitlab.haskell.org/ghc/ghc/issues/5041 #5041>.
 readFieldHash :: String -> ReadPrec a -> ReadPrec a
 readFieldHash fieldName readVal = do
         expectP (L.Ident fieldName)
@@ -420,7 +420,7 @@ readSymField fieldName readVal = do
 -- parsers. For large record types (e.g. 500 fields), this produces a
 -- significant performance boost.
 --
--- See also Trac #14364.
+-- See also #14364.
 
 
 --------------------------------------------------------------
diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs
index 2a9494f5b1d6f9f28bb58b41a1326455658fb86b..8a47720fe1eb079d2e2785f91e913071652faddb 100644
--- a/libraries/base/GHC/Real.hs
+++ b/libraries/base/GHC/Real.hs
@@ -295,7 +295,7 @@ never reach the condition in `numericEnumFromTo`
 
     9007199254740990 + 1 + 1 + ... > 9007199254740991 + 1/2
 
-We would fall into infinite loop (as reported in Trac #15081).
+We would fall into infinite loop (as reported in #15081).
 
 To remedy the situation, we record the number of `1` that needed to be added
 to the start number, rather than increasing `1` at every time. This approach
@@ -313,7 +313,7 @@ The benchmark on T7954.hs shows that this approach leads to significant
 degeneration on performance (33% increase allocation and 300% increase on
 elapsed time).
 
-See Trac #15081 and Phab:D4650 for the related discussion about this problem.
+See #15081 and Phab:D4650 for the related discussion about this problem.
 -}
 
 --------------------------------------------------------------
diff --git a/libraries/base/System/Environment/ExecutablePath.hsc b/libraries/base/System/Environment/ExecutablePath.hsc
index 095b25c236fa188a11cea0c5dc2600388f7f284e..2e213319bb49a226e042c3be07cc339bba0984f0 100644
--- a/libraries/base/System/Environment/ExecutablePath.hsc
+++ b/libraries/base/System/Environment/ExecutablePath.hsc
@@ -183,7 +183,7 @@ getFinalPath path = withCWString path $ \s ->
           | "\\\\?\\" `isPrefixOf` s = drop 4 s
           | otherwise                = s
 
-        -- see https://ghc.haskell.org/trac/ghc/ticket/14460
+        -- see https://gitlab.haskell.org/ghc/ghc/issues/14460
         rejectUNCPath s
           | "\\\\?\\UNC\\" `isPrefixOf` s = path
           | otherwise                     = s
diff --git a/libraries/base/System/Mem/Weak.hs b/libraries/base/System/Mem/Weak.hs
index 3a00696a4884feed5351e0223952ff24db2ae113..8d21eb59d9967f8037edb40a4644d8b051babd04 100644
--- a/libraries/base/System/Mem/Weak.hs
+++ b/libraries/base/System/Mem/Weak.hs
@@ -155,7 +155,7 @@ unreachable. There are two situations that can cause this:
 
  * If a finalizer throws an exception, subsequent finalizers that had
    been queued to run after it do not get run. This behavior may change
-   in a future release. See issue <https://ghc.haskell.org/trac/ghc/ticket/13167 13167>
+   in a future release. See issue <https://gitlab.haskell.org/ghc/ghc/issues/13167 13167>
    on the issue tracker. Writing a finalizer that throws exceptions is
    discouraged.
 
diff --git a/libraries/base/cbits/inputReady.c b/libraries/base/cbits/inputReady.c
index cfbced914f73cbba95f168227b6a354e747901ab..8d100e8fbee1c4b1c2da428564792e44e80f7092 100644
--- a/libraries/base/cbits/inputReady.c
+++ b/libraries/base/cbits/inputReady.c
@@ -9,7 +9,7 @@
  * Thus we raise it here (before any #include of network-related headers)
  * to 1024 so that at least those programs would work that would work on
  * Linux if that used select() (luckily it uses poll() by now).
- * See https://ghc.haskell.org/trac/ghc/ticket/13497#comment:23
+ * See https://gitlab.haskell.org/ghc/ghc/issues/13497#note_140304
  * The real solution would be to remove all uses of select()
  * on Windows, too, and use IO Completion Ports instead.
  * Note that on Windows, one can simply define FD_SETSIZE to the desired
@@ -141,7 +141,7 @@ compute_WaitForSingleObject_timeout(bool infinite, Time remaining)
  * reliably on Linux when the fd is a not-O_NONBLOCK socket, so if you pass
  * socket fds to this function, ensure they have O_NONBLOCK;
  * see `man 2 poll` and `man 2 select`, and
- * https://ghc.haskell.org/trac/ghc/ticket/13497#comment:26).
+ * https://gitlab.haskell.org/ghc/ghc/issues/13497#note_140309).
  *
  * This function blocks until either `msecs` have passed, or input is
  * available.
diff --git a/libraries/base/tests/IO/hReady001.hs b/libraries/base/tests/IO/hReady001.hs
index bb7be1c78b55489699c02d2e16e6eb3161cb4980..ef206876d6aa3d2a7f10b7124f3062be5e367b9e 100644
--- a/libraries/base/tests/IO/hReady001.hs
+++ b/libraries/base/tests/IO/hReady001.hs
@@ -1,6 +1,6 @@
 -- !!! hReady test
 
- -- hReady should throw and EOF exception at the end of a file. Trac #1063.
+ -- hReady should throw and EOF exception at the end of a file. #1063.
 
 import System.IO
 import System.IO.Error
diff --git a/libraries/base/tests/T11760.hs b/libraries/base/tests/T11760.hs
index 875c15916d9788ab9b524f38bc18537ac18f2df2..0582c7e37d4277fd4d74703966dd6a14a4403cd5 100644
--- a/libraries/base/tests/T11760.hs
+++ b/libraries/base/tests/T11760.hs
@@ -1,6 +1,6 @@
 -- Written by Bertram Felgenhauer
 --
--- https://ghc.haskell.org/trac/ghc/ticket/11760#comment:14
+-- https://gitlab.haskell.org/ghc/ghc/issues/11760#note_131217
 --
 -- Compile with -threaded -with-rtsopts=-N2
 
diff --git a/libraries/base/tests/fromJust.hs b/libraries/base/tests/fromJust.hs
index 2da524ffedb1ec71da939f2c0f8693e535d342ab..7c52807b42ccc03a21e67697cefbf801c8623267 100644
--- a/libraries/base/tests/fromJust.hs
+++ b/libraries/base/tests/fromJust.hs
@@ -1,6 +1,6 @@
 module Main where
 
--- Trac #15559: Add HasCallStack to fromJust
+-- #15559: Add HasCallStack to fromJust
 
 import Data.Maybe ( fromJust )
 
diff --git a/libraries/base/tests/genericNegative001.hs b/libraries/base/tests/genericNegative001.hs
index 7fb8192557a65c963f04c4e52f9417b1089aabc7..98457e282c9f95d3e90befa9d177d7995456433d 100644
--- a/libraries/base/tests/genericNegative001.hs
+++ b/libraries/base/tests/genericNegative001.hs
@@ -1,4 +1,4 @@
--- Test for http://ghc.haskell.org/trac/ghc/ticket/2533
+-- Test for https://gitlab.haskell.org/ghc/ghc/issues/2533
 import System.Environment
 import Data.List
 main = do
diff --git a/libraries/ghc-prim/cbits/atomic.c b/libraries/ghc-prim/cbits/atomic.c
index 0a471b31ad524d4f43bdddf00325ee70962fd832..a7d7544b4f54efbca67fffcbe3af8d0db4daf564 100644
--- a/libraries/ghc-prim/cbits/atomic.c
+++ b/libraries/ghc-prim/cbits/atomic.c
@@ -142,7 +142,7 @@ hs_atomic_and64(StgWord x, StgWord64 val)
 // See also:
 //
 //  * https://bugs.llvm.org/show_bug.cgi?id=8842
-//  * https://ghc.haskell.org/trac/ghc/ticket/9678
+//  * https://gitlab.haskell.org/ghc/ghc/issues/9678
 //
 
 #define CAS_NAND(x, val)                                            \
diff --git a/libraries/integer-gmp/changelog.md b/libraries/integer-gmp/changelog.md
index a70f214ed98a9a779ec0a199a74d0e1892682a57..036b14cdcd51df16bfcdeb79b93f733ea39841f4 100644
--- a/libraries/integer-gmp/changelog.md
+++ b/libraries/integer-gmp/changelog.md
@@ -54,7 +54,7 @@
 
   * Reduce short-lived heap allocation and try to demote `J#` back
     to `S#` more aggressively.  See also
-    [#8647](https://ghc.haskell.org/trac/ghc/ticket/8647)
+    [#8647](https://gitlab.haskell.org/ghc/ghc/issues/8647)
     for more details.
 
   * New GMP-specific binary (de)serialization primitives added to
diff --git a/libraries/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs b/libraries/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs
index b8b55e486ae24add1812b2c3625a9046895f3b9c..5f50c79e41853d448258bfd4b110e9eceb8b1bd5 100644
--- a/libraries/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs
+++ b/libraries/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs
@@ -23,7 +23,7 @@
 -- in "GHC.Float", we must expose this module, but it should not show
 -- up in the docs.
 --
--- See https://ghc.haskell.org/trac/ghc/ticket/5122
+-- See https://gitlab.haskell.org/ghc/ghc/issues/5122
 -- for the origin of the code in this module
 module GHC.Integer.Logarithms.Internals
     ( wordLog2#
diff --git a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
index bc9efe6e3d6f5cf7b963f8522f35e054f42f8470..84fc740426f410caf6089e2be115ba4b38ec8f00 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs
@@ -789,7 +789,7 @@ GHC's parser only recognises a kind signature in a type when there are
 parens around it.  E.g. the parens are required here:
    f :: (Int :: *)
    type instance F Int = (Bool :: *)
-So we always print a SigT with parens (see Trac #10050). -}
+So we always print a SigT with parens (see #10050). -}
 
 pprTyApp :: (Type, [TypeArg]) -> Doc
 pprTyApp (ArrowT, [TANormal arg1, TANormal arg2]) = sep [pprFunArgType arg1 <+> text "->", ppr arg2]
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index 690d63807cce122448a95ade34f1a056db3916a3..31422a1b66cab7eabe0d8abf2a66d452a2a76516 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -255,7 +255,7 @@ unsafeTExpCoerce m = do { e <- m
 {- Note [Role of TExp]
 ~~~~~~~~~~~~~~~~~~~~~~
 TExp's argument must have a nominal role, not phantom as would
-be inferred (Trac #8459).  Consider
+be inferred (#8459).  Consider
 
   e :: TExp Age
   e = MkAge 3
@@ -912,12 +912,12 @@ function.  Two complications
 
 * In such a case, we must take care to build the Name using
   mkNameG_v (for values), not mkNameG_d (for data constructors).
-  See Trac #10796.
+  See #10796.
 
 * The pseudo-constructor is named only by its string, here "pack".
   But 'dataToQa' needs the TyCon of its defining module, and has
   to assume it's defined in the same module as the TyCon itself.
-  But nothing enforces that; Trac #12596 shows what goes wrong if
+  But nothing enforces that; #12596 shows what goes wrong if
   "pack" is defined in a different module than the data type "Text".
   -}
 
@@ -933,7 +933,7 @@ dataToExpQ = dataToQa varOrConE litE (foldl appE)
     where
           -- Make sure that VarE is used if the Constr value relies on a
           -- function underneath the surface (instead of a constructor).
-          -- See Trac #10796.
+          -- See #10796.
           varOrConE s =
             case nameSpace s of
                  Just VarName  -> return (VarE s)
@@ -1226,7 +1226,7 @@ mkName str
         --      mkName "&." = Name "&." NameS
         -- The 'is_rev_mod' guards ensure that
         --      mkName ".&" = Name ".&" NameS
-        --      mkName "^.." = Name "^.." NameS      -- Trac #8633
+        --      mkName "^.." = Name "^.." NameS      -- #8633
         --      mkName "Data.Bits..&" = Name ".&" (NameQ "Data.Bits")
         -- This rather bizarre case actually happened; (.&.) is in Data.Bits
     split occ (c:rev)   = split (c:occ) rev
diff --git a/mk/build.mk.sample b/mk/build.mk.sample
index 601ab028e56e9809dc6c9e7fc49268fd06c99dac..0f5bc222f2f8c5b9ef9f22387dfc591a022057c8 100644
--- a/mk/build.mk.sample
+++ b/mk/build.mk.sample
@@ -34,7 +34,7 @@
 # Even faster build.  NOT RECOMMENDED: the libraries will be
 # completely unoptimised, so any code built with this compiler
 # (including stage2) will run very slowly, and many GHC tests
-# will fail with this profile (see Trac #12141):
+# will fail with this profile (see #12141):
 #BuildFlavour = quickest
 
 # Profile the stage2 compiler:
diff --git a/mk/flavours/validate.mk b/mk/flavours/validate.mk
index ba33584488e8ac1cd00c6352dddfaef09aeec492..3fd916afb0fb6b4a98b43f2afc379a5e99e45a6f 100644
--- a/mk/flavours/validate.mk
+++ b/mk/flavours/validate.mk
@@ -1,5 +1,5 @@
 SRC_HC_OPTS        = -O0 -H64m
-SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage   # See Trac 11487
+SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage   # See #11487
 GhcStage1HcOpts    = -O2 -DDEBUG
 GhcStage2HcOpts    = -O -dcore-lint -dno-debug-output
 GhcLibHcOpts       = -O -dcore-lint -dno-debug-output
diff --git a/mk/install.mk.in b/mk/install.mk.in
index aa3afea2b9b00ffd53d9bf7e90c9d9a2e866a9ac..f3f9ce0507f28c1e558744ca29266c6cd44961d7 100644
--- a/mk/install.mk.in
+++ b/mk/install.mk.in
@@ -40,7 +40,7 @@
 #
 # NOTE: The default e.g. ${docdir} above means that autoconf substitutes the
 # string "${docdir}", not the value of docdir! This is crucial for the GNU
-# coding standards. See Trac #1924.
+# coding standards. See #1924.
 
 define set_default
 # $1 = variable to set
diff --git a/packages b/packages
index 40141ac21731d7ec92661f769704f8af93484121..34e78c3e353193aa76f436bcde6db96e96eecd48 100644
--- a/packages
+++ b/packages
@@ -4,7 +4,7 @@
 # * rules/foreachLibrary.mk
 #
 # Some of this information is duplicated elsewhere in the build system:
-#    See Trac #3896
+#    See #3896
 # In particular when adding libraries to this file, you also need to add
 # the library to the SUBDIRS variable in libraries/Makefile so that they
 # actually get built
diff --git a/rts/Apply.cmm b/rts/Apply.cmm
index 0454fd69e2ebe14930834572585af1103cb95e16..b08a8bf5385bff9ddffe9c516eaa0589c0c93dd5 100644
--- a/rts/Apply.cmm
+++ b/rts/Apply.cmm
@@ -461,7 +461,7 @@ for:
 /*
  Note [AP_STACKs must be eagerly blackholed]
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Trac #13615 describes a nasty concurrency issue where we can enter into the
+#13615 describes a nasty concurrency issue where we can enter into the
 middle of an ST action multiple times, resulting in duplication of effects.
 In short, the construction of an AP_STACK allows us to suspend a computation
 which should not be duplicated. When running with lazy blackholing, we can then
diff --git a/rts/Linker.c b/rts/Linker.c
index 06b36ca88e5c12153318c845e1c5032358227785..b293b6a83940d229f3439bde502926678aa03bc1 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -249,7 +249,7 @@ static void ghciRemoveSymbolTable(HashTable *table, const SymbolName* key,
 
  Some test have been written for weak symbols but have been disabled
  mostly because it's unsure how the weak symbols support should look.
- See Trac #11223
+ See #11223
  */
 int ghciInsertSymbolTable(
    pathchar* obj_name,
@@ -679,7 +679,7 @@ addDLL( pathchar *dll_name )
       return NULL;
    }
 
-   // GHC Trac ticket #2615
+   // GHC #2615
    // On some systems (e.g., Gentoo Linux) dynamic files (e.g. libc.so)
    // contain linker scripts rather than ELF-format object code. This
    // code handles the situation by recognizing the real object code
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index 9ab4ff1c9dae3d339e86c6f0850397aedb29551b..5e3f8940a0bbe9a6374b53d7fff1ee62734e8bf3 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -414,7 +414,7 @@ initHeapProfiling(void)
         stg_exit(EXIT_FAILURE);
     }
 #if defined(THREADED_RTS)
-    // See Trac #12019.
+    // See #12019.
     if (doingLDVProfiling() && RtsFlags.ParFlags.nCapabilities > 1) {
         errorBelch("-hb cannot be used with multiple capabilities");
         stg_exit(EXIT_FAILURE);
diff --git a/rts/RtsAPI.c b/rts/RtsAPI.c
index 9396dccc07258cf91b9b1629f2ee3aebb69d1bd2..26433ac209ba19aa13c1e6fd9d91899f254069db 100644
--- a/rts/RtsAPI.c
+++ b/rts/RtsAPI.c
@@ -464,7 +464,7 @@ void rts_evalIO (/* inout */ Capability **cap,
  * rts_evalStableIOMain() is suitable for calling main Haskell thread
  * stored in (StablePtr (IO a)) it calls rts_evalStableIO but wraps
  * function in GHC.TopHandler.runMainIO that installs top_handlers.
- * See Trac #12903.
+ * See #12903.
  */
 void rts_evalStableIOMain(/* inout */ Capability **cap,
                           /* in    */ HsStablePtr s,
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 37eafa5c55fa0f6799c38767217f09798ef7144f..0fb6ed6d9be17a603478849ae993a809900ab368 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -797,7 +797,7 @@ static void procRtsOpts (int rts_argc0,
 
         } else {
             /* 0 is dash, 1 is first letter */
-            /* see Trac #9839 */
+            /* see #9839 */
             unchecked_arg_start = 1;
             switch(rts_argv[arg][1]) {
 
@@ -1566,12 +1566,12 @@ error = true;
                 break;  /* defensive programming */
 
             /* check the rest to be sure there is nothing afterwards.*/
-            /* see Trac #9839 */
+            /* see #9839 */
             check_rest:
                 {
                     /* start checking from the first unchecked position,
                      * not from index 2*/
-                    /* see Trac #9839 */
+                    /* see #9839 */
                     if (rts_argv[arg][unchecked_arg_start] != '\0') {
                       errorBelch("flag -%c given an argument"
                                  " when none was expected: %s",
@@ -1687,7 +1687,7 @@ static void normaliseRtsOpts (void)
 
         // If allocation area is larger that CPU cache
         // we can finish scanning quicker doing work-stealing
-        // scan. Trac #9221
+        // scan. #9221
         // 32M looks big enough not to fit into L2 cache
         // of popular modern CPUs.
         if (alloc_area_bytes >= 32 * 1024 * 1024) {
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index 618815de76430ee1afc9c1e72abc8fe013da567e..d5fa16874c0bf8cf897bcc953479ec1ddbc6fb0a 100644
--- a/rts/RtsUtils.c
+++ b/rts/RtsUtils.c
@@ -306,7 +306,7 @@ void printRtsInfo(const RtsConfig rts_config) {
     mkRtsInfoPair("Word size",               TOSTRING(WORD_SIZE_IN_BITS));
     mkRtsInfoPair("Compiler unregisterised", GhcUnregisterised);
     mkRtsInfoPair("Tables next to code",     GhcEnableTablesNextToCode);
-    mkRtsInfoPair("Flag -with-rtsopts",      /* See Trac #15261 */
+    mkRtsInfoPair("Flag -with-rtsopts",      /* See #15261 */
         rts_config.rts_opts != NULL ? rts_config.rts_opts : "");
     printf(" ]\n");
 }
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 02055d25661756b00facf7c3daf0b1b618f0c5a0..7ffd44d22fa3dd22feee29bda3697f51cda80cc0 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -2122,7 +2122,7 @@ forkProcess(HsStablePtr *entry
 
         // Install toplevel exception handlers, so interruption
         // signal will be sent to the main thread.
-        // See Trac #12903
+        // See #12903
         rts_evalStableIOMain(&cap, entry, NULL);  // run the action
         rts_checkSchedStatus("forkProcess",cap);
 
diff --git a/rts/StablePtr.c b/rts/StablePtr.c
index 0f53ffcdc4e2b9345428f3f0f966e9486692d1c4..2181b83d904194bdd20f207552ca37767b0f50e7 100644
--- a/rts/StablePtr.c
+++ b/rts/StablePtr.c
@@ -85,7 +85,7 @@
 
   Future plans for stable ptrs include distinguishing them by the
   generation of the pointed object. See
-  http://ghc.haskell.org/trac/ghc/ticket/7670 for details.
+  https://gitlab.haskell.org/ghc/ghc/issues/7670 for details.
 */
 
 spEntry *stable_ptr_table = NULL;
diff --git a/rts/StgPrimFloat.c b/rts/StgPrimFloat.c
index f1f6736e0101f4f126e165d6083ef92d9f5859a8..b7b0f103324405dc35362d4852b1d605243f69f9 100644
--- a/rts/StgPrimFloat.c
+++ b/rts/StgPrimFloat.c
@@ -48,7 +48,7 @@
 
 #define __abs(a)                (( (a) >= 0 ) ? (a) : (-(a)))
 
-/** Trac #15271: Some large ratios are converted into double incorrectly.
+/** #15271: Some large ratios are converted into double incorrectly.
   * This occurs when StgInt has 64 bits and C int has 32 bits, where wrapping
   * occurs and an incorrect signed value is passed into ldexp */
 STATIC_INLINE int
diff --git a/rts/linker/LoadArchive.c b/rts/linker/LoadArchive.c
index d03b416f1e15411d07762870aebd0cf01f1aa91b..a92f86fff00dca13f27551aa238d6233325d8095 100644
--- a/rts/linker/LoadArchive.c
+++ b/rts/linker/LoadArchive.c
@@ -459,7 +459,7 @@ static HsInt loadArchive_ (pathchar *path)
         DEBUG_LOG("Found member file `%s'\n", fileName);
 
         /* TODO: Stop relying on file extensions to determine input formats.
-                 Instead try to match file headers. See Trac #13103.  */
+                 Instead try to match file headers. See #13103.  */
         isObject = (thisFileNameSize >= 2 && strncmp(fileName + thisFileNameSize - 2, ".o"  , 2) == 0)
                 || (thisFileNameSize >= 4 && strncmp(fileName + thisFileNameSize - 4, ".p_o", 4) == 0)
                 || (thisFileNameSize >= 4 && strncmp(fileName + thisFileNameSize - 4, ".obj", 4) == 0);
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 347c7c1a5c2e3b1ff514c9d87c8e552e684efb7a..6bec6b8602a294e2245a129eede4a61a7d13fe2e 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -242,7 +242,7 @@ my_mmap (void *addr, W_ size, int operation)
     if (ret == MAP_FAILED && errno == EPERM) {
         // Linux may return EPERM if it tried to give us
         // a chunk of address space below mmap_min_addr,
-        // See Trac #7500.
+        // See #7500.
         ret = linux_retry_mmap(operation, size, ret, addr, prot, flags);
     }
 # endif
diff --git a/rts/posix/Select.c b/rts/posix/Select.c
index 270e6ff45ce934199b13d3ec33d9049e6bdf90c8..211d47dbece06f45866948176b91a1724c21f189 100644
--- a/rts/posix/Select.c
+++ b/rts/posix/Select.c
@@ -417,7 +417,7 @@ awaitEvent(bool wait)
               case RTS_FD_IS_INVALID:
                   /*
                    * Don't let RTS loop on such descriptors,
-                   * pass an IOError to blocked threads (Trac #4934)
+                   * pass an IOError to blocked threads (#4934)
                    */
                   IF_DEBUG(scheduler,
                       debugBelch("Killing blocked thread %lu on bad fd=%i\n",
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index dcc5b3a3c740ee74ae93b94b4cfd65360327a2a3..4636bf45e37dcb91aa8bee26a4e3fd5d90741460 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1372,7 +1372,7 @@ extern void __clear_cache(void * begin, void * end);
 #elif defined(__GNUC__)
 /* __clear_cache is a libgcc function.
  * It existed before __builtin___clear_cache was introduced.
- * See Trac #8562.
+ * See #8562.
  */
 extern void __clear_cache(char * begin, char * end);
 #endif /* __GNUC__ */
diff --git a/rts/win32/GetTime.c b/rts/win32/GetTime.c
index 014a676e992991ff521b7433e8160197e726f6f3..61a978e2aa6ec5749204b205d2cac2192bbac5b2 100644
--- a/rts/win32/GetTime.c
+++ b/rts/win32/GetTime.c
@@ -87,7 +87,7 @@ getMonotonicNSec()
         // TODO: Remove this code path, it cannot be taken because
         // `QueryPerformanceFrequency` cannot fail on Windows >= XP
         // and GHC no longer supports Windows <= XP.
-        // See https://ghc.haskell.org/trac/ghc/ticket/14233
+        // See https://gitlab.haskell.org/ghc/ghc/issues/14233
 
         // NOTE: GetTickCount is a 32-bit millisecond value, so it wraps around
         // every 49 days.
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 82c55a70e1f22972dbb75d9cda16fd254ef0bb5e..4ea93e93d5659ed9bc286f9de9d43909b2535ff2 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -200,7 +200,7 @@ $1/$2/build/tmp/$$($1_$2_PROG) $1/$2/build/tmp/$$($1_$2_PROG).dll : \
     $$(foreach dep,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),\
         $$$$($$(dep)_dist-$(if $(filter 0,$3),boot,install)_PROGRAM_DEP_LIB))
 # Workaround: We use TRANSITIVE_DEP_COMPONENT_IDS here as a workaround for
-# Trac #12078.
+# #12078.
 
 $1_$2_PROG_NEEDS_C_WRAPPER = NO
 $1_$2_PROG_INPLACE = $$($1_$2_PROG)
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 309a910dcf3f201c4b8852c60986ba98ea8ffa3f..ed336c922a8d3dfb9cba0137e3782b8dd7eefc7d 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1820,7 +1820,7 @@ def normalise_errmsg( str ):
     str = str.replace(bullet, '')
 
     # Windows only, this is a bug in hsc2hs but it is preventing
-    # stable output for the testsuite. See Trac #9775. For now we filter out this
+    # stable output for the testsuite. See #9775. For now we filter out this
     # warning message to get clean output.
     if config.msys:
         str = re.sub('Failed to remove file (.*); error= (.*)$', '', str)
@@ -2091,7 +2091,7 @@ if config.msys:
         # still locked then abort the current test by throwing an exception, this so it won't fail
         # with an even more cryptic error.
         #
-        # See Trac #13162
+        # See #13162
         exception = None
         while retries > 0 and os.path.exists(testdir):
             time.sleep((max_attempts-retries)*6)
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index a517698fe143e92fd3288261a4abee7cb24edcac..b1d716fd77888495b0070a4cc7e1a394a200d8b3 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -53,7 +53,7 @@ TEST_HC_OPTS += -fdiagnostics-color=never
 TEST_HC_OPTS += -fno-diagnostics-show-caret
 endif
 
-# See Trac #15278.
+# See #15278.
 TEST_HC_OPTS += -Werror=compat
 
 # Add the no-debug-output last as it is often convenient to copy the test invocation
diff --git a/testsuite/tests/annotations/should_fail/T10826.stderr b/testsuite/tests/annotations/should_fail/T10826.stderr
index 0e2bed5d8bec9d473227b5ade5035b7ec8f60c00..465715ad3eafb5319e36e34fc3784a95a4981348 100644
--- a/testsuite/tests/annotations/should_fail/T10826.stderr
+++ b/testsuite/tests/annotations/should_fail/T10826.stderr
@@ -1,6 +1,6 @@
 
 T10826.hs:6:1: error:
     Annotations are not compatible with Safe Haskell.
-    See https://ghc.haskell.org/trac/ghc/ticket/10826
+    See https://gitlab.haskell.org/ghc/ghc/issues/10826
     In the annotation:
       {-# ANN hook (unsafePerformIO (putStrLn "Woops.")) #-}
diff --git a/testsuite/tests/arrows/should_compile/arrowpat.hs b/testsuite/tests/arrows/should_compile/arrowpat.hs
index dda06cfedf223152b6b63f64e97644deb24f2b1f..7e117f9c86c6ed3c03415d367a472ddc0dd30ea4 100644
--- a/testsuite/tests/arrows/should_compile/arrowpat.hs
+++ b/testsuite/tests/arrows/should_compile/arrowpat.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE Arrows #-}
 {-# OPTIONS -fno-warn-redundant-constraints #-}
 
--- Test for Trac #1662
+-- Test for #1662
 
 module Arrow where
 
diff --git a/testsuite/tests/arrows/should_fail/T2111.hs b/testsuite/tests/arrows/should_fail/T2111.hs
index 352afe2abe574d693ec96d7ce33f1c8ae29e8faf..2123773a35b0007e5867bec0da6a25f4e5586d93 100644
--- a/testsuite/tests/arrows/should_fail/T2111.hs
+++ b/testsuite/tests/arrows/should_fail/T2111.hs
@@ -1,5 +1,5 @@
 {-# OPTIONS_GHC -XArrows -XRecursiveDo#-}
--- Test Trac #2111
+-- Test #2111
 
 module Foo where
 
diff --git a/testsuite/tests/arrows/should_fail/all.T b/testsuite/tests/arrows/should_fail/all.T
index cc3d7d5369195a16af27140fc93a4a012e36a490..4445ecd1650551ab40202bfa6c6f02c3365bfb8e 100644
--- a/testsuite/tests/arrows/should_fail/all.T
+++ b/testsuite/tests/arrows/should_fail/all.T
@@ -4,7 +4,7 @@ test('arrowfail001',
      [''])
  # arrowfail001 got an ASSERT error in the stage1 compiler
  # because we simply are not typechecking arrow commands
- # correctly.  See Trac #5267, #5609, #5605
+ # correctly.  See #5267, #5609, #5605
  # The fix is patch 'Fix the scope-nesting for arrows' Dec 2014
 
 test('arrowfail002', normal, compile_fail, [''])
diff --git a/testsuite/tests/arrows/should_fail/arrowfail004.hs b/testsuite/tests/arrows/should_fail/arrowfail004.hs
index 3e0835a0e4fdbd9925264eb72ec94a2732c58a2c..dafe087cda4757726128c9df4aeb3ab163286812 100644
--- a/testsuite/tests/arrows/should_fail/arrowfail004.hs
+++ b/testsuite/tests/arrows/should_fail/arrowfail004.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE Arrows, ExistentialQuantification #-}
 
--- Trac #1662
+-- #1662
 
 module ShouldFail where
 
diff --git a/testsuite/tests/boxy/Compose.hs b/testsuite/tests/boxy/Compose.hs
index 0caa84cbe18dd38bc88ceb8e9fa5025afcd67294..f3d3a10b285e9f3b0050fc90845b5dadc06b7b9f 100644
--- a/testsuite/tests/boxy/Compose.hs
+++ b/testsuite/tests/boxy/Compose.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XImpredicativeTypes -fno-warn-deprecated-flags -XEmptyDataDecls -XGADTs #-}
 
--- Trac #1118
+-- #1118
 
 module Compose where
 
diff --git a/testsuite/tests/codeGen/should_run/cgrun058.hs b/testsuite/tests/codeGen/should_run/cgrun058.hs
index 9bdd551acf2ae78758ad57d7c2e33fc1c0a8ea8e..164fa8a850207996cfce6e8de43d403babe1f22a 100644
--- a/testsuite/tests/codeGen/should_run/cgrun058.hs
+++ b/testsuite/tests/codeGen/should_run/cgrun058.hs
@@ -1,5 +1,5 @@
 -- Not really a code-gen test, but this program gave
--- incorrect results in Hugs (Hugs Trac #37), so I
+-- incorrect results in Hugs (Hugs #37), so I
 -- thought I'd add it to GHC's test suite.
 
 module Main where
diff --git a/testsuite/tests/codeGen/should_run/cgrun063.hs b/testsuite/tests/codeGen/should_run/cgrun063.hs
index 14f3cb8d145a0435fe13accd7fa8f59f1a1feaf2..8439d3abf01d5c291c804115ac83e40deb70b157 100644
--- a/testsuite/tests/codeGen/should_run/cgrun063.hs
+++ b/testsuite/tests/codeGen/should_run/cgrun063.hs
@@ -1,7 +1,7 @@
 
 {-
 Check that we aren't making gcc misinterpret our strings as trigraphs.
-Trac #2968.
+#2968.
 http://gcc.gnu.org/onlinedocs/cpp/Initial-processing.html
 -}
 
diff --git a/testsuite/tests/codeGen/should_run/cgrun071.hs b/testsuite/tests/codeGen/should_run/cgrun071.hs
index d55ee65e018a41810b4a3ce8e9692b69c24e2961..c8ee2d17f9049f705a080488d8dfb81108234143 100644
--- a/testsuite/tests/codeGen/should_run/cgrun071.hs
+++ b/testsuite/tests/codeGen/should_run/cgrun071.hs
@@ -37,7 +37,7 @@ popcnt64 (W64# w#) =
     W# (popCnt# w#)
 #endif
 
--- Cribbed from http://ghc.haskell.org/trac/ghc/ticket/3563
+-- Cribbed from https://gitlab.haskell.org/ghc/ghc/issues/3563
 slowPopcnt :: Word -> Word
 slowPopcnt x = count' (bitSize x) x 0
   where
diff --git a/testsuite/tests/deSugar/should_compile/T2409.hs b/testsuite/tests/deSugar/should_compile/T2409.hs
index 163786bb58ad4b26a25c4be95e64d2fbecb0458d..bde05cd3e14f37d1aa54f14e7109e48b12c276ca 100644
--- a/testsuite/tests/deSugar/should_compile/T2409.hs
+++ b/testsuite/tests/deSugar/should_compile/T2409.hs
@@ -1,4 +1,4 @@
--- Trac #2409
+-- #2409
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/deSugar/should_compile/T3263-1.hs b/testsuite/tests/deSugar/should_compile/T3263-1.hs
index 74249cd663793137ea7eea60aa639a7c3da8697c..42ae81108406e1b6594ed24fdf839732a4b0bbb8 100644
--- a/testsuite/tests/deSugar/should_compile/T3263-1.hs
+++ b/testsuite/tests/deSugar/should_compile/T3263-1.hs
@@ -1,4 +1,4 @@
--- Trac #3263.  New kind of warning on ignored monadic bindings
+-- #3263.  New kind of warning on ignored monadic bindings
 
 module T3263 where
 
diff --git a/testsuite/tests/deSugar/should_compile/T3263-2.hs b/testsuite/tests/deSugar/should_compile/T3263-2.hs
index 71288062c52ef3feb7c7e099a38d068765a5f314..f018ddb4d9affdc9cbf63d673addb21d0d1e5d65 100644
--- a/testsuite/tests/deSugar/should_compile/T3263-2.hs
+++ b/testsuite/tests/deSugar/should_compile/T3263-2.hs
@@ -1,4 +1,4 @@
--- Trac #3263.  New kind of warning on monadic bindings that discard a monadic result
+-- #3263.  New kind of warning on monadic bindings that discard a monadic result
 
 module T3263 where
 
diff --git a/testsuite/tests/deSugar/should_compile/T5252.hs b/testsuite/tests/deSugar/should_compile/T5252.hs
index 70a4531688466bcf2a99e935c59e2ec692d6e3dc..ec7399d3cf3943af79b755e4319daffa055c9b17 100644
--- a/testsuite/tests/deSugar/should_compile/T5252.hs
+++ b/testsuite/tests/deSugar/should_compile/T5252.hs
@@ -1,4 +1,4 @@
--- Trac #5252
+-- #5252
 -- Killed 7.03 when compiled witout -O,
 -- because it could not see that x had a product type
 -- but MkS still unpacked it
diff --git a/testsuite/tests/deSugar/should_compile/ds062.hs b/testsuite/tests/deSugar/should_compile/ds062.hs
index 18bd5d53e5cf400ff1f7e84d2416ab4e397bf048..724c1bf768333bb46b0176c2383ed95c3e3f1d11 100644
--- a/testsuite/tests/deSugar/should_compile/ds062.hs
+++ b/testsuite/tests/deSugar/should_compile/ds062.hs
@@ -7,5 +7,5 @@ f x | null x    = 1
     | otherwise = 2
 
 -- Should not give a non-exhaustive-patterns error
--- See Trac #1759
+-- See #1759
 
diff --git a/testsuite/tests/deSugar/should_compile/ds063.hs b/testsuite/tests/deSugar/should_compile/ds063.hs
index 74bde90887337cd9735892d76e7c7f68165dd363..9c39bd6d4cf76d35cc3fef858cbe5fdc3bf07282 100644
--- a/testsuite/tests/deSugar/should_compile/ds063.hs
+++ b/testsuite/tests/deSugar/should_compile/ds063.hs
@@ -8,4 +8,4 @@ f ((+1) -> 1) = 5
 f _           = 3
 
 -- Should not give an overlapping-patterns or non-exhaustive-patterns error
--- See Trac #2395
+-- See #2395
diff --git a/testsuite/tests/deSugar/should_run/T12595.hs b/testsuite/tests/deSugar/should_run/T12595.hs
index 86e0419f65879382cc7d94b2296875ff0cc22f45..7adb07cb006545980ffba72d44af09420353b890 100644
--- a/testsuite/tests/deSugar/should_run/T12595.hs
+++ b/testsuite/tests/deSugar/should_run/T12595.hs
@@ -3,7 +3,7 @@ module Main where
 
 import GHC.Base
 
--- In Trac #12595 a bogus desugaring led (bizarrely)
+-- In #12595 a bogus desugaring led (bizarrely)
 -- to a top-level binding maxInt = maxInt
 -- This test just checks that doesn't happen again
 
diff --git a/testsuite/tests/deSugar/should_run/T246.hs b/testsuite/tests/deSugar/should_run/T246.hs
index 448141cd652649cee68f2c54c6c0327d1ae43fbe..2845db3ab079ed6683373a4bb09eeb6af2bf36a5 100644
--- a/testsuite/tests/deSugar/should_run/T246.hs
+++ b/testsuite/tests/deSugar/should_run/T246.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE ScopedTypeVariables #-}
--- Test Trac #246
+-- Test #246
 
 module Main where
 
diff --git a/testsuite/tests/dependent/should_compile/T16326_Compile1.hs b/testsuite/tests/dependent/should_compile/T16326_Compile1.hs
index 789798b3708ea14b06106886343fe771cfdb2901..138ab486ca811657e54804866973fa61d64312b1 100644
--- a/testsuite/tests/dependent/should_compile/T16326_Compile1.hs
+++ b/testsuite/tests/dependent/should_compile/T16326_Compile1.hs
@@ -21,7 +21,7 @@ type DComp a
   f (g x)
 
 -- Ensure that ElimList has a CUSK, beuas it is
--- is used polymorphically its RHS (c.f. Trac #16344)
+-- is used polymorphically its RHS (c.f. #16344)
 type family ElimList (a :: Type)
                      (p :: [a] -> Type)
                      (s :: [a])
diff --git a/testsuite/tests/deriving/should_compile/T2378.hs b/testsuite/tests/deriving/should_compile/T2378.hs
index 4f12313fc07a98b4b16aeb252044477a4400a881..cd5d35128ecc58c21db1ab61f0bb73c978691012 100644
--- a/testsuite/tests/deriving/should_compile/T2378.hs
+++ b/testsuite/tests/deriving/should_compile/T2378.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-}
 module Foo( T ) where
 
--- Trac 2378
+-- #2378
 
 import Data.Data
 
diff --git a/testsuite/tests/deriving/should_compile/T2721.hs b/testsuite/tests/deriving/should_compile/T2721.hs
index 916916d25038a71be20a1646aec3b3c941dcec42..53a51d3c06c725fe68eb41904d1382312a4867e1 100644
--- a/testsuite/tests/deriving/should_compile/T2721.hs
+++ b/testsuite/tests/deriving/should_compile/T2721.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE UndecidableInstances #-}
--- Trac #2721
+-- #2721
 
 module T2721 where
 
diff --git a/testsuite/tests/deriving/should_compile/T2856.hs b/testsuite/tests/deriving/should_compile/T2856.hs
index fc309585fe97a306aa9aec9c9a2e59c06b4cac36..0e91e4e747f9f9328b88498554f91dea2ec7bd2d 100644
--- a/testsuite/tests/deriving/should_compile/T2856.hs
+++ b/testsuite/tests/deriving/should_compile/T2856.hs
@@ -1,7 +1,7 @@
 {-# OPTIONS -fno-warn-redundant-constraints #-}
 {-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, StandaloneDeriving, FlexibleInstances #-}
 
--- Test Trac #2856
+-- Test #2856
 
 module T2856 where
 
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index 5aa102b871095dff9f9a17f77b3b223d0a2b0ac4..23f152e1951fb52237e7d62d7d58dedfa8a888f8 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -39,7 +39,7 @@ test('drv-foldable-traversable1', normal, compile, [''])
 test('deriving-via-compile', normal, compile, [''])
 test('deriving-via-standalone', normal, compile, [''])
 test('T6031', [], multimod_compile, ['T6031', '-v0 -O'])
-# Adding -O on T6031 to expose Trac #11245 regardless of way
+# Adding -O on T6031 to expose #11245 regardless of way
 test('T1133', [], makefile_test, [])
 test('T7704', normal, compile, [''])
 test('T7710', normal, compile, [''])
diff --git a/testsuite/tests/deriving/should_compile/deriving-1935.hs b/testsuite/tests/deriving/should_compile/deriving-1935.hs
index 8bccd5818225706ace2769524394bb98ab1fc070..add1f73590fdc47aaf8ab720d042c0963a52e7a5 100644
--- a/testsuite/tests/deriving/should_compile/deriving-1935.hs
+++ b/testsuite/tests/deriving/should_compile/deriving-1935.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XDeriveDataTypeable #-}
 
--- Trac #1935
+-- #1935
 -- See Note [Superclasses of derived instance] in TcDeriv
 
 {-# OPTIONS -fno-warn-redundant-constraints #-}
diff --git a/testsuite/tests/deriving/should_compile/drv012.hs b/testsuite/tests/deriving/should_compile/drv012.hs
index 1d07a4ee9688c49d54c39ecb84c88fdb0f9227f9..c7e696fa49fa67807125f703f22e4ced4204d4fd 100644
--- a/testsuite/tests/deriving/should_compile/drv012.hs
+++ b/testsuite/tests/deriving/should_compile/drv012.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE GADTs #-}
 
 -- !!! deriving for GADTs which declare Haskell98 data types.
--- bug reported as http://ghc.haskell.org/trac/ghc/ticket/902
+-- bug reported as https://gitlab.haskell.org/ghc/ghc/issues/902
 module ShouldSucceed where
 
 data Maybe1 a where {
diff --git a/testsuite/tests/deriving/should_fail/T2394.hs b/testsuite/tests/deriving/should_fail/T2394.hs
index 6e62bc364ed9d865ad597f9f334e73d9cfe52205..32cbe0edcc9116f1c8e57d7e9d756e094a59a1c2 100644
--- a/testsuite/tests/deriving/should_fail/T2394.hs
+++ b/testsuite/tests/deriving/should_fail/T2394.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XDeriveDataTypeable -XStandaloneDeriving #-}
 
--- Test Trac #2394
+-- Test #2394
 
 module Foo where
 
diff --git a/testsuite/tests/deriving/should_fail/T2851.hs b/testsuite/tests/deriving/should_fail/T2851.hs
index bc7239af0a917cb882067553538285ec94ccb3e8..9973780760d91b09e7e547b0799f61484e13ffd9 100644
--- a/testsuite/tests/deriving/should_fail/T2851.hs
+++ b/testsuite/tests/deriving/should_fail/T2851.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE TypeFamilies #-}
--- Test Trac #2851
+-- Test #2851
 
 module T2851 where
 
diff --git a/testsuite/tests/deriving/should_fail/drvfail012.hs b/testsuite/tests/deriving/should_fail/drvfail012.hs
index 4a073bbed10bd3bc40b9715ee58bcb025ec974e7..e2bedc7abfa5d1e9bfb312a9f2a936bb3b689934 100644
--- a/testsuite/tests/deriving/should_fail/drvfail012.hs
+++ b/testsuite/tests/deriving/should_fail/drvfail012.hs
@@ -1,4 +1,4 @@
--- Trac #1608
+-- #1608
 
 module ShouldFail where
 
diff --git a/testsuite/tests/deriving/should_run/T2529.hs b/testsuite/tests/deriving/should_run/T2529.hs
index d3c3a4b0a3097391bc370ada2d37665b60b34e77..c818c3697cc6d50e3b006f6f90ae92188f86a5c2 100644
--- a/testsuite/tests/deriving/should_run/T2529.hs
+++ b/testsuite/tests/deriving/should_run/T2529.hs
@@ -1,4 +1,4 @@
--- Trac #2529
+-- #2529
 -- The example below successfully performed the {{{show}}}, but {{{reads}}}
 -- returns an empty list. It fails in both GHCi and GHC. It succeeds if you
 -- replaces the infix symbol with a name.
diff --git a/testsuite/tests/eyeball/T3116.hs b/testsuite/tests/eyeball/T3116.hs
index ba2439c897081a80c5b24241166bfa2f848dbefc..b193715dbd0774bab8b091801056b96ca6e0f952 100644
--- a/testsuite/tests/eyeball/T3116.hs
+++ b/testsuite/tests/eyeball/T3116.hs
@@ -3,7 +3,7 @@
 -- The thing to look for here is that the implementation
 -- of 'length' does not allocate in the inner loop
 --
--- See Trac #3116
+-- See #3116
 
 module T3116 where
 
diff --git a/testsuite/tests/eyeball/record1.hs b/testsuite/tests/eyeball/record1.hs
index dde6f5ee25634c09409c428b52e8b70eb316ef04..8e3bd92471ff6934a3d212b1db6de6611a36523d 100644
--- a/testsuite/tests/eyeball/record1.hs
+++ b/testsuite/tests/eyeball/record1.hs
@@ -1,7 +1,7 @@
 -- Check that the record selector for maskMB unfolds in the body of f
 -- At one stage it didn't because the implicit unfolding looked too big
 
--- Trac #2581
+-- #2581
 
 module ShouldCompile where
 import Data.Array.Base
diff --git a/testsuite/tests/ffi/should_fail/ccfail001.hs b/testsuite/tests/ffi/should_fail/ccfail001.hs
index cd8eb83665adbf3f1b8edd45ed2e66bb89942462..0b7d5e8c7fc4c95ce924d6a186171e75fae54d8a 100644
--- a/testsuite/tests/ffi/should_fail/ccfail001.hs
+++ b/testsuite/tests/ffi/should_fail/ccfail001.hs
@@ -1,7 +1,7 @@
 
 {-# LANGUAGE ForeignFunctionInterface, MagicHash #-}
 
--- Trac #1037 
+-- #1037 
 
 module Foo where
 
diff --git a/testsuite/tests/ffi/should_fail/ccfail002.hs b/testsuite/tests/ffi/should_fail/ccfail002.hs
index 86d5e9a1ba741ebd5f218f325fb233bae890d1ec..bb089b210617ef3a324fc874e3fca516be708745 100644
--- a/testsuite/tests/ffi/should_fail/ccfail002.hs
+++ b/testsuite/tests/ffi/should_fail/ccfail002.hs
@@ -1,7 +1,7 @@
 
 {-# LANGUAGE ForeignFunctionInterface, UnboxedTuples, MagicHash, UnliftedFFITypes #-}
 
--- Test for Trac #1680
+-- Test for #1680
 
 module ShouldFail where
 
diff --git a/testsuite/tests/gadt/CasePrune.hs b/testsuite/tests/gadt/CasePrune.hs
index 4048c94c5ff51a3b51dbbd083712f5ccc259263c..8055bdd8ffc29a11b88b034ede6f17e79a5a069c 100644
--- a/testsuite/tests/gadt/CasePrune.hs
+++ b/testsuite/tests/gadt/CasePrune.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE GADTs, GeneralizedNewtypeDeriving #-}
 
--- See Trac #1251 and the comments
+-- See #1251 and the comments
 -- Note [Pruning dead case alternatives] in types/Unify.lhs
 
 module Main( main ) where
diff --git a/testsuite/tests/gadt/Session.hs b/testsuite/tests/gadt/Session.hs
index 2a9b3da6efcc5174c79b3b10c90fc68a56ea3520..bf50115d77b889d990ac8dd836f4b5380ded1478 100644
--- a/testsuite/tests/gadt/Session.hs
+++ b/testsuite/tests/gadt/Session.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE GADTs, KindSignatures #-}
 
--- See Trac #1323; crashed GHC 6.6
+-- See #1323; crashed GHC 6.6
 
 module Main where
 
diff --git a/testsuite/tests/gadt/T1999a.hs b/testsuite/tests/gadt/T1999a.hs
index d8dbc077b9e40c682d47d4fc7905a31b5b842e8d..494812ca2915c6c0890684a928c558d435171796 100644
--- a/testsuite/tests/gadt/T1999a.hs
+++ b/testsuite/tests/gadt/T1999a.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE GADTs #-}
--- Trac #1999
+-- #1999
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/gadt/T2587.hs b/testsuite/tests/gadt/T2587.hs
index cea1c092d3c2d5522d0301c08b8e374e13849e5d..e6424d622862fbbe6251b1a4ae11346338643def 100644
--- a/testsuite/tests/gadt/T2587.hs
+++ b/testsuite/tests/gadt/T2587.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE GADTs, ExistentialQuantification #-}
 {-# OPTIONS_GHC -O -fno-warn-overlapping-patterns #-}
 
--- Trac #2587
+-- #2587
 -- Actually this bug related to free variables and
 -- type lets, but ostensibly it has a GADT flavour
 -- Hence being in the GADT directory.
diff --git a/testsuite/tests/gadt/T3013.hs b/testsuite/tests/gadt/T3013.hs
index 3b123a0d808f7dc0918db8a6a8a4d5f00b6902b6..4aaf4524649ee903560b5fbd46e922bc9fb5a257 100644
--- a/testsuite/tests/gadt/T3013.hs
+++ b/testsuite/tests/gadt/T3013.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE GADTs #-}
--- Trac 3013. 
+-- #3013.
 -- This isn't strictly a GADT test, but it uses GADT syntax
 
 module T3013 where
diff --git a/testsuite/tests/gadt/T3163.hs b/testsuite/tests/gadt/T3163.hs
index 13e5ff7de6aa7d6b0bfb01da06e04b8ea8dbaf54..985ef9b1101af5ca59c9a04db8cd9812eca02699 100644
--- a/testsuite/tests/gadt/T3163.hs
+++ b/testsuite/tests/gadt/T3163.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE GADTs, RankNTypes, ImpredicativeTypes #-}
 
--- Test Trac #3163
+-- Test #3163
 
 module Report where
 
diff --git a/testsuite/tests/gadt/data1.hs b/testsuite/tests/gadt/data1.hs
index b9c6ffe19c99580190ec79f691871096991ef6ee..7b999c4e801d7e6d972c0717827209e60c825735 100644
--- a/testsuite/tests/gadt/data1.hs
+++ b/testsuite/tests/gadt/data1.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE GADTs #-}
 
--- Trac #289
+-- #289
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/gadt/data2.hs b/testsuite/tests/gadt/data2.hs
index fcac05880b3ee5c9ea63f3b95ea83cffd5005a09..29579a89c3fe8671ee5350880a95891305f6746b 100644
--- a/testsuite/tests/gadt/data2.hs
+++ b/testsuite/tests/gadt/data2.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE GADTs, ExistentialQuantification #-}
 
--- Trac #289
+-- #289
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/gadt/gadt-fd.hs b/testsuite/tests/gadt/gadt-fd.hs
index 7d966c35eb93a828ecace689e191faa74f43bf8e..0899e3ba7489760eb40717b7816db8011042fb97 100644
--- a/testsuite/tests/gadt/gadt-fd.hs
+++ b/testsuite/tests/gadt/gadt-fd.hs
@@ -5,7 +5,7 @@
 {-# LANGUAGE FunctionalDependencies #-}
 {-# LANGUAGE UndecidableInstances #-}
 
--- Trac #345
+-- #345
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/gadt/gadt17.hs b/testsuite/tests/gadt/gadt17.hs
index 26eeda9b2ae0f1d2395dff26c08e7c4698455fa1..de99d3888e0be59bb02aa7e1dd9d23817a226d40 100644
--- a/testsuite/tests/gadt/gadt17.hs
+++ b/testsuite/tests/gadt/gadt17.hs
@@ -4,7 +4,7 @@
 -- This one showed up a bug that required type refinement in TcIface
 -- See the call to coreRefineTys in TcIface
 --
--- Tests for bug: http://ghc.haskell.org/trac/ghc/ticket/685
+-- Tests for bug: https://gitlab.haskell.org/ghc/ghc/issues/685
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/gadt/gadt24.hs b/testsuite/tests/gadt/gadt24.hs
index 86cece09ddaf294d5c0846d5889213269f049ad0..748b2f19c3d4d94d279c3d13b3c4053328b98e86 100644
--- a/testsuite/tests/gadt/gadt24.hs
+++ b/testsuite/tests/gadt/gadt24.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE GADTs #-}
 
--- Test for Trac #1396
+-- Test for #1396
 -- Panics in GHC 6.6.1
 
 module ShouldCompile where
diff --git a/testsuite/tests/gadt/karl1.hs b/testsuite/tests/gadt/karl1.hs
index e201a711f635086a74ecf6c94fdb6dbc20424b90..8080381b18458485a9bcc219ea3303b95dd7bf69 100644
--- a/testsuite/tests/gadt/karl1.hs
+++ b/testsuite/tests/gadt/karl1.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE GADTs, KindSignatures #-}
 
--- See Trac #301
+-- See #301
 -- This particular one doesn't use GADTs per se,
 -- but it does use dictionaries in constructors
 
diff --git a/testsuite/tests/gadt/karl2.hs b/testsuite/tests/gadt/karl2.hs
index 1f46df37ee88ed152a07128efa00b0a74e39d73d..de8390f0425c2718f0df995c375cb016f0775ccc 100644
--- a/testsuite/tests/gadt/karl2.hs
+++ b/testsuite/tests/gadt/karl2.hs
@@ -2,7 +2,7 @@
 
 module Expr0 where
 
--- See Trac #301
+-- See #301
 -- This one *does* use GADTs (Fct)
 
 import Data.Kind (Type)
diff --git a/testsuite/tests/gadt/records-fail1.hs b/testsuite/tests/gadt/records-fail1.hs
index 12bb3e0cd31b726d51809e7be5b0faadafc55966..23f918909078014e877ea2b754b752c66d37341f 100644
--- a/testsuite/tests/gadt/records-fail1.hs
+++ b/testsuite/tests/gadt/records-fail1.hs
@@ -5,7 +5,7 @@
 -- Record syntax in GADTs has been deprecated since July 2009
 -- see commit 432b9c9322181a3644083e3c19b7e240d90659e7 by simonpj:
 -- "New syntax for GADT-style record declarations, and associated refactoring"
--- and Trac #3306
+-- and #3306
 
 -- It's been removed in August 2015
 -- see Phab D1118
diff --git a/testsuite/tests/ghci/prog003/prog003.T b/testsuite/tests/ghci/prog003/prog003.T
index d649f34e80b8328ebd46a33ea61321db4e80dd71..b824445a96b310d5ffa4a82f335135977d4b6f73 100644
--- a/testsuite/tests/ghci/prog003/prog003.T
+++ b/testsuite/tests/ghci/prog003/prog003.T
@@ -1,7 +1,7 @@
 # This test is very flaky on Windows.
 # It is a genuine bug that should be looked at, but
 # for the sake of stability of the build bot we disable it for now.
-# See Trac 11317.
+# See #11317.
 test('prog003',
      [extra_files(['../shell.hs', 'A.hs', 'B.hs', 'C.hs', 'D1.hs', 'D2.hs']),
       when(opsys('mingw32'), skip),
diff --git a/testsuite/tests/ghci/scripts/T11098.script b/testsuite/tests/ghci/scripts/T11098.script
index fc0fbe8c9ec363a270c0626b644c541099834082..dadfac74ef8cee8bd6f6d9b47e4d10afb5ec4727 100644
--- a/testsuite/tests/ghci/scripts/T11098.script
+++ b/testsuite/tests/ghci/scripts/T11098.script
@@ -1,4 +1,4 @@
--- See Trac #11098
+-- See #11098
 
 :set -XTemplateHaskell
 :set -XNamedWildCards
diff --git a/testsuite/tests/ghci/scripts/T2766.script b/testsuite/tests/ghci/scripts/T2766.script
index 84b83461b7bd686049851c312d9cd1b42e986790..9d86258f02e3c4ea2a2b337d73be2086cec3d015 100644
--- a/testsuite/tests/ghci/scripts/T2766.script
+++ b/testsuite/tests/ghci/scripts/T2766.script
@@ -1,4 +1,4 @@
--- Test Trac #2766
+-- Test #2766
 :set -XTypeOperators
 :m Control.Arrow
 :t first :: Arrow to => b `to` c -> (b, d) `to` (c, d)
diff --git a/testsuite/tests/ghci/scripts/T3263.hs b/testsuite/tests/ghci/scripts/T3263.hs
index 237cf42c6d4955a744871ca5991ce55850461f26..1b1d5df082fcdb92fc196ddc807d6f05d1239840 100644
--- a/testsuite/tests/ghci/scripts/T3263.hs
+++ b/testsuite/tests/ghci/scripts/T3263.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -Wall #-}
 
--- Test Trac #3263
+-- Test #3263
 
 module T3263 where
 
diff --git a/testsuite/tests/ghci/scripts/ghci019.hs b/testsuite/tests/ghci/scripts/ghci019.hs
index 1cb9fef1a2fe68b674f334896aa05d660258194a..14cf726c861e41f887fe937d3d829dbc5cbb7f2f 100644
--- a/testsuite/tests/ghci/scripts/ghci019.hs
+++ b/testsuite/tests/ghci/scripts/ghci019.hs
@@ -1,4 +1,4 @@
--- Trac #1581
+-- #1581
 -- Even though Eq is not in scope unqualified, we want to
 -- see the Eq instance of Foo when we say :i Foo
 
diff --git a/testsuite/tests/ghci/scripts/ghci030.hs b/testsuite/tests/ghci/scripts/ghci030.hs
index ed95ea9661ef73397dcb492881ad6092111e7ea9..743aa986eacb5f52bd73185139ea51af09233bb7 100644
--- a/testsuite/tests/ghci/scripts/ghci030.hs
+++ b/testsuite/tests/ghci/scripts/ghci030.hs
@@ -1,4 +1,4 @@
--- Trac #2082
+-- #2082
 -- If we :i D or C, we should see parentheses around (Int -> a)
 
 {-# LANGUAGE ExistentialQuantification #-}
diff --git a/testsuite/tests/ghci/scripts/ghci031.hs b/testsuite/tests/ghci/scripts/ghci031.hs
index ef5d985f7518fb629515f0a426e3998faf1bd7d3..f6c6699a242129310ec961f74c358b176b90a563 100644
--- a/testsuite/tests/ghci/scripts/ghci031.hs
+++ b/testsuite/tests/ghci/scripts/ghci031.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE DatatypeContexts #-}
--- Trac #2138
+-- #2138
 -- If we :i D, we should see the Eq constraint
 
 module Foo where
diff --git a/testsuite/tests/ghci/scripts/ghci033.hs b/testsuite/tests/ghci/scripts/ghci033.hs
index b67960068dede71e365bc7b9606774074a000ae0..7f047cda0589705b5c806bbcd207bb0e5cbc4847 100644
--- a/testsuite/tests/ghci/scripts/ghci033.hs
+++ b/testsuite/tests/ghci/scripts/ghci033.hs
@@ -1,4 +1,4 @@
--- Test Trac #1930: display of infix constructors
+-- Test #1930: display of infix constructors
 module Test where
 
 data Foo = Foo1 Int 
diff --git a/testsuite/tests/ghci/scripts/ghci063.script b/testsuite/tests/ghci/scripts/ghci063.script
index 377f65934ceaa9ca32b8682d954f23536685b587..6cba37b9abf3acd88f8761bf20d1e8ac38fe797b 100644
--- a/testsuite/tests/ghci/scripts/ghci063.script
+++ b/testsuite/tests/ghci/scripts/ghci063.script
@@ -1,7 +1,7 @@
 :! echo module A where {} >A.hs
 :! echo module B where { import A } >B.hs
 
--- Workaround for Trac #16201. We use "touch -r" to set modification
+-- Workaround for #16201. We use "touch -r" to set modification
 -- timestamps, which leads to precision loss on Darwin. For example,
 --
 --    before: 2019-02-25 01:11:23.807627350 +0300
diff --git a/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs b/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
index 743a41145c4a81b168249fba2ebaafe64f5f5400..a022c36a8535b793bc9deaa7c831db981de64cf5 100644
--- a/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
+++ b/testsuite/tests/indexed-types/should_compile/IndTypesPerfMerge.hs
@@ -53,7 +53,7 @@ merge x y = mkMerge (merger x y) x y
 
 
 {- ------------- NASTY TYPE FOR merge -----------------
-   -- See Trac #11408
+   -- See #11408
 
    x:tx, y:ty
    mkMerge @ gamma
diff --git a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
index 4537d3a21cce4428df3140f93c0f76028a6c3ecb..844b6ef5c16c3cc9aed6aec69a57ca3243ba5c99 100644
--- a/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
+++ b/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs
@@ -21,7 +21,7 @@ bar y = let foo :: (F Int ~ [a]) => a -> Int
 -- we will not be able to solve the implication constraint.
 
 -- Oct 14: actually this example is _really_ strange, and doesn't illustrate
--- the real issue in Trac #4935, for which there is a separate test
+-- the real issue in #4935, for which there is a separate test
 --
 -- The example here requires us to infer a type
 --   bar :: F Int ~ [a] => ...
diff --git a/testsuite/tests/indexed-types/should_compile/Records.hs b/testsuite/tests/indexed-types/should_compile/Records.hs
index 8508c66f657cfe49db65f00e015bfa12ba14c24a..adcc72a4594aea5d3e9b888533cdc7593fbbe527 100644
--- a/testsuite/tests/indexed-types/should_compile/Records.hs
+++ b/testsuite/tests/indexed-types/should_compile/Records.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies #-}
 
--- See Trac #1204
+-- See #1204
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/indexed-types/should_compile/T2238.hs b/testsuite/tests/indexed-types/should_compile/T2238.hs
index 8e77283d7740a6e98493858401d0952defc8f9ee..f2407ac623e97718d462d18348c12bcad817386a 100644
--- a/testsuite/tests/indexed-types/should_compile/T2238.hs
+++ b/testsuite/tests/indexed-types/should_compile/T2238.hs
@@ -5,7 +5,7 @@
 {-# LANGUAGE FunctionalDependencies #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 
--- Trac #2238
+-- #2238
 -- Notice that class CTF has just one value field, but
 -- it also has an equality predicate. 
 -- See Note [Class newtypes and equality predicates] in BuildTyCl
diff --git a/testsuite/tests/indexed-types/should_compile/T2944.hs b/testsuite/tests/indexed-types/should_compile/T2944.hs
index 8470a9dc95401f6bf887bb2f1ecc7aaaea437b12..81eb00d51b025526dbe6cec2c45509cb8f312a20 100644
--- a/testsuite/tests/indexed-types/should_compile/T2944.hs
+++ b/testsuite/tests/indexed-types/should_compile/T2944.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE TypeFamilies #-}
--- Test Trac #2944
+-- Test #2944
 
 module T2944 where
 
diff --git a/testsuite/tests/indexed-types/should_compile/T3017.hs b/testsuite/tests/indexed-types/should_compile/T3017.hs
index 8e4e5bd99910c102053842e8869e9e9e7c5fe1ef..cc9fbc9ee8b6819dc7f359cd89f0cd451f486a3e 100644
--- a/testsuite/tests/indexed-types/should_compile/T3017.hs
+++ b/testsuite/tests/indexed-types/should_compile/T3017.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies #-}
 
--- Trac #3017
+-- #3017
 
 module Foo where
  class Coll c where
diff --git a/testsuite/tests/indexed-types/should_compile/T3590.hs b/testsuite/tests/indexed-types/should_compile/T3590.hs
index 6cc79a6f02e06f481a429800e4c4357737075077..ec2caf9564146e0cf1666d4e7ad1be76f418f0de 100644
--- a/testsuite/tests/indexed-types/should_compile/T3590.hs
+++ b/testsuite/tests/indexed-types/should_compile/T3590.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies, FlexibleContexts #-}
 
--- Trac #3590: a bug in typechecking of sections
+-- #3590: a bug in typechecking of sections
 
 module T3590 where
 
diff --git a/testsuite/tests/indexed-types/should_compile/T4178.hs b/testsuite/tests/indexed-types/should_compile/T4178.hs
index 96d339dc689e3725a48755d26c3ca0fe6aaf165d..e5bbccc6eec4307572128c4a968b8f7ba2a1ccfc 100644
--- a/testsuite/tests/indexed-types/should_compile/T4178.hs
+++ b/testsuite/tests/indexed-types/should_compile/T4178.hs
@@ -5,7 +5,7 @@
         MultiParamTypeClasses,
         FlexibleInstances #-}
 
--- See Trac #4178
+-- See #4178
 
 module T4178 where
 
diff --git a/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.hs b/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.hs
index e286f76e3f6e0dc62cdcb959caa0be3b40b9d4f5..bbd0ba922a7b0f35ecb5f6651be7764ed2773ccf 100644
--- a/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.hs
+++ b/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarnings.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies, PolyKinds #-}
 
--- See Trac #10982
+-- See #10982
 
 module UnusedTyVarWarnings where
 
diff --git a/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.hs b/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.hs
index 6d3a48e746ecabcd98ed03b5f6e2f60975910990..b78626f4022fcc49bcda2afb510b35547e19201e 100644
--- a/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.hs
+++ b/testsuite/tests/indexed-types/should_compile/UnusedTyVarWarningsNamedWCs.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies, PolyKinds, NamedWildCards #-}
 
--- See Trac #10982
+-- See #10982
 
 module UnusedTyVarWarningsNamedWCs where
 
diff --git a/testsuite/tests/indexed-types/should_fail/T2334A.hs b/testsuite/tests/indexed-types/should_fail/T2334A.hs
index c73402e2d58d2ed78cc575a9e94554b813edb688..79d4c7c890128ae8372435ea71340f17d9b07558 100644
--- a/testsuite/tests/indexed-types/should_fail/T2334A.hs
+++ b/testsuite/tests/indexed-types/should_fail/T2334A.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies #-}
 
--- Trac #2334
+-- #2334
 
 module Test where
 
diff --git a/testsuite/tests/indexed-types/should_fail/T4272.hs b/testsuite/tests/indexed-types/should_fail/T4272.hs
index bc5922b0621b83ce9913baf5343abb48f53e126d..d3f1c5458160d3f5b77a3c56604b5cad43d12e39 100644
--- a/testsuite/tests/indexed-types/should_fail/T4272.hs
+++ b/testsuite/tests/indexed-types/should_fail/T4272.hs
@@ -1,6 +1,6 @@
  {-# LANGUAGE TypeFamilies, ScopedTypeVariables, FlexibleContexts #-}  
 
--- See also Trac #5763 for why we don't really want to see
+-- See also #5763 for why we don't really want to see
 -- an occurs-check error from this program
 
 module T4272 where
diff --git a/testsuite/tests/indexed-types/should_fail/T9357.hs b/testsuite/tests/indexed-types/should_fail/T9357.hs
index 9365663523b96f43fb58d256afb853c676a69ee8..c03254484f80df1eea2c6b49ae5af424fd86dd29 100644
--- a/testsuite/tests/indexed-types/should_fail/T9357.hs
+++ b/testsuite/tests/indexed-types/should_fail/T9357.hs
@@ -7,7 +7,7 @@ type family F (a :: k1) :: k2
 
 type instance F Int# = Int
  -- This one is actually OK (F is poly-kinded;
- -- c.f. Trac #11120 comment:19
+ -- c.f. #11120 comment:19
 
 type instance F (forall a. a->a) = Int
  -- But this one is not (impredicative)
diff --git a/testsuite/tests/indexed-types/should_run/T2985.hs b/testsuite/tests/indexed-types/should_run/T2985.hs
index 6ae6e12c506d9ec10950dce5eebf0596f2cd277e..161021c6df31c3180748e985423bd2c3595c4990 100644
--- a/testsuite/tests/indexed-types/should_run/T2985.hs
+++ b/testsuite/tests/indexed-types/should_run/T2985.hs
@@ -4,7 +4,7 @@
 module Main where
 
 -- See http://article.gmane.org/gmane.comp.lang.haskell.general/16796
--- and Trac #2985
+-- and #2985
 
 instance (Num a, Num b, a ~ b) => Num (a,b) where
     (x,y) * (u,v) = (x*u-y*v, x*v+y*u)
diff --git a/testsuite/tests/lib/integer/integerGmpInternals.hs b/testsuite/tests/lib/integer/integerGmpInternals.hs
index e45c6f4a488c5987bf2104beb8dc62eefe937fee..24780cc2ac6081e749164fb37cf9fd099f742c7b 100644
--- a/testsuite/tests/lib/integer/integerGmpInternals.hs
+++ b/testsuite/tests/lib/integer/integerGmpInternals.hs
@@ -89,7 +89,7 @@ main = do
     print $ gcdExtInteger (-x) y
     print $ gcdExtInteger (-x) (-y)
 
-    -- see Trac #15350
+    -- see #15350
     do
         let a = 2
             b = 2^65 + 1
diff --git a/testsuite/tests/llvm/should_compile/T5486.hs b/testsuite/tests/llvm/should_compile/T5486.hs
index 730a7c2854f46a39ef3f9f30f7fe1fecc24f4338..ff5d24ca16bf03662dd831de95b209c320ca6420 100644
--- a/testsuite/tests/llvm/should_compile/T5486.hs
+++ b/testsuite/tests/llvm/should_compile/T5486.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE ForeignFunctionInterface, UnliftedFFITypes, UnboxedTuples,
              BangPatterns, MagicHash #-}
 
--- | Test case for Trac #5486
+-- | Test case for #5486
 -- Test case reduced from HsOpenSSL package BN module
 module Bad where
 
diff --git a/testsuite/tests/llvm/should_compile/T5681.hs b/testsuite/tests/llvm/should_compile/T5681.hs
index 8a94fb44cef41004514eeb95165d657333fffbd6..1ce84b6ccb986e74e60eb4caa9b3436121daa766 100644
--- a/testsuite/tests/llvm/should_compile/T5681.hs
+++ b/testsuite/tests/llvm/should_compile/T5681.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE MagicHash, UnboxedTuples #-}
--- Test case for Trac #5681
+-- Test case for #5681
 module Main where
 
 import GHC.Prim
diff --git a/testsuite/tests/llvm/should_run/subsections_via_symbols/all.T b/testsuite/tests/llvm/should_run/subsections_via_symbols/all.T
index ef586bc6a08302be97ea8df46ed638f6fd1d790b..68ade25e9908624be2aa3d2a76b4f9aee133566a 100644
--- a/testsuite/tests/llvm/should_run/subsections_via_symbols/all.T
+++ b/testsuite/tests/llvm/should_run/subsections_via_symbols/all.T
@@ -10,7 +10,7 @@ setTestOpts(f)
 
 # Note [_ffi_call_unix64]
 #
-# Please refer to https://ghc.haskell.org/trac/ghc/ticket/5019
+# Please refer to https://gitlab.haskell.org/ghc/ghc/issues/5019
 # for the subsections_via_symbols.stderr
 
 test('subsections_via_symbols', [only_darwin], makefile_test, [])
diff --git a/testsuite/tests/module/T3776.hs b/testsuite/tests/module/T3776.hs
index b522cfe0e0a416773d061fb0777f97b2ad4548f6..195fc8ac04a178477fa1d994cbb69daae08374de 100644
--- a/testsuite/tests/module/T3776.hs
+++ b/testsuite/tests/module/T3776.hs
@@ -2,7 +2,7 @@
 
 -- Check that although 'index' is apparently only used
 -- unqualified, we nevertheless do not get a redundant-import warning
---   Trac #3776
+--   #3776
 
 module T3776 where
 
diff --git a/testsuite/tests/parser/should_compile/read066.hs b/testsuite/tests/parser/should_compile/read066.hs
index 374f76126c55f2422a69fcfa0aaff8cbf8dcf278..d4adec88ae7570d5fb35a07431c93c873870d3dc 100644
--- a/testsuite/tests/parser/should_compile/read066.hs
+++ b/testsuite/tests/parser/should_compile/read066.hs
@@ -2,7 +2,7 @@
 {-# OPTIONS_NO_SUCH_PRAGMA --no-such-flag #-}
 
 -- We should parse the above as an unrecognised pragma, not as an OPTIONS
--- pragma containing "_NO_SUCH_PRAGMA -wibble". Trac #2847.
+-- pragma containing "_NO_SUCH_PRAGMA -wibble". #2847.
 
 module Test where
 
diff --git a/testsuite/tests/parser/should_compile/read_1821.hs b/testsuite/tests/parser/should_compile/read_1821.hs
index f9669ab053c0e8715d39c9bcd003e0d514e7f362..8cf39b87e727be196858b9f6a42042445f7bc83d 100644
--- a/testsuite/tests/parser/should_compile/read_1821.hs
+++ b/testsuite/tests/parser/should_compile/read_1821.hs
@@ -1,5 +1,5 @@
 
--- Trac #1821
+-- #1821
 
 module Par where
 
diff --git a/testsuite/tests/parser/should_fail/NoNumericUnderscores0.hs b/testsuite/tests/parser/should_fail/NoNumericUnderscores0.hs
index 5e6821124a098889e1ea60426be1f3f4823a9674..0c5ddd5723127910cbb5a7961a4eff7e66e1003a 100644
--- a/testsuite/tests/parser/should_fail/NoNumericUnderscores0.hs
+++ b/testsuite/tests/parser/should_fail/NoNumericUnderscores0.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE NoNumericUnderscores #-}
 
 -- Test for NumericUnderscores extension.
--- See Trac #14473
+-- See #14473
 -- This is a testcase for integer literal
 -- in NO NumericUnderscores extension.
 
diff --git a/testsuite/tests/parser/should_fail/NoNumericUnderscores1.hs b/testsuite/tests/parser/should_fail/NoNumericUnderscores1.hs
index 017f20528b49e33b05b129d38219a5e94485fa72..62594a24a694ac1ba90e2e534040e489b9f9a74d 100644
--- a/testsuite/tests/parser/should_fail/NoNumericUnderscores1.hs
+++ b/testsuite/tests/parser/should_fail/NoNumericUnderscores1.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE NoNumericUnderscores #-}
 
 -- Test for NumericUnderscores extension.
--- See Trac #14473
+-- See #14473
 -- This is a testcase for floating literal
 -- in NO NumericUnderscores extension.
 
diff --git a/testsuite/tests/parser/should_fail/NumericUnderscoresFail0.hs b/testsuite/tests/parser/should_fail/NumericUnderscoresFail0.hs
index 1f04184365c20016acec70ec931a0db2a5162a93..734e07b146bd013ad083cfa996d4c9302df854e7 100644
--- a/testsuite/tests/parser/should_fail/NumericUnderscoresFail0.hs
+++ b/testsuite/tests/parser/should_fail/NumericUnderscoresFail0.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE NumericUnderscores #-}
 
 -- Test for NumericUnderscores extension.
--- See Trac #14473
+-- See #14473
 -- This is a testcase for invalid case of NumericUnderscores.
 
 main :: IO ()
diff --git a/testsuite/tests/parser/should_fail/NumericUnderscoresFail1.hs b/testsuite/tests/parser/should_fail/NumericUnderscoresFail1.hs
index 0a6a3051d692d745f6b6bd865f1ee16c6cc86886..dc4e8bc8548dbc1dce07c4dd23383f20e62f593e 100644
--- a/testsuite/tests/parser/should_fail/NumericUnderscoresFail1.hs
+++ b/testsuite/tests/parser/should_fail/NumericUnderscoresFail1.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE NumericUnderscores #-}
 
 -- Test for NumericUnderscores extension.
--- See Trac #14473
+-- See #14473
 -- This is a testcase for invalid case of NumericUnderscores.
 
 main :: IO ()
diff --git a/testsuite/tests/parser/should_fail/T3095.hs b/testsuite/tests/parser/should_fail/T3095.hs
index fc7889f7bf2a5d6cfca26e43a9e95ecad90a69e3..9c508eb81b17d7776d07632a7cfdfd9ccff275ae 100644
--- a/testsuite/tests/parser/should_fail/T3095.hs
+++ b/testsuite/tests/parser/should_fail/T3095.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE KindSignatures #-}
--- Trac #3095
+-- #3095
 module T3095 where
 
 import Data.Kind (Type)
diff --git a/testsuite/tests/parser/should_run/NumericUnderscores0.hs b/testsuite/tests/parser/should_run/NumericUnderscores0.hs
index 7aefce95c603dde84cb81abe4926e9a47ad2ff30..0bc5ee03ecf3866380440f4a14c14ac55dfbb5f2 100644
--- a/testsuite/tests/parser/should_run/NumericUnderscores0.hs
+++ b/testsuite/tests/parser/should_run/NumericUnderscores0.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NegativeLiterals #-}
 
 -- Test for NumericUnderscores extension.
--- See Trac #14473
+-- See #14473
 -- This is a testcase for boxed literals.
 
 main :: IO ()
diff --git a/testsuite/tests/parser/should_run/NumericUnderscores1.hs b/testsuite/tests/parser/should_run/NumericUnderscores1.hs
index b9d0dca725e1bf7dc1fb351a24cfb359776d2af2..638e5353a653fe5f4e0eacbc5349263e3090bb74 100644
--- a/testsuite/tests/parser/should_run/NumericUnderscores1.hs
+++ b/testsuite/tests/parser/should_run/NumericUnderscores1.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NegativeLiterals #-}
 
 -- Test for NumericUnderscores extension.
--- See Trac #14473
+-- See #14473
 -- This is a testcase for unboxed literals.
 
 import GHC.Types
diff --git a/testsuite/tests/parser/should_run/readRun004.hs b/testsuite/tests/parser/should_run/readRun004.hs
index 5e6545adb11e53c13a75f63579846621529fd1fa..698aa151af7d7a53d1c5650d82296620ea90e0e1 100644
--- a/testsuite/tests/parser/should_run/readRun004.hs
+++ b/testsuite/tests/parser/should_run/readRun004.hs
@@ -3,7 +3,7 @@
 -- should_run to make sure linking succeeds
 -- (curried unboxed tuples with both boxed
 --  and unboxed components).
--- See Trac #1509; also Note [Primop wrappers] in Id.lhs
+-- See #1509; also Note [Primop wrappers] in Id.lhs
 
 import GHC.Exts
 
diff --git a/testsuite/tests/parser/unicode/brackets.hs b/testsuite/tests/parser/unicode/brackets.hs
index 33c8e3f44fe525f4b1822f795fe9f3f820303a9c..72c41524d587e2f98361844f7967f1f3b9f2b751 100644
--- a/testsuite/tests/parser/unicode/brackets.hs
+++ b/testsuite/tests/parser/unicode/brackets.hs
@@ -2,7 +2,7 @@
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE UnicodeSyntax   #-}
 
--- See Trac #10162 and #11743 for details
+-- See #10162 and #11743 for details
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/partial-sigs/should_compile/NamedWildcardsAsTyVars.hs b/testsuite/tests/partial-sigs/should_compile/NamedWildcardsAsTyVars.hs
index 8d824f5fec6508108916eea2939cc40855d7d8ee..fdd79394e250e83aad9328fdcbb2be1e2dcaf293 100644
--- a/testsuite/tests/partial-sigs/should_compile/NamedWildcardsAsTyVars.hs
+++ b/testsuite/tests/partial-sigs/should_compile/NamedWildcardsAsTyVars.hs
@@ -4,7 +4,7 @@
 -- enabled and the identifiers starting with _ are parsed as type variables.
 -- They should remain valid when the extension is on.
 --
--- See Trac #11098 and comments in #10982
+-- See #11098 and comments in #10982
 
 module NamedWildcardsAsTyVars where
 
diff --git a/testsuite/tests/partial-sigs/should_compile/T12033.hs b/testsuite/tests/partial-sigs/should_compile/T12033.hs
index 9d47ec654158934465bc62b8212cf46bb80edaa4..f426b9cdd5db75cfc79e5a5a802ef3e7acbe1a7c 100644
--- a/testsuite/tests/partial-sigs/should_compile/T12033.hs
+++ b/testsuite/tests/partial-sigs/should_compile/T12033.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies, PartialTypeSignatures #-}
 
--- In Trac #12033 this was called HsakellBug.hs
+-- In #12033 this was called HsakellBug.hs
 
 module T12033 where
 tripleStoreToRuleSet :: v -> v
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.hs b/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.hs
index d0e6e8a14dd32a923f72d47039bde1348b9caf45..4c3852e72cbcdb8c1bbe2fd36b58287c43e34b46 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.hs
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE RankNTypes, NamedWildCards #-}
 
--- See Trac #11098
+-- See #11098
 
 module NamedWildcardExplicitForall where
 
diff --git a/testsuite/tests/patsyn/should_fail/T14380.stderr b/testsuite/tests/patsyn/should_fail/T14380.stderr
index 4228d2955c79356b322ac0c481537c8e6c2b1813..47dcc93d81005ce410fca7cd8d0a80a5998af69a 100644
--- a/testsuite/tests/patsyn/should_fail/T14380.stderr
+++ b/testsuite/tests/patsyn/should_fail/T14380.stderr
@@ -5,5 +5,5 @@ T14380.hs:8:15: error:
       Suggestion: instead use an explicitly bidirectional pattern synonym, e.g.
         pattern Bar <- Foo [] where Bar = ...
       Reason: rebindable syntax is on.
-      This is fixable: add use-case to Trac #14380
+      This is fixable: add use-case to #14380
     RHS pattern: Foo []
diff --git a/testsuite/tests/perf/compiler/T9872d.hs b/testsuite/tests/perf/compiler/T9872d.hs
index 5c859eefdcdd1620efee37674e81692d67d13fe6..22d6912aefc2512893edc4c2642215f5065d9082 100644
--- a/testsuite/tests/perf/compiler/T9872d.hs
+++ b/testsuite/tests/perf/compiler/T9872d.hs
@@ -8,7 +8,7 @@
 {-# OPTIONS_GHC -freduction-depth=0 #-}   -- this should terminate!
 
 module T9872d where
--- Code from Jan Stolarek, labelled "exp-tyfams.hs" on Trac #9872,
+-- Code from Jan Stolarek, labelled "exp-tyfams.hs" on #9872,
 -- generated by a Template Haskell program
 
 
diff --git a/testsuite/tests/perf/should_run/T14936.hs b/testsuite/tests/perf/should_run/T14936.hs
index 187404cc56766c3400760a0e8fffb900d0c4c686..90a4412e54a9be7258fa1d029ff809138c66efcb 100644
--- a/testsuite/tests/perf/should_run/T14936.hs
+++ b/testsuite/tests/perf/should_run/T14936.hs
@@ -16,7 +16,7 @@ intSize :: Int
 intSize = Storable.sizeOf (undefined :: Int)
 
 -- This 'go' loop should allocate nothing, because it specialises
--- for the shape of the state.  But in 8.4 it did (Trac #14936)
+-- for the shape of the state.  But in 8.4 it did (#14936)
 
 slow :: Int -> IO ()
 slow i = do let go 0 = pure ()
diff --git a/testsuite/tests/perf/should_run/T149_A.hs b/testsuite/tests/perf/should_run/T149_A.hs
index 22ec276ebca77ef61860d611e5005394d8c47e10..8065fb1139fc12a4d1e28222a04bd5b4f64dbf64 100644
--- a/testsuite/tests/perf/should_run/T149_A.hs
+++ b/testsuite/tests/perf/should_run/T149_A.hs
@@ -1,6 +1,6 @@
 module Main (main) where
 
--- See Trac #149
+-- See #149
 
 -- Currently (with GHC 7.0) the CSE works, just,
 -- but it's delicate.
diff --git a/testsuite/tests/perf/should_run/T149_B.hs b/testsuite/tests/perf/should_run/T149_B.hs
index 514fd16a9ca50525a5177cbcd953b36a33bea55c..2439efbe4f987f122087ab9b6e0f0b9ebf3e6b24 100644
--- a/testsuite/tests/perf/should_run/T149_B.hs
+++ b/testsuite/tests/perf/should_run/T149_B.hs
@@ -1,6 +1,6 @@
 module Main (main) where
 
--- See Trac #149
+-- See #149
 
 -- Currently (with GHC 7.0) the CSE works, just,
 -- but it's delicate.
diff --git a/testsuite/tests/perf/should_run/T5549.hs b/testsuite/tests/perf/should_run/T5549.hs
index cab0dc0226ca7a5160edbeaeb4f20fac7ee07cea..9109318056e8a38fa45e25facf8f65739bbbb76b 100644
--- a/testsuite/tests/perf/should_run/T5549.hs
+++ b/testsuite/tests/perf/should_run/T5549.hs
@@ -1,5 +1,5 @@
 module Main where
--- See Trac #5549
+-- See #5549
 -- The issue here is allocating integer constants inside a loop
 
 
diff --git a/testsuite/tests/pmcheck/should_compile/T12957a.hs b/testsuite/tests/pmcheck/should_compile/T12957a.hs
index 72330e98e0dd9e8d5e7cd5fc75844b18f6e3ed23..d8045484802e887b75d10fd0874bb843ce2740e3 100644
--- a/testsuite/tests/pmcheck/should_compile/T12957a.hs
+++ b/testsuite/tests/pmcheck/should_compile/T12957a.hs
@@ -3,7 +3,7 @@
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE KindSignatures #-}
 
--- The original test case for Trac #12957
+-- The original test case for #12957
 
 module T12957a where
 
diff --git a/testsuite/tests/polykinds/T11248.hs b/testsuite/tests/polykinds/T11248.hs
index b3a32e3097226bb9ea0a193291104eeb48cc9342..cd780d1211ae83ee90548ddaf942c624faa0e1ec 100644
--- a/testsuite/tests/polykinds/T11248.hs
+++ b/testsuite/tests/polykinds/T11248.hs
@@ -1,5 +1,5 @@
 {-# OPTIONS_GHC -O #-}
-  -- Trac #11248, comment:6 showed that this tests failed with -O
+  -- #11248, comment:6 showed that this tests failed with -O
 
 {-# LANGUAGE DataKinds, TypeOperators, TypeFamilies,
              KindSignatures, ConstraintKinds #-}
diff --git a/testsuite/tests/polykinds/T11480b.hs b/testsuite/tests/polykinds/T11480b.hs
index 2684c6de4eca76bb5a9a2b71933ed600192e3f53..0ec19753a05db15df05fb5b30cf3f8ba57174ab5 100644
--- a/testsuite/tests/polykinds/T11480b.hs
+++ b/testsuite/tests/polykinds/T11480b.hs
@@ -17,7 +17,7 @@
 
 -- This code, supplied by Edward Kmett, uses UndecidableSuperClasses along
 -- with a bunch of other stuff, so it's a useful stress test.
--- See Trac #11480 comment:12.
+-- See #11480 comment:12.
 
 module T11480b where
 
diff --git a/testsuite/tests/polykinds/T7594.hs b/testsuite/tests/polykinds/T7594.hs
index 925b3f9aceba79eebeef96a52d56c604a0b93e5f..3b941151e5a73607bc922db7dd42d50d3477156e 100644
--- a/testsuite/tests/polykinds/T7594.hs
+++ b/testsuite/tests/polykinds/T7594.hs
@@ -27,7 +27,7 @@ q :: ColD (Show :&: Real)
 q = ColD (1.2 :: Double)
 
 bar = app print q
--- This one works, as a result of fixing Trac #8644,
+-- This one works, as a result of fixing #8644,
 -- because the given constraint is
 --   (Show :&: Real) a, which has no equality superclasses
 
diff --git a/testsuite/tests/polykinds/T8566a.hs b/testsuite/tests/polykinds/T8566a.hs
index 22b628553f0b99fc79a6062e3e9a70acc3a4c266..7a4c658ffb63eb4fcea5333ea2aab3b4af7d9ac3 100644
--- a/testsuite/tests/polykinds/T8566a.hs
+++ b/testsuite/tests/polykinds/T8566a.hs
@@ -17,7 +17,7 @@ type family ExpandField (args :: [Field]) :: [Type]
 type family AppVars (t :: k) (vs :: [Type]) :: Type
 
 -- This function fails to compile, because we discard
--- 'given' kind equalities.  See comment 7 in Trac #8566
+-- 'given' kind equalities.  See comment 7 in #8566
 -- This is really a bug, I claim
 unA :: InField (APP t args) -> AppVars t (ExpandField args)
 unA (A x) = x
diff --git a/testsuite/tests/quotes/T2931.hs b/testsuite/tests/quotes/T2931.hs
index 43aeda0ecef41311482a601729d8a09681f88f01..9ad6825929e72aaac3eeace2453f1d0e24ee5416 100644
--- a/testsuite/tests/quotes/T2931.hs
+++ b/testsuite/tests/quotes/T2931.hs
@@ -1,4 +1,4 @@
--- Trac #2931
+-- #2931
 
 module Foo where
 a = 1
diff --git a/testsuite/tests/quotes/T3572.hs b/testsuite/tests/quotes/T3572.hs
index 4717fd2735b712f7147c05ef15ade1d5244d03ed..d2a2c67838baf1e7c3e4364cd5883f6e190619d7 100644
--- a/testsuite/tests/quotes/T3572.hs
+++ b/testsuite/tests/quotes/T3572.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE EmptyDataDecls #-}
 
--- Trac #3572
+-- #3572
 
 module Main where
 
diff --git a/testsuite/tests/quotes/TH_scope.hs b/testsuite/tests/quotes/TH_scope.hs
index 7674a5d1c0ef8fba10e19fcd9fead6b7bc52e11d..34caa586ffd26a4a3a6505b7223b28382b99962a 100644
--- a/testsuite/tests/quotes/TH_scope.hs
+++ b/testsuite/tests/quotes/TH_scope.hs
@@ -1,4 +1,4 @@
--- Test for Trac #2188
+-- Test for #2188
 
 module TH_scope where
 
diff --git a/testsuite/tests/rebindable/T303.hs b/testsuite/tests/rebindable/T303.hs
index c9be12469ce83e6d196045b2b9d3224bff2bd5f9..23772efeefa4e44a513c3c0b584e30ccb8b49c59 100644
--- a/testsuite/tests/rebindable/T303.hs
+++ b/testsuite/tests/rebindable/T303.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE RebindableSyntax #-}
 
--- Trac #303
+-- #303
 
 module T where
 import qualified Prelude as P
diff --git a/testsuite/tests/rebindable/all.T b/testsuite/tests/rebindable/all.T
index 1484dd73d977b51b3a0e4569ef415777b1d7023c..7c8caea438a70432d2300c550ecff6426daa8a8e 100644
--- a/testsuite/tests/rebindable/all.T
+++ b/testsuite/tests/rebindable/all.T
@@ -13,7 +13,7 @@ test('rebindable4', normal, compile_and_run, [''])
 test('rebindable5', normal, compile_and_run, [''])
 
 # rebindable6 has become expected failures
-# following Trac #1537
+# following #1537
 test('rebindable6', normal, compile_fail, [''])
 
 test('rebindable7', normal, compile_and_run, [''])
diff --git a/testsuite/tests/rebindable/rebindable8.hs b/testsuite/tests/rebindable/rebindable8.hs
index 2c1f484f47ac2899b11c44ff7527fd5159c038a8..f78479202d4ffa90ee99e992023f65bac7356351 100644
--- a/testsuite/tests/rebindable/rebindable8.hs
+++ b/testsuite/tests/rebindable/rebindable8.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE RebindableSyntax, MultiParamTypeClasses #-}
 
--- Trac #1537
+-- #1537
 
 module Foo where
 import Prelude hiding (Monad(..))
diff --git a/testsuite/tests/rebindable/rebindable9.hs b/testsuite/tests/rebindable/rebindable9.hs
index cd3c95ab62881b3e0e110bbb7e12e54d5df24263..53f408223fc31ff23c5d46d5e8a6dc0c59f0fff5 100644
--- a/testsuite/tests/rebindable/rebindable9.hs
+++ b/testsuite/tests/rebindable/rebindable9.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE RebindableSyntax, FlexibleInstances,
              MultiParamTypeClasses, FunctionalDependencies #-}
 
--- Trac #1537
+-- #1537
 
 module Foo where
 import qualified Prelude
diff --git a/testsuite/tests/rename/should_compile/T1789.hs b/testsuite/tests/rename/should_compile/T1789.hs
index efe3840e4fbaa272be3bfb5115cc4d258f65abe4..d33ab40c823ff2c6bfc3e2ec28453c2356a3a3cf 100644
--- a/testsuite/tests/rename/should_compile/T1789.hs
+++ b/testsuite/tests/rename/should_compile/T1789.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fwarn-missing-import-lists #-}
 
--- Test Trac #1789
+-- Test #1789
 module T1789 where
 
 import Prelude
diff --git a/testsuite/tests/rename/should_compile/T1789_2.hs b/testsuite/tests/rename/should_compile/T1789_2.hs
index 2ac2a509fe048fb1699cdc79a63aa99f4c3536fd..5fb3c92cfd1598e5ec3b77124328223db1f8be81 100644
--- a/testsuite/tests/rename/should_compile/T1789_2.hs
+++ b/testsuite/tests/rename/should_compile/T1789_2.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fwarn-missing-import-lists #-}
 
--- Test Trac #1789
+-- Test #1789
 module T1789_2 where
 
 import Data.Map (size)
diff --git a/testsuite/tests/rename/should_compile/T17a.hs b/testsuite/tests/rename/should_compile/T17a.hs
index a58a766340d6da9c3c1d69deaca145f185fbfd0f..998be111dcd31eb7fdc4a153d3fdb90bba8f7cc3 100644
--- a/testsuite/tests/rename/should_compile/T17a.hs
+++ b/testsuite/tests/rename/should_compile/T17a.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fwarn-unused-top-binds #-}
 
--- Trac #17
+-- #17
 
 module Temp (foo, bar, quux) where
 
diff --git a/testsuite/tests/rename/should_compile/T17b.hs b/testsuite/tests/rename/should_compile/T17b.hs
index 7946f16deb5a3cf2f5150653bd033d299e6d9171..d3983fd25d28a96537bd1a062ad7502bd6635db4 100644
--- a/testsuite/tests/rename/should_compile/T17b.hs
+++ b/testsuite/tests/rename/should_compile/T17b.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fwarn-unused-local-binds #-}
 
--- Trac #17
+-- #17
 
 module Temp (foo, bar, quux) where
 
diff --git a/testsuite/tests/rename/should_compile/T17c.hs b/testsuite/tests/rename/should_compile/T17c.hs
index 091524c95a4d9e38f89c15d0313ec6d748dae0f2..85ad72e4dd1f9544febdd2a9077de84ba83aabb8 100644
--- a/testsuite/tests/rename/should_compile/T17c.hs
+++ b/testsuite/tests/rename/should_compile/T17c.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fwarn-unused-pattern-binds #-}
 
--- Trac #17
+-- #17
 
 module Temp (foo, bar, quux) where
 
diff --git a/testsuite/tests/rename/should_compile/T17d.hs b/testsuite/tests/rename/should_compile/T17d.hs
index 1a4b44d717c0fc9732d081caf375c86e8658904e..5e43c58e472ce3aa9b8fe9942eaf39088b95440a 100644
--- a/testsuite/tests/rename/should_compile/T17d.hs
+++ b/testsuite/tests/rename/should_compile/T17d.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fwarn-unused-matches #-}
 
--- Trac #17
+-- #17
 
 module Temp (foo, bar, quux) where
 
diff --git a/testsuite/tests/rename/should_compile/T17e.hs b/testsuite/tests/rename/should_compile/T17e.hs
index 93ed1f7344e63cc2e68fdc655171752dfc40ced3..c64f008f89b8f8229b4a0f9a4213ad1a649527ab 100644
--- a/testsuite/tests/rename/should_compile/T17e.hs
+++ b/testsuite/tests/rename/should_compile/T17e.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fwarn-unused-binds #-}
 
--- Trac #17
+-- #17
 
 module Temp (foo, bar, quux) where
 
diff --git a/testsuite/tests/rename/should_compile/T1972.hs b/testsuite/tests/rename/should_compile/T1972.hs
index 09dd8acaf45ef919cddeddab27a1e76dc2d79754..d4da5f41aafb4844d732ea11ddafa4789b005dee 100644
--- a/testsuite/tests/rename/should_compile/T1972.hs
+++ b/testsuite/tests/rename/should_compile/T1972.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fwarn-name-shadowing -fwarn-unused-binds #-}
 
--- Trac #1972
+-- #1972
 
 module Temp where
 
diff --git a/testsuite/tests/rename/should_compile/T2205.hs b/testsuite/tests/rename/should_compile/T2205.hs
index 580dea247a05698a081c8bd808788d48b0052179..c35c13d9d66e6aa8a01329333fcaf98c610f1872 100644
--- a/testsuite/tests/rename/should_compile/T2205.hs
+++ b/testsuite/tests/rename/should_compile/T2205.hs
@@ -1,7 +1,7 @@
 {-# OPTIONS_GHC -XTypeOperators #-}
 
 -- Test fixity of type operators
--- Trac #2205
+-- #2205
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/rename/should_compile/T2506.hs b/testsuite/tests/rename/should_compile/T2506.hs
index 1e31a12c12a1dfc6567f235e4a8bed7bab1bfde6..e12ebe382261e907ff6f7e1d923482d9861710a4 100644
--- a/testsuite/tests/rename/should_compile/T2506.hs
+++ b/testsuite/tests/rename/should_compile/T2506.hs
@@ -1,4 +1,4 @@
--- Trac #2506
+-- #2506
 
 module ShouldCompile where
 import Control.Exception (assert)
diff --git a/testsuite/tests/rename/should_compile/T3221.hs b/testsuite/tests/rename/should_compile/T3221.hs
index 970abfb4038a4e83799190c8f3bf2f758f01f6f9..83b7a72bef9826ca44c9f1563e93a7110d485b99 100644
--- a/testsuite/tests/rename/should_compile/T3221.hs
+++ b/testsuite/tests/rename/should_compile/T3221.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -Werror -fwarn-unused-binds #-}
 
--- Test Trac #3221: the constructors are used by the deriving
+-- Test #3221: the constructors are used by the deriving
 --                  clause, even though they are not exported
 
 module T3221( Foo ) where
diff --git a/testsuite/tests/rename/should_compile/T3262.hs b/testsuite/tests/rename/should_compile/T3262.hs
index 01437d8d2fd3ff8f6d5509a3655800563a5c67d7..b56226c84616d3d6716c09c83d0ed18731caea1d 100644
--- a/testsuite/tests/rename/should_compile/T3262.hs
+++ b/testsuite/tests/rename/should_compile/T3262.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS -fwarn-name-shadowing #-}
 
--- Trac #3262: report shadowing in g but not f
+-- #3262: report shadowing in g but not f
  
 module T3262 where
 
diff --git a/testsuite/tests/rename/should_compile/rn051.hs b/testsuite/tests/rename/should_compile/rn051.hs
index ee5b53ee8e9f2970d1c4e27283b66121be98cd51..ff326e26efeba551ce3b6461be58ad75db8cd776 100644
--- a/testsuite/tests/rename/should_compile/rn051.hs
+++ b/testsuite/tests/rename/should_compile/rn051.hs
@@ -1,7 +1,7 @@
 {-# OPTIONS -XNoImplicitPrelude #-}
 
 -- This one crashed GHC 6.6 in lookupDeprec
--- See Trac #1128
+-- See #1128
 -- and Note [Used names with interface not loaded]
 -- in RnNames
 
diff --git a/testsuite/tests/rename/should_compile/rn058.hs b/testsuite/tests/rename/should_compile/rn058.hs
index 838f58b1c74b29dc1b02f74714829949332cc285..4d6576b09459c22196d88cfadf133a4e04d6bb82 100644
--- a/testsuite/tests/rename/should_compile/rn058.hs
+++ b/testsuite/tests/rename/should_compile/rn058.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE ForeignFunctionInterface #-}
 {-# OPTIONS_GHC -fwarn-unused-imports #-}
 
--- Trac #1386
+-- #1386
 -- We do not want a warning about unused imports
 
 module Foo () where
diff --git a/testsuite/tests/rename/should_compile/rn062.hs b/testsuite/tests/rename/should_compile/rn062.hs
index dbb5493fb93a5a4f447d455ee3e8479a6a1e217c..92fd4803452fccfd464c06087e932302d6040fe1 100644
--- a/testsuite/tests/rename/should_compile/rn062.hs
+++ b/testsuite/tests/rename/should_compile/rn062.hs
@@ -1,4 +1,4 @@
--- Trac #2055
+-- #2055
 
 module Foo where
 
diff --git a/testsuite/tests/rename/should_fail/T12146.hs b/testsuite/tests/rename/should_fail/T12146.hs
index e44be13f0485e10d0bebad933b67c49c54761594..f9161606f364ff059e6de8221615d9bd207c59be 100644
--- a/testsuite/tests/rename/should_fail/T12146.hs
+++ b/testsuite/tests/rename/should_fail/T12146.hs
@@ -1,4 +1,4 @@
--- Test Trac #12146
+-- Test #12146
 
 module T12146 where
 
diff --git a/testsuite/tests/rename/should_fail/T2490.hs b/testsuite/tests/rename/should_fail/T2490.hs
index 31afc0987ae3baa23bf611cb9e6d3a6cf459f800..052ee5c859d09eb8c3c9124470a31b875ca1a43d 100644
--- a/testsuite/tests/rename/should_fail/T2490.hs
+++ b/testsuite/tests/rename/should_fail/T2490.hs
@@ -1,4 +1,4 @@
--- Trac #2490
+-- #2490
 module ShouldFail where
 
 -- All these sections are illegal
diff --git a/testsuite/tests/rename/should_fail/T2901.hs b/testsuite/tests/rename/should_fail/T2901.hs
index a703a5e53d0779ca17eb3b90cce680ce647427dd..ca9730a0d19c076878525ae11935fe5acdbb5257 100644
--- a/testsuite/tests/rename/should_fail/T2901.hs
+++ b/testsuite/tests/rename/should_fail/T2901.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE DisambiguateRecordFields #-}
--- Trac #2901
+-- #2901
 
 module T2901 where
 
diff --git a/testsuite/tests/rename/should_fail/T2993.hs b/testsuite/tests/rename/should_fail/T2993.hs
index d5de095461c6be9ec924a439227fd86024d644e5..f8c7488812d4f929ee4a5292d74f9ded2bacbb73 100644
--- a/testsuite/tests/rename/should_fail/T2993.hs
+++ b/testsuite/tests/rename/should_fail/T2993.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeOperators #-}
 
--- Trac #2993
+-- #2993
 
 module T2993 where
 
diff --git a/testsuite/tests/rename/should_fail/T3265.hs b/testsuite/tests/rename/should_fail/T3265.hs
index e938bbc34dd20f623f4d32993709a6694cf55b90..8e34fc2849cab7e5e658a514d1ee652e0707a546 100644
--- a/testsuite/tests/rename/should_fail/T3265.hs
+++ b/testsuite/tests/rename/should_fail/T3265.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 
--- Test Trac #3265
+-- Test #3265
 
 module T3265 where
 
diff --git a/testsuite/tests/rename/should_fail/T4042.hs b/testsuite/tests/rename/should_fail/T4042.hs
index 6f920edd6e50b60b38c3359e44882d38d50e1855..fec82827887c9fd0983d67d4346f5b4de7ddcf64 100644
--- a/testsuite/tests/rename/should_fail/T4042.hs
+++ b/testsuite/tests/rename/should_fail/T4042.hs
@@ -1,4 +1,4 @@
--- Test Trac #4042
+-- Test #4042
 
 module T4042 where
 
diff --git a/testsuite/tests/rename/should_fail/rnfail048.hs b/testsuite/tests/rename/should_fail/rnfail048.hs
index d1c8d73eb095d60e5c6762af70bc913b25e5a3ae..9d1c4d4e0f8565b8416b8356e7948ad7945b5b56 100644
--- a/testsuite/tests/rename/should_fail/rnfail048.hs
+++ b/testsuite/tests/rename/should_fail/rnfail048.hs
@@ -1,4 +1,4 @@
--- Trac #1888 
+-- #1888 
 -- Pretty printing for pragmas
 
 module ShouldFail where
diff --git a/testsuite/tests/rename/should_fail/rnfail052.hs b/testsuite/tests/rename/should_fail/rnfail052.hs
index 63a0dfd6d12b94e4fede3d36226538e57dc50f7d..bffb7e0d963a9ccaba61c903b82eb3f046ac3ac2 100644
--- a/testsuite/tests/rename/should_fail/rnfail052.hs
+++ b/testsuite/tests/rename/should_fail/rnfail052.hs
@@ -1,5 +1,5 @@
 -- Error messages when you use 'forall' *without* the RankN flags
--- Test cases similar to Trac #2114
+-- Test cases similar to #2114
 
 module ShouldFail where
 
diff --git a/testsuite/tests/rename/should_fail/rnfail053.hs b/testsuite/tests/rename/should_fail/rnfail053.hs
index dbc219271b8f3da4849bb0f4c7dc5148afbb5c3d..1135f42b8aa5ddc65c5e559baf17d4e46d8fa511 100644
--- a/testsuite/tests/rename/should_fail/rnfail053.hs
+++ b/testsuite/tests/rename/should_fail/rnfail053.hs
@@ -1,4 +1,4 @@
--- Test Trac #2114 (error message)
+-- Test #2114 (error message)
 
 module ShouldFail where
 
diff --git a/testsuite/tests/rts/T10590.hs b/testsuite/tests/rts/T10590.hs
index 24198abb30c97fc9a1915d02290ca25e222e94d5..96309efff03879632b830ce9fac52a46e03933e2 100644
--- a/testsuite/tests/rts/T10590.hs
+++ b/testsuite/tests/rts/T10590.hs
@@ -30,7 +30,7 @@ main = do
     yield -- kick RTS IO manager
 
 {-
- Trac #10590 exposed a bug as:
+ #10590 exposed a bug as:
    T10590: internal error: removeThreadFromDeQueue: not found
     (GHC version 7.11.20150702 for x86_64_unknown_linux)
     Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
diff --git a/testsuite/tests/simplCore/T9646/readme.txt b/testsuite/tests/simplCore/T9646/readme.txt
index 3109c17b6de6f6808cfb478b52193808ad24f199..3dd6b6fcbafa51545cd621cddc0846ee80641395 100644
--- a/testsuite/tests/simplCore/T9646/readme.txt
+++ b/testsuite/tests/simplCore/T9646/readme.txt
@@ -1,4 +1,4 @@
-This is a test for https://ghc.haskell.org/trac/ghc/ticket/9646
+This is a test for https://gitlab.haskell.org/ghc/ghc/issues/9646
 
 The problem addressed in that ticket was that under some circumstances,
 GHC < 7.10.3 was failing to perform eta reduction deterministically.
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index e9f00a526f0bf9cd9b30e9d21a69cb59f29bd73f..edb74eed243c3a72c05668d28d9f05a7e3fbdef5 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -75,7 +75,7 @@ T3055:
 T5658b:
 	$(RM) -f T5658b.o T5658b.hi
 	'$(TEST_HC)' $(TEST_HC_OPTS) -O -c T5658b.hs -ddump-simpl | grep -c indexIntArray
-# Trac 5658 meant that there were three calls to indexIntArray instead of two
+# #5658 meant that there were three calls to indexIntArray instead of two
 # (now four due to join-point discount causing W/W to stabilize unfolding)
 
 T5776:
@@ -255,4 +255,4 @@ T14140:
 T15631:
 	$(RM) -f T15631.o T15631.hi
 	'$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-uniques -dsuppress-ticks T15631.hs | grep 'case'
-# Expecting one fewwer case expressions after fixing Trac #15631
+# Expecting one fewwer case expressions after fixing #15631
diff --git a/testsuite/tests/simplCore/should_compile/T11562.hs b/testsuite/tests/simplCore/should_compile/T11562.hs
index e273f6002eba3e7ddc1476798ad125074768cf46..72093a71801aa8a0ea3c9a8e5f81175c568bef4b 100644
--- a/testsuite/tests/simplCore/should_compile/T11562.hs
+++ b/testsuite/tests/simplCore/should_compile/T11562.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE NoImplicitPrelude #-}
 
--- Trac #11562 reported an ASSERT error
+-- #11562 reported an ASSERT error
 -- It only showed up /without/ -O, and obviously
 -- with a compiler built with -DDEBUG
 
diff --git a/testsuite/tests/simplCore/should_compile/T2520.hs b/testsuite/tests/simplCore/should_compile/T2520.hs
index f0115474ea665c4e63d9c5a2fce39aa56bad9529..a081c4298881f407caeeca79f7b44c8a6271d794 100644
--- a/testsuite/tests/simplCore/should_compile/T2520.hs
+++ b/testsuite/tests/simplCore/should_compile/T2520.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE GADTs #-}
 
--- Trac #2520: a bug in the specialiser when we tried to
+-- #2520: a bug in the specialiser when we tried to
 -- quantify over an Internal Name
 
 module Types where
diff --git a/testsuite/tests/simplCore/should_compile/T3016.hs b/testsuite/tests/simplCore/should_compile/T3016.hs
index bfe11a80a0d15dbcd8edcde18efb9488cf5ee69a..aeb43ad87e3549f610d82c1f439b370bb64aa10d 100644
--- a/testsuite/tests/simplCore/should_compile/T3016.hs
+++ b/testsuite/tests/simplCore/should_compile/T3016.hs
@@ -1,9 +1,9 @@
--- Test Trac #3016.
+-- Test #3016.
 -- The issue here is whether it compiles in a reasonable time
 -- With GHC 6.10 it took hours!  After fixing the bug (which
 -- was too much inlining) it went down to 30s.
 
--- This also tests Trac #5652, a complexity issue with the LLVM
+-- This also tests #5652, a complexity issue with the LLVM
 -- backend for this module. Compile time down from 10 min to
 -- 12 seconds.
 
diff --git a/testsuite/tests/simplCore/should_compile/T3118.hs b/testsuite/tests/simplCore/should_compile/T3118.hs
index 8ee50b342a03fa250ce85a3ea52e75823f20869f..4193e7db4cc430b4566e107ec034583baa2e4f6e 100644
--- a/testsuite/tests/simplCore/should_compile/T3118.hs
+++ b/testsuite/tests/simplCore/should_compile/T3118.hs
@@ -1,4 +1,4 @@
--- Test Trac #3118
+-- Test #3118
 
 -- The test is quite delicate.  It aims to get 'f' to look like
 --   f y = case x of
diff --git a/testsuite/tests/simplCore/should_compile/T3234.hs b/testsuite/tests/simplCore/should_compile/T3234.hs
index 7969bf60fafca49efd3627d33db55493a2be89bb..ce215ec4d7596252d5b60d9ab4f8e53a348bc6dd 100644
--- a/testsuite/tests/simplCore/should_compile/T3234.hs
+++ b/testsuite/tests/simplCore/should_compile/T3234.hs
@@ -1,4 +1,4 @@
--- Trac #3234
+-- #3234
 -- Should give a use of foldr/single
 
 module Foo where 
diff --git a/testsuite/tests/simplCore/should_compile/T4306.hs b/testsuite/tests/simplCore/should_compile/T4306.hs
index ba32981f6108835596fb32a8cc839fc97be97633..548e132497706bebddb792c3c2c3cf9a7aa9a431 100644
--- a/testsuite/tests/simplCore/should_compile/T4306.hs
+++ b/testsuite/tests/simplCore/should_compile/T4306.hs
@@ -1,4 +1,4 @@
--- Trac #4306
+-- #4306
 -- Check that the worker for 'upd' has only one argument
 
 module T4306 where
diff --git a/testsuite/tests/simplCore/should_compile/T7702.hs b/testsuite/tests/simplCore/should_compile/T7702.hs
index 771ace02025516107b18d23b0418db25019f80da..761463f3819570e3432ce03ba23b2fea464b4e83 100644
--- a/testsuite/tests/simplCore/should_compile/T7702.hs
+++ b/testsuite/tests/simplCore/should_compile/T7702.hs
@@ -1,6 +1,6 @@
 -- The contents of this file are irrelevant. It is merely
 -- the target for compilation by the T7702Plugin, which
--- exhibits the space leak in Trac #7702
+-- exhibits the space leak in #7702
 module Main where
 
 main :: IO ()
diff --git a/testsuite/tests/simplCore/should_compile/T7702plugin/T7702plugin.cabal b/testsuite/tests/simplCore/should_compile/T7702plugin/T7702plugin.cabal
index 953ba3c5d31ebe13acb7da14a07f81e56589a5b5..36be93149f1d35f6ad097853789c3a1fe6c704ae 100644
--- a/testsuite/tests/simplCore/should_compile/T7702plugin/T7702plugin.cabal
+++ b/testsuite/tests/simplCore/should_compile/T7702plugin/T7702plugin.cabal
@@ -1,6 +1,6 @@
 Name:           T7702plugin
 Version:        0.1
-Synopsis:       Plugin which tests space leak fix in Trac #7702
+Synopsis:       Plugin which tests space leak fix in #7702
 Cabal-Version:  >= 1.2
 Build-Type:     Simple
 Author:         Andrew Farmer
diff --git a/testsuite/tests/simplCore/should_compile/rule1.hs b/testsuite/tests/simplCore/should_compile/rule1.hs
index 6894f827c9f3802e2eeec8a681bb1f8e71ce2127..47b21c96814409bb36b79c0c1a6e3eb17694f191 100644
--- a/testsuite/tests/simplCore/should_compile/rule1.hs
+++ b/testsuite/tests/simplCore/should_compile/rule1.hs
@@ -1,5 +1,5 @@
 
--- This one triggers the bug reported in Trac #1092
+-- This one triggers the bug reported in #1092
 -- The problem is that the rule
 --      forall w. f (\v->w) = w
 -- erroneously matches the call
diff --git a/testsuite/tests/simplCore/should_compile/simpl-T1370.hs b/testsuite/tests/simplCore/should_compile/simpl-T1370.hs
index 7524f13bac34695c6090ae37949abcc126e62b28..a0a75e0dee582053b932b8968346ec0750a0275a 100644
--- a/testsuite/tests/simplCore/should_compile/simpl-T1370.hs
+++ b/testsuite/tests/simplCore/should_compile/simpl-T1370.hs
@@ -1,5 +1,5 @@
 
--- See Trac #1370
+-- See #1370
 -- THis made GHC 6.6 diverge!
 
 module ShouldCompile where
diff --git a/testsuite/tests/simplCore/should_compile/simpl014.hs b/testsuite/tests/simplCore/should_compile/simpl014.hs
index 4e03b401a8c0103c1bf147f3f9b48b69d03de8eb..34aba15a95bbe0a1defca64069ba1ff542f24488 100644
--- a/testsuite/tests/simplCore/should_compile/simpl014.hs
+++ b/testsuite/tests/simplCore/should_compile/simpl014.hs
@@ -4,7 +4,7 @@
 
 -- This one make SpecConstr generate bogus code (hence -O2),
 -- with a lint error, in GHC 6.4.1
--- C.f. http://ghc.haskell.org/trac/ghc/ticket/737
+-- C.f. https://gitlab.haskell.org/ghc/ghc/issues/737
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/simplCore/should_compile/simpl017.hs b/testsuite/tests/simplCore/should_compile/simpl017.hs
index ecb48cce149e8dfbb400b886421441042b2299d1..9a9da06263251f4cd62e21452e7580cfb2eb0e8e 100644
--- a/testsuite/tests/simplCore/should_compile/simpl017.hs
+++ b/testsuite/tests/simplCore/should_compile/simpl017.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS -XImpredicativeTypes -fno-warn-deprecated-flags -XEmptyDataDecls -XGADTs -XLiberalTypeSynonyms -XFlexibleInstances -XScopedTypeVariables #-}
 
--- See Trac #1627.  The point is that we should get nice
+-- See #1627.  The point is that we should get nice
 --                  compact code for Foo
 
 -- In GHC 7.0 this fails, and rightly so.
diff --git a/testsuite/tests/simplCore/should_compile/simpl018.hs b/testsuite/tests/simplCore/should_compile/simpl018.hs
index a4cb6a80b827328e113e745442439ca01d8117ce..613c612c2511a483c74dcd9a71bf65b21af6c9b3 100644
--- a/testsuite/tests/simplCore/should_compile/simpl018.hs
+++ b/testsuite/tests/simplCore/should_compile/simpl018.hs
@@ -3,7 +3,7 @@
 -- See Note [Float coercions (unlifted)] in Simplify
 -- This one gave a CoreLint error when compiled optimised
 --
--- See also Trac #1718, of which this is a simplified version
+-- See also #1718, of which this is a simplified version
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/simplCore/should_compile/simpl019.hs b/testsuite/tests/simplCore/should_compile/simpl019.hs
index 66b8fc4764ad5e85a12d4f253e04e6af26dfd208..cdac0cfaf26d43d6d8bd236927aa10a635ef13dd 100644
--- a/testsuite/tests/simplCore/should_compile/simpl019.hs
+++ b/testsuite/tests/simplCore/should_compile/simpl019.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE GADTs, FlexibleInstances #-}
 {-# OPTIONS_GHC -O2 #-}
 
--- See Trac #1746
+-- See #1746
 
 module Foo where
 
diff --git a/testsuite/tests/simplCore/should_compile/spec003.hs b/testsuite/tests/simplCore/should_compile/spec003.hs
index 5ea6d332839ca2ad10f0deabc847ffea78f19278..15f6bd7b2050189e6ecb69ba4729738c476726d8 100644
--- a/testsuite/tests/simplCore/should_compile/spec003.hs
+++ b/testsuite/tests/simplCore/should_compile/spec003.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
 
--- Trac #1402
+-- #1402
 -- Broke the specialiser
 
 module ShouldCompile where
diff --git a/testsuite/tests/simplCore/should_run/T13429_2.hs b/testsuite/tests/simplCore/should_run/T13429_2.hs
index 45b3e9c34d9af4e5c5e1c888f7269dacab7d83fd..585c0592506765035a9205a4add6e9fe30865d59 100644
--- a/testsuite/tests/simplCore/should_run/T13429_2.hs
+++ b/testsuite/tests/simplCore/should_run/T13429_2.hs
@@ -1,4 +1,4 @@
--- This one come from lehins, between comment:22 and 23 of Trac #13429
+-- This one come from lehins, between comment:22 and 23 of #13429
 module Main where
 
 import T13429_2a as Array
diff --git a/testsuite/tests/simplCore/should_run/T2486.hs b/testsuite/tests/simplCore/should_run/T2486.hs
index 2f5df48532ef5e1afdc2df5e3157064e1e0ae910..a6d5112d7b50dd5144c884d8a7a89429d5056c6d 100644
--- a/testsuite/tests/simplCore/should_run/T2486.hs
+++ b/testsuite/tests/simplCore/should_run/T2486.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -O -ddump-rules #-}
 
--- Trac #2486
+-- #2486
 --
 -- The thing to look for here is that specialisations for fib and tak 
 -- at both Int and Double are indeed generated; hence -ddump-rules
diff --git a/testsuite/tests/simplCore/should_run/T3403.hs b/testsuite/tests/simplCore/should_run/T3403.hs
index 276aae88b228870182e82902b669a5184a232ea8..21c30f2d33c7c20d573538dc523339797a9b9d3b 100644
--- a/testsuite/tests/simplCore/should_run/T3403.hs
+++ b/testsuite/tests/simplCore/should_run/T3403.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE BangPatterns #-}
 
 
--- See Trac #3403: interaction of pattern match failure and CPR
+-- See #3403: interaction of pattern match failure and CPR
 -- The point is that this should run in constant space, with no
 -- stack growth.  In GHC 6.10 the tail call optimisation didn't work.
 
diff --git a/testsuite/tests/simplCore/should_run/T3437.hs b/testsuite/tests/simplCore/should_run/T3437.hs
index 9ef6ee8b82ab392d67e9dc201bd5a8d1da71ae3f..6875bebd554af8b537a2d80e592fb37aed46ad10 100644
--- a/testsuite/tests/simplCore/should_run/T3437.hs
+++ b/testsuite/tests/simplCore/should_run/T3437.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE BangPatterns #-}
 {-# OPTIONS_GHC -O2 #-}
 
--- Trac #3437
+-- #3437
 -- When we do SpecConstr on 'go', we want the specialised
 -- function to *still* be strict in k.  Otherwise we get
 -- a bad space leak!
diff --git a/testsuite/tests/simplCore/should_run/T5587.hs b/testsuite/tests/simplCore/should_run/T5587.hs
index 4909154dab44a71d6139be2653cb42081cec47b1..8dc74604e302e057561dc8f37e429ab45948b511 100644
--- a/testsuite/tests/simplCore/should_run/T5587.hs
+++ b/testsuite/tests/simplCore/should_run/T5587.hs
@@ -8,7 +8,7 @@ hiddenError = error "hidden error"
 
 main = print $ seq (head (map (\a -> \b -> hiddenError) (hiddenError::[] Bool))) id [1]
 
-{-  See notes in Trac #5587
+{-  See notes in #5587
 f a b =  a
 he = hiddenError::[Bool]
 main = print $ seq (head (map f he)) id [1]
diff --git a/testsuite/tests/simplCore/should_run/T9128.hs b/testsuite/tests/simplCore/should_run/T9128.hs
index 73aa39b31bd1515831850c7e8336f99edd11f8df..cccda53c4113328ee2fd3672147c2abc5c022110 100644
--- a/testsuite/tests/simplCore/should_run/T9128.hs
+++ b/testsuite/tests/simplCore/should_run/T9128.hs
@@ -2,7 +2,7 @@ module Main where
 
 newtype T a = MkT a
 
--- Trac #9128: we treated x as absent!!!!
+-- #9128: we treated x as absent!!!!
 
 f x = let {-# NOINLINE h #-}
           h = case x of MkT g -> g
diff --git a/testsuite/tests/stage1/T2632.hs b/testsuite/tests/stage1/T2632.hs
index 71f6350cc22df9e76a8e35a55a658da3ed678923..64349c926d404c3dc466b9370047d1b06f67e4a7 100644
--- a/testsuite/tests/stage1/T2632.hs
+++ b/testsuite/tests/stage1/T2632.hs
@@ -1,4 +1,4 @@
--- Trac #2632
+-- #2632
 
 module MkData where
 
diff --git a/testsuite/tests/stranal/should_compile/T10482a.hs b/testsuite/tests/stranal/should_compile/T10482a.hs
index e633ebe6b75a5ce84ee04162e62aba0737933099..2f5a0e0665f6a1e5732226c3c379daeaf445eca1 100644
--- a/testsuite/tests/stranal/should_compile/T10482a.hs
+++ b/testsuite/tests/stranal/should_compile/T10482a.hs
@@ -2,7 +2,7 @@
 {-# OPTIONS_GHC -fno-unbox-small-strict-fields #-}
                 -- Makes f2 a bit more challenging
 
--- Tests inspired by Note [CPR examples] in DmdAnal, and Trac #10482
+-- Tests inspired by Note [CPR examples] in DmdAnal, and #10482
 
 module Foo where
 
diff --git a/testsuite/tests/stranal/should_compile/T1988.hs b/testsuite/tests/stranal/should_compile/T1988.hs
index a27fdd8da5a892dccff4b05344145bfd3a60a5c2..c6c498b710cdfe59dab04a62a91b6c159e6dd6a8 100644
--- a/testsuite/tests/stranal/should_compile/T1988.hs
+++ b/testsuite/tests/stranal/should_compile/T1988.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -O2 #-}
 
--- Trac #1988: this one killed GHC 6.8.2
+-- #1988: this one killed GHC 6.8.2
 --              at least with -O2
 
 module ShouldCompile where
diff --git a/testsuite/tests/stranal/should_compile/T9208.hs b/testsuite/tests/stranal/should_compile/T9208.hs
index 5243445c9618e40b8ecff321e145e5b5cd381635..2a4f5b40adbce33ac4c2d5fd8ca610c3cf9c8e89 100644
--- a/testsuite/tests/stranal/should_compile/T9208.hs
+++ b/testsuite/tests/stranal/should_compile/T9208.hs
@@ -7,7 +7,7 @@
 -- and unsafe-coerces it to a function, and applies it.
 -- This is caught by an ASSERT with a debug compiler.
 --
--- See Trac #9208 for discussion
+-- See #9208 for discussion
 --
 --------------------------------------------
 
diff --git a/testsuite/tests/stranal/should_compile/all.T b/testsuite/tests/stranal/should_compile/all.T
index 3cff3c788873c3f51e5d69c5644caa43e7b89df9..970417e11c857c767af2a9190b0c859cbe55025b 100644
--- a/testsuite/tests/stranal/should_compile/all.T
+++ b/testsuite/tests/stranal/should_compile/all.T
@@ -23,7 +23,7 @@ test('T8743', [], multimod_compile, ['T8743', '-v0'])
 # T10482
 #   The intent here is to check that $wfoo has type
 #         $wfoo :: Int# -> Int# -> Int
-#   with two unboxed args.  See Trac #10482 for background
+#   with two unboxed args.  See #10482 for background
 #
 # Set -dppr-cols to ensure output doesn't wrap
 test('T10482',  [ grep_errmsg(r'wfoo.*Int#') ], compile, ['-dppr-cols=200 -ddump-simpl'])
@@ -31,7 +31,7 @@ test('T10482a', [ grep_errmsg(r'wf.*Int#') ],   compile, ['-dppr-cols=200 -ddump
 
 test('T9208', when(compiler_debugged(), expect_broken(9208)), compile, [''])
 # T9208 fails (and should do so) if you have assertion checking on in the compiler
-# Hence the above expect_broken.  See comments in the Trac ticket
+# Hence the above expect_broken.  See comments in the ticket
 
 test('T10694', [ grep_errmsg(r'Str=') ],   compile, ['-dppr-cols=200 -ddump-simpl'])
 test('T11770', [ check_errmsg('OneShot') ], compile, ['-ddump-simpl'])
diff --git a/testsuite/tests/stranal/should_run/T11555a.hs b/testsuite/tests/stranal/should_run/T11555a.hs
index 29f2a4968016f81834dc97545024443461c7d6b0..fc2e8b83ba4d2cff99d52e97205147786b586212 100644
--- a/testsuite/tests/stranal/should_run/T11555a.hs
+++ b/testsuite/tests/stranal/should_run/T11555a.hs
@@ -8,7 +8,7 @@ import GHC.Exts
 
 type RAW a = ContT () IO a
 
--- See https://ghc.haskell.org/trac/ghc/ticket/11555
+-- See https://gitlab.haskell.org/ghc/ghc/issues/11555
 catchSafe1, catchSafe2 :: IO a -> (SomeException -> IO a) -> IO a
 catchSafe1 a b = lazy a `catch` b
 catchSafe2 a b = join (evaluate a) `catch` b
diff --git a/testsuite/tests/th/Makefile b/testsuite/tests/th/Makefile
index 87a673816080e2442c653e7463d503fac5f835ac..2962327c3fc0fb4aa5db0caf33e37eea655f4bc8 100644
--- a/testsuite/tests/th/Makefile
+++ b/testsuite/tests/th/Makefile
@@ -2,8 +2,8 @@ TOP=../..
 include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/test.mk
 
-# Trac 2386 requires batch-compile not --make
-# Very important: without -O 
+# #2386 requires batch-compile not --make
+# Very important: without -O
 T2386:
 	'$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 -c T2386_Lib.hs
 	'$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 -c T2386.hs
diff --git a/testsuite/tests/th/T11629.hs b/testsuite/tests/th/T11629.hs
index b22365fe601ce97ae99c06921d8e804af0dda61b..4fcc093823289f6d9150cb3ae95b37a17135019c 100644
--- a/testsuite/tests/th/T11629.hs
+++ b/testsuite/tests/th/T11629.hs
@@ -50,7 +50,7 @@ do
   let [ty3', ty4'] = map (withoutSig . getType) insts
 
   when (ty3 /= ty3') $ failMsg "C" ty3 ty3'
-  -- The following won't work. See https://ghc.haskell.org/trac/ghc/ticket/12853
+  -- The following won't work. See https://gitlab.haskell.org/ghc/ghc/issues/12853
   -- when (ty4 /= ty4') $ failMsg "D" ty4 ty4'
 
   -- test #3: type quotations and reified types should agree wrt to
diff --git a/testsuite/tests/th/T2386.hs b/testsuite/tests/th/T2386.hs
index b7a03469cf331ac8d06c3fb7ac8de48cc55cc4d6..a52df28513296587b11c51f23fc4b2416bdd5ce7 100644
--- a/testsuite/tests/th/T2386.hs
+++ b/testsuite/tests/th/T2386.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell #-}
 
--- Test Trac #2386
+-- Test #2386
 
 module T2386 where
 
diff --git a/testsuite/tests/th/T2597a.hs b/testsuite/tests/th/T2597a.hs
index d403723e4358bcb174f8a2c78882278b00d4b3bd..b279f04bb2ff4990dc553c285776078b8dfa5552 100644
--- a/testsuite/tests/th/T2597a.hs
+++ b/testsuite/tests/th/T2597a.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell #-}
 
--- Test Trac #2597 (first bug)
+-- Test #2597 (first bug)
 
 module ShouldCompile where
 import T2597a_Lib
diff --git a/testsuite/tests/th/T2597b.hs b/testsuite/tests/th/T2597b.hs
index 0e1551ea22fbdcfea55992507a44080c51519a0a..ac04207436ec431e8a710114712d69721fa9a65b 100644
--- a/testsuite/tests/th/T2597b.hs
+++ b/testsuite/tests/th/T2597b.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell #-}
 
--- Test Trac #2597 (second bug)
+-- Test #2597 (second bug)
 
 module ShouldCompile where
 import T2597b_Lib
diff --git a/testsuite/tests/th/T2674.hs b/testsuite/tests/th/T2674.hs
index 3413193343b7408abc1ccac9ba8cb39869d23197..7687bad4da50a9f88895d6b7b3c4e7b77e2268b0 100644
--- a/testsuite/tests/th/T2674.hs
+++ b/testsuite/tests/th/T2674.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell #-}
 
--- Trac #2674
+-- #2674
 
 module ShouldFail where
 
diff --git a/testsuite/tests/th/T3100.hs b/testsuite/tests/th/T3100.hs
index 40adf6a7b67753ef8fbba0fe758f5104c3c23ccd..0f211e3b13d74834790cd5f55483337382ac18e5 100644
--- a/testsuite/tests/th/T3100.hs
+++ b/testsuite/tests/th/T3100.hs
@@ -5,7 +5,7 @@
 -- there is a predicate but no 'forall'
 --
 -- There are two tests in here; both should be fine
--- Trac ticket: #3100
+-- Ticket: #3100
 
 module T3100 where
 
diff --git a/testsuite/tests/th/T3467.hs b/testsuite/tests/th/T3467.hs
index cf495b967335e9d8ab59ba9b9a2ab7e62a83eb04..f2c72c46a4cae924f1606b100d21fc26cebbbb30 100644
--- a/testsuite/tests/th/T3467.hs
+++ b/testsuite/tests/th/T3467.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell #-}
 
--- Test Trac #3467
+-- Test #3467
 
 module T3467 where
 
diff --git a/testsuite/tests/th/TH_1tuple.hs b/testsuite/tests/th/TH_1tuple.hs
index ea1a1195ab34734eab8545b6741a4c15a6aadc8e..c1314b0bb934de1447d4695877a7dbb6d4445780 100644
--- a/testsuite/tests/th/TH_1tuple.hs
+++ b/testsuite/tests/th/TH_1tuple.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell #-}
 
--- Trac #2358
+-- #2358
 
 module ShouldFail where
 import Language.Haskell.TH
diff --git a/testsuite/tests/th/TH_emptycase.hs b/testsuite/tests/th/TH_emptycase.hs
index fc75cfe5b011f8ce498ef4e93aa930a16c6c9631..cf947d827d54552d32c0d800991dfaa95ffeb375 100644
--- a/testsuite/tests/th/TH_emptycase.hs
+++ b/testsuite/tests/th/TH_emptycase.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE TemplateHaskell, EmptyCase #-}
--- Trac #2431: empty case expression
+-- #2431: empty case expression
 --             now accepted
 
 module Main where
diff --git a/testsuite/tests/th/TH_reifyMkName.hs b/testsuite/tests/th/TH_reifyMkName.hs
index 7c4d7196e0c268b1e26e43fc72ad1254f2d1fc15..5fed9b44f2a6a72c6f823773fb6f38fcfd154ae7 100644
--- a/testsuite/tests/th/TH_reifyMkName.hs
+++ b/testsuite/tests/th/TH_reifyMkName.hs
@@ -1,4 +1,4 @@
--- Trac #2339
+-- #2339
 
 module Foo where
 
diff --git a/testsuite/tests/th/TH_runIO.hs b/testsuite/tests/th/TH_runIO.hs
index 7a1f4c3d70458cbfffc931e8e2b187da8db5c28c..9d9b48511316fe3e598e36a1d73122b670c5b2ec 100644
--- a/testsuite/tests/th/TH_runIO.hs
+++ b/testsuite/tests/th/TH_runIO.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell #-}
 
--- See Trac #1678
+-- See #1678
 
 module TH where 
 
diff --git a/testsuite/tests/th/TH_spliceGuard.hs b/testsuite/tests/th/TH_spliceGuard.hs
index 4c220e85b51b4909b2f9c9958e74261f918c2c1b..c349150c20602c027fa20ab689004d2bbef4a392 100644
--- a/testsuite/tests/th/TH_spliceGuard.hs
+++ b/testsuite/tests/th/TH_spliceGuard.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XTemplateHaskell #-}
 
--- Trac #2017
+-- #2017
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/typecheck/should_compile/FD1.hs b/testsuite/tests/typecheck/should_compile/FD1.hs
index 0c8942ad9581709eec87b0476a1abc4ee92df371..ef458e1ff5e7d0c9a7149d80dee1428889a512f6 100644
--- a/testsuite/tests/typecheck/should_compile/FD1.hs
+++ b/testsuite/tests/typecheck/should_compile/FD1.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
 {-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
 
--- Trac #1781
+-- #1781
 -- This one should really succeed, because 'plus' can only
 -- be called with a = Int->Int, but the old fundep story
 -- certainly made it fail, and so that's what we expect for now
diff --git a/testsuite/tests/typecheck/should_compile/FD2.hs b/testsuite/tests/typecheck/should_compile/FD2.hs
index 571d2daece9a09a73fd57dafb036728d8a1b6830..f8732c846d95991a191cac00e231ace01bcdfdaf 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.hs
+++ b/testsuite/tests/typecheck/should_compile/FD2.hs
@@ -1,8 +1,8 @@
 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
 {-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-}
 
--- Trac #1783
--- Like Trac #1781 you could argue that this one should succeed
+-- #1783
+-- Like #1781 you could argue that this one should succeed
 -- but we stick with the old behaviour for now.  When we do
 -- fundeps properly it'll probably start to work
 
diff --git a/testsuite/tests/typecheck/should_compile/FD3.hs b/testsuite/tests/typecheck/should_compile/FD3.hs
index a2f7d003a7fd6a04741d9226ca0853b292f9489d..475e379c108ed9183b33da8579e3fdea9238b532 100644
--- a/testsuite/tests/typecheck/should_compile/FD3.hs
+++ b/testsuite/tests/typecheck/should_compile/FD3.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
 
--- Trac #1795
+-- #1795
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/typecheck/should_compile/FD4.hs b/testsuite/tests/typecheck/should_compile/FD4.hs
index 51650324caa897da5bab6e0ac80f90f008dac359..88444772ec48f7ea75e5e21209ab81192249cf3a 100644
--- a/testsuite/tests/typecheck/should_compile/FD4.hs
+++ b/testsuite/tests/typecheck/should_compile/FD4.hs
@@ -5,7 +5,7 @@
     FlexibleInstances,
     EmptyDataDecls #-}
 
--- Trac #1797
+-- #1797
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/typecheck/should_compile/Makefile b/testsuite/tests/typecheck/should_compile/Makefile
index ac18b2f4b32703ace02e18bb40b5625d91651362..52554856015e40db2e50e018dd0fb73caafce20e 100644
--- a/testsuite/tests/typecheck/should_compile/Makefile
+++ b/testsuite/tests/typecheck/should_compile/Makefile
@@ -32,7 +32,7 @@ tc245:
 	$(RM) -f tc245.hi tc245.o
 	'$(TEST_HC)' $(TEST_HC_OPTS) --make tc245
 
-# Trac #5792 gave an error on the second compilation,
+# #5792 gave an error on the second compilation,
 # presumably because of the .hi file
 T5792:
 	$(RM) -f T5792.o T5792.hi
diff --git a/testsuite/tests/typecheck/should_compile/T12734a.hs b/testsuite/tests/typecheck/should_compile/T12734a.hs
index 5f1da8b81856b6f733378506e852530c231eeb6b..d535300994a2377277865b08851db39d12f7603a 100644
--- a/testsuite/tests/typecheck/should_compile/T12734a.hs
+++ b/testsuite/tests/typecheck/should_compile/T12734a.hs
@@ -78,7 +78,7 @@ test_ghc_err = test_gr @(KT A '[Ty] IO)
                        @(Expr Net '[Ty])
 -}
 
-{-  Some notes.  See comment:10 on Trac #12734
+{-  Some notes.  See comment:10 on #12734
 
 [W] Con m (TStk t lrs)
 [W] Inferable A lrs m
diff --git a/testsuite/tests/typecheck/should_compile/T13651.hs b/testsuite/tests/typecheck/should_compile/T13651.hs
index 63bd88eb5c28a9986bc4a17b2a8f0f3283bc3e9e..57e627aa71b63126631963fd8875a37d1758cffa 100644
--- a/testsuite/tests/typecheck/should_compile/T13651.hs
+++ b/testsuite/tests/typecheck/should_compile/T13651.hs
@@ -14,7 +14,7 @@ foo :: (F cr cu ~ Bar h (Bar r u),
 foo = undefined
 
 {-  Typechecking this program used to /just/ succeed in GHC 8.2,
-    (see Trac #14745 for why), but doesn't in 8.4.
+    (see #14745 for why), but doesn't in 8.4.
 
 [G]  F cr cu ~ Bar h (Bar r u),
      F cu cs ~ Bar (Foo h) (Bar u s))
diff --git a/testsuite/tests/typecheck/should_compile/T1470.hs b/testsuite/tests/typecheck/should_compile/T1470.hs
index b8009f2bc387d0d5938288258ae480e02fb0b4df..c19a520bf45733b490e031d90613952b1d20f671 100644
--- a/testsuite/tests/typecheck/should_compile/T1470.hs
+++ b/testsuite/tests/typecheck/should_compile/T1470.hs
@@ -1,7 +1,7 @@
 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
 {-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, UndecidableInstances, KindSignatures #-}
 
--- Trac #1470
+-- #1470
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_compile/T1495.hs b/testsuite/tests/typecheck/should_compile/T1495.hs
index 0de4e456de44017f693c7a6bd9ac81c29ae92cb5..7865ee6543db1d476969e1b11fa32188dae95ab7 100644
--- a/testsuite/tests/typecheck/should_compile/T1495.hs
+++ b/testsuite/tests/typecheck/should_compile/T1495.hs
@@ -1,4 +1,4 @@
--- Test Trac #1495
+-- Test #1495
 
 module CompilerBug where
 
diff --git a/testsuite/tests/typecheck/should_compile/T2045.hs b/testsuite/tests/typecheck/should_compile/T2045.hs
index 78b924a6ea90ea4e2a8c539979e0f1fec8bd9640..00e17edfa2685a3eca8ca6023a6db8c7ad9e4db8 100644
--- a/testsuite/tests/typecheck/should_compile/T2045.hs
+++ b/testsuite/tests/typecheck/should_compile/T2045.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE EmptyDataDecls #-}
 {-# OPTIONS_GHC -fno-warn-type-defaults #-}
 
--- Trac #2045
+-- #2045
 -- ghc -fhpc --make Vhdl.hs -o gencirc -Wall
 
 module ShouleCompile where
diff --git a/testsuite/tests/typecheck/should_compile/T2433.hs b/testsuite/tests/typecheck/should_compile/T2433.hs
index 727ec6bb9b4a0afe6777837cf27ca983a2b2aca9..e916e91b07a58b613feb6de8c597c892f70272e2 100644
--- a/testsuite/tests/typecheck/should_compile/T2433.hs
+++ b/testsuite/tests/typecheck/should_compile/T2433.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 
--- Test Trac #2433
+-- Test #2433
 
 module T2433 where
 
diff --git a/testsuite/tests/typecheck/should_compile/T2494-2.hs b/testsuite/tests/typecheck/should_compile/T2494-2.hs
index 543f8f47fe8feaa38c6c10f000b9243d042df729..094cd10fb6af321ba31a61af2ea1e17bfd4b4106 100644
--- a/testsuite/tests/typecheck/should_compile/T2494-2.hs
+++ b/testsuite/tests/typecheck/should_compile/T2494-2.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
 
--- Trac #2494, should compile ok
+-- #2494, should compile ok
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_compile/T2494.hs b/testsuite/tests/typecheck/should_compile/T2494.hs
index 3e6c09c39c2be8b40d65f5115a3c426cd39f6a97..cbcc5352b0411f6c56efc656dabb8fc868db612e 100644
--- a/testsuite/tests/typecheck/should_compile/T2494.hs
+++ b/testsuite/tests/typecheck/should_compile/T2494.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
 
--- Trac #2494, should generate an error message
+-- #2494, should generate an error message
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_compile/T2497.hs b/testsuite/tests/typecheck/should_compile/T2497.hs
index 55c390dbedac8618e2a8656a817d2c498cc5f66b..12abe8e7984ad24310322bfb0ccc6a6d146d0f5f 100644
--- a/testsuite/tests/typecheck/should_compile/T2497.hs
+++ b/testsuite/tests/typecheck/should_compile/T2497.hs
@@ -5,13 +5,13 @@ module ShouldCompile() where
 foo x = x
 {-# NOINLINE [1] foo #-}
 
--- Trac #2497; test should compile without language
+-- #2497; test should compile without language
 --             pragmas to switch on the forall
 {-# RULES "id" forall (x :: a). foo x = x #-}
 
 
 
--- Trac #2213; eq should not be reported as unused
+-- #2213; eq should not be reported as unused
 
 eq,beq :: Eq a => a -> a -> Bool
 {-# NOINLINE [0] eq #-}
diff --git a/testsuite/tests/typecheck/should_compile/T2572.hs b/testsuite/tests/typecheck/should_compile/T2572.hs
index 0360749c2cf5f43a43298ecaf37d395edf5d5bd2..7856890f06696cfb676703ccdc2d9b10f696d5bd 100644
--- a/testsuite/tests/typecheck/should_compile/T2572.hs
+++ b/testsuite/tests/typecheck/should_compile/T2572.hs
@@ -1,6 +1,6 @@
  {-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
 
--- Trac #2572
+-- #2572
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_compile/T2735.hs b/testsuite/tests/typecheck/should_compile/T2735.hs
index 81deb7dda47b54e9bc598f1afa249e423b4c5bf2..f9bc784a7b17be4cbca378fcb26d059d4d24f45d 100644
--- a/testsuite/tests/typecheck/should_compile/T2735.hs
+++ b/testsuite/tests/typecheck/should_compile/T2735.hs
@@ -1,4 +1,4 @@
--- Trac #2735
+-- #2735
 
 module Bug where
 
diff --git a/testsuite/tests/typecheck/should_compile/T3018.hs b/testsuite/tests/typecheck/should_compile/T3018.hs
index f584f1bacc3e7b5baaf52231aa7d744e3a78a86d..77b656af1704960fee1ef88ced5a611d92d1d85c 100644
--- a/testsuite/tests/typecheck/should_compile/T3018.hs
+++ b/testsuite/tests/typecheck/should_compile/T3018.hs
@@ -48,7 +48,7 @@ instance Data (SubstD_B a t) t' => Subst_B a t t' where
     subst_B = undefined
 
 
-{- Commentary from Trac #3018
+{- Commentary from #3018
 
 Here are the key lines of code:
 
diff --git a/testsuite/tests/typecheck/should_compile/T3219.hs b/testsuite/tests/typecheck/should_compile/T3219.hs
index 5c23c1727d0ffc55ffc85afc5f0f1addbb116be8..52182c6d3b6f137c7cedd464fdba9f47bd1a6ce1 100644
--- a/testsuite/tests/typecheck/should_compile/T3219.hs
+++ b/testsuite/tests/typecheck/should_compile/T3219.hs
@@ -1,4 +1,4 @@
--- Trac #3219.  Lint error in GHC 6.10
+-- #3219.  Lint error in GHC 6.10
 
 module T3219 where
 
diff --git a/testsuite/tests/typecheck/should_compile/T3346.hs b/testsuite/tests/typecheck/should_compile/T3346.hs
index c163cecd09900b6a04797b14e2a2435cde04b5a3..30b49f731d76a61ec42fb77f4fb39ce8e6707878 100644
--- a/testsuite/tests/typecheck/should_compile/T3346.hs
+++ b/testsuite/tests/typecheck/should_compile/T3346.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies  #-}
 
--- Trac #3346
+-- #3346
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_compile/T3391.hs b/testsuite/tests/typecheck/should_compile/T3391.hs
index eb569366b5df11b8616236fb984e11bd25e63731..f773af32acf3cf35cf13d1970bae8fd1d0d62d21 100644
--- a/testsuite/tests/typecheck/should_compile/T3391.hs
+++ b/testsuite/tests/typecheck/should_compile/T3391.hs
@@ -3,7 +3,7 @@
 
 -- We should only generate one set of generic to/from functions
 -- for T, despite the multiple chunks caused by the TH splices
--- See Trac #3391
+-- See #3391
 
 module T3391 where
 
diff --git a/testsuite/tests/typecheck/should_compile/T3955.hs b/testsuite/tests/typecheck/should_compile/T3955.hs
index 220c4e7c2559b4df282600eb96ece0fd99607e1a..dc594c1b7b174d1b8e6920abdacf8ad80a28b9cc 100644
--- a/testsuite/tests/typecheck/should_compile/T3955.hs
+++ b/testsuite/tests/typecheck/should_compile/T3955.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
 
--- Test for Trac #3955
+-- Test for #3955
 
 module T3955 where
 
diff --git a/testsuite/tests/typecheck/should_compile/T9708.hs b/testsuite/tests/typecheck/should_compile/T9708.hs
index 38788574fcd5f7f5090668c7ed9e40ac9972f120..e87b8e80945476f925bfb3c9eedb5c9189650794 100644
--- a/testsuite/tests/typecheck/should_compile/T9708.hs
+++ b/testsuite/tests/typecheck/should_compile/T9708.hs
@@ -7,7 +7,7 @@ import Data.Proxy
 
 type family SomeFun (n :: Nat)
 
--- See the Trac ticket; whether this succeeds or fails is distinctly random
+-- See the ticket; whether this succeeds or fails is distinctly random
 
 -- upon creation, commit f861fc6ad8e5504a4fecfc9bb0945fe2d313687c, this failed
 
diff --git a/testsuite/tests/typecheck/should_compile/T9971.hs b/testsuite/tests/typecheck/should_compile/T9971.hs
index e02b21e3982ca7675d4ef14fda356c571db48537..57f8d3bc5ba26e2c9226248d427b47b08a60d141 100644
--- a/testsuite/tests/typecheck/should_compile/T9971.hs
+++ b/testsuite/tests/typecheck/should_compile/T9971.hs
@@ -11,5 +11,5 @@ foo = error "urk"
 
 bar x = [op foo, op foo]
  -- This gives rise to a [D] Vertex a1 ~ Vertex a2
- -- And that made the canonicaliser go into a loop (Trac #9971)
+ -- And that made the canonicaliser go into a loop (#9971)
 
diff --git a/testsuite/tests/typecheck/should_compile/T9973.hs b/testsuite/tests/typecheck/should_compile/T9973.hs
index 1a2148f4fa500cf749cdc83bd25b863dee36375a..4639a6c76811889c9470a17214b1e948300f2ebf 100644
--- a/testsuite/tests/typecheck/should_compile/T9973.hs
+++ b/testsuite/tests/typecheck/should_compile/T9973.hs
@@ -3,7 +3,7 @@
 module T9973 where
 
 duplicateDecl :: (Eq t) => t -> IO ()
--- Trac #9973 was a bogus "redundant constraint" here
+-- #9973 was a bogus "redundant constraint" here
 duplicateDecl sigs
  = do { newSpan <- return typeSig
 
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 81a63c594fccaef59d5300f46ebe5d8100a0373a..9d8f905bf330148eff065369a669f0bcfef5aedd 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -368,7 +368,7 @@ test('PolytypeDecomp', normal, compile, [''])
 test('T6011', normal, compile, [''])
 test('T6055', normal, compile, [''])
 test('DfltProb1', normal, compile, ['-O'])
-# Add -O for DfltProb1 to expose Trac #11291
+# Add -O for DfltProb1 to expose #11291
 test('DfltProb2', normal, compile, [''])
 test('T6134', normal, compile, [''])
 test('T6018', [], multimod_compile, ['T6018', ''])
diff --git a/testsuite/tests/typecheck/should_compile/syn-perf2.hs b/testsuite/tests/typecheck/should_compile/syn-perf2.hs
index 7a07bfa64301cd4bec08649afe51261393145bf8..6f9a9430ae2d6f8cfa014dc30e2c5511773c5a6b 100644
--- a/testsuite/tests/typecheck/should_compile/syn-perf2.hs
+++ b/testsuite/tests/typecheck/should_compile/syn-perf2.hs
@@ -1,5 +1,5 @@
 -- Another type-synonym performance test
---      (Trac 323)
+--      (#323)
 -- Fails in GHC up to 6.6
 
 module ShouldCompile where
diff --git a/testsuite/tests/typecheck/should_compile/tc208.hs b/testsuite/tests/typecheck/should_compile/tc208.hs
index 6fad1b21f44eefbc878f975e0be24cc767e1e6d1..8d9bb3636ec9b2bf68b302bd3ba8fbaf02a99811 100644
--- a/testsuite/tests/typecheck/should_compile/tc208.hs
+++ b/testsuite/tests/typecheck/should_compile/tc208.hs
@@ -4,11 +4,11 @@
 -- This program failed to typecheck in an early version of
 -- GHC with impredicative polymorphism, but it was fixed by
 -- doing pre-subsumption in the subsumption check.
--- Trac bug #821
+-- bug #821
 
 module ShouldCompile where
 
 type PPDoc = (?env :: Int) => Char
 
 f :: Char -> PPDoc
-f  = succ 
+f  = succ
diff --git a/testsuite/tests/typecheck/should_compile/tc217.hs b/testsuite/tests/typecheck/should_compile/tc217.hs
index c42c1eb33b4cf1fbc83b34975c5eef5877ca37e9..9835da8df1fdcdbba5973f745a73af8fe6a8ec98 100644
--- a/testsuite/tests/typecheck/should_compile/tc217.hs
+++ b/testsuite/tests/typecheck/should_compile/tc217.hs
@@ -12,9 +12,9 @@ instance Eq (a -> b) where
 instance Show (a -> b) where
      show = const "<fun>"
 
--- This is the example from Trac #179
+-- This is the example from #179
 foo x = show (\_ -> True)
 
--- This is the example from Trac #963
+-- This is the example from #963
 instance (Num a, Monad m, Eq (m a), Show (m a)) => Num (m a) where
 test = 1 True
diff --git a/testsuite/tests/typecheck/should_compile/tc220.hs b/testsuite/tests/typecheck/should_compile/tc220.hs
index f9f5443bc0ea37836563545c85b854d4356964c0..7c87742ba6bfa151c020f993a088d05f04ff54d8 100644
--- a/testsuite/tests/typecheck/should_compile/tc220.hs
+++ b/testsuite/tests/typecheck/should_compile/tc220.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE DeriveDataTypeable #-}
 
--- See Trac #1033
+-- See #1033
 
 module Pointful' where
 
diff --git a/testsuite/tests/typecheck/should_compile/tc226.hs b/testsuite/tests/typecheck/should_compile/tc226.hs
index d9c94c2c4308fc61831c76153522b720c9bc9fa1..fa67a4525faf64f11de4f492627727f97bbecc97 100644
--- a/testsuite/tests/typecheck/should_compile/tc226.hs
+++ b/testsuite/tests/typecheck/should_compile/tc226.hs
@@ -1,7 +1,7 @@
 {-# OPTIONS_GHC -O -funbox-strict-fields #-}
 
 -- The combination of unboxing and a recursive newtype crashed GHC 6.6.1
--- Trac #1255
+-- #1255
 -- Use -O to force the unboxing to happen
 
 module Foo where
diff --git a/testsuite/tests/typecheck/should_compile/tc227.hs b/testsuite/tests/typecheck/should_compile/tc227.hs
index 5a4736ecccdccc39b3def5cb92ce486ea14fe9cd..cf439cf49f5dd8051b5cc1fd4ddc8b3a5532cfec 100644
--- a/testsuite/tests/typecheck/should_compile/tc227.hs
+++ b/testsuite/tests/typecheck/should_compile/tc227.hs
@@ -1,5 +1,5 @@
 -- Ensure that tuple instances are brought into scope
--- See Trac #1385
+-- See #1385
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/typecheck/should_compile/tc228.hs b/testsuite/tests/typecheck/should_compile/tc228.hs
index a3d1c2f464ece7b7a0133f37611f6403b67a258d..79896748471a7d5b1b15009e24c6e08cc3259e6e 100644
--- a/testsuite/tests/typecheck/should_compile/tc228.hs
+++ b/testsuite/tests/typecheck/should_compile/tc228.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE ExistentialQuantification #-}
 
 -- Without a type sig this is slightly tricky.
--- See Trac #1430
+-- See #1430
 
 -- Reason: we get an implication constraint (forall a. Typeable a => Typeable b),
 -- when generalising unExTypeable.  We want to infer a context for the 
diff --git a/testsuite/tests/typecheck/should_compile/tc230.hs b/testsuite/tests/typecheck/should_compile/tc230.hs
index 0371ec904fd21e3486c2c5e131097c1f4214da5e..f6bd86e89203124eb311f676bc7c7d7bd33af847 100644
--- a/testsuite/tests/typecheck/should_compile/tc230.hs
+++ b/testsuite/tests/typecheck/should_compile/tc230.hs
@@ -1,7 +1,7 @@
 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
 {-# LANGUAGE ImplicitParams, RankNTypes #-}
 
--- Trac #1445
+-- #1445
 
 module Bug where
 
diff --git a/testsuite/tests/typecheck/should_compile/tc231.hs b/testsuite/tests/typecheck/should_compile/tc231.hs
index 1c00294009eb294c42831878406981e68ca0f5f0..9d0fc8316ba72416fec23c4217b9a5545b3e23a0 100644
--- a/testsuite/tests/typecheck/should_compile/tc231.hs
+++ b/testsuite/tests/typecheck/should_compile/tc231.hs
@@ -1,7 +1,7 @@
 {-# OPTIONS_GHC -ddump-types -dsuppress-module-prefixes #-}
 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-}
 
--- See Trac #1456
+-- See #1456
 
 -- The key thing here is that foo should get the type
 --     foo :: forall b s t1. (Zork s (Z [Char]) b)
diff --git a/testsuite/tests/typecheck/should_compile/tc232.hs b/testsuite/tests/typecheck/should_compile/tc232.hs
index 2fc8544ab3c948b9302efb8c8264784f80850fcb..0f3294cac78aafa8d72b2681708bad76e417fa18 100644
--- a/testsuite/tests/typecheck/should_compile/tc232.hs
+++ b/testsuite/tests/typecheck/should_compile/tc232.hs
@@ -2,7 +2,7 @@
 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
 
 -- This one fixed the constraint solver (Lint error)
--- See Trac #1494
+-- See #1494
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/typecheck/should_compile/tc235.hs b/testsuite/tests/typecheck/should_compile/tc235.hs
index 39bda75168b28e94741d67d7fd6e528b1cb99be8..57381fabeaa7ae8505ebfb5bfd31fba8492050c5 100644
--- a/testsuite/tests/typecheck/should_compile/tc235.hs
+++ b/testsuite/tests/typecheck/should_compile/tc235.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE AllowAmbiguousTypes #-}
     -- 'x' and 'v' are ambiguous
 
--- Trac #1564
+-- #1564
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_compile/tc239.hs b/testsuite/tests/typecheck/should_compile/tc239.hs
index f3941d3427974ebcb43c5233591d2ce80e9c79b0..fef339c0dbe1aff58b57b2c734e9c5900e896b22 100644
--- a/testsuite/tests/typecheck/should_compile/tc239.hs
+++ b/testsuite/tests/typecheck/should_compile/tc239.hs
@@ -1,5 +1,5 @@
 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
--- Trac #1072
+-- #1072
 
 module ShouldCompile where
 
diff --git a/testsuite/tests/typecheck/should_compile/tc241.hs b/testsuite/tests/typecheck/should_compile/tc241.hs
index 8dca34314a6f19fa4b385864e733cc0895b1a3eb..dd986b5c5163bdd1ebf7923f45dd2deb10a2d490 100644
--- a/testsuite/tests/typecheck/should_compile/tc241.hs
+++ b/testsuite/tests/typecheck/should_compile/tc241.hs
@@ -1,5 +1,5 @@
 {-# OPTIONS_GHC -XGADTs -XRankNTypes -O1 #-}
--- Trac #2018
+-- #2018
 
 module Bug1 where
 
diff --git a/testsuite/tests/typecheck/should_compile/tc242.hs b/testsuite/tests/typecheck/should_compile/tc242.hs
index eda338bc8a1ff0402e532ef7b44f985c049ae15b..1faa70734db9f9b28ecfbd2c968e8bfaf10cddec 100644
--- a/testsuite/tests/typecheck/should_compile/tc242.hs
+++ b/testsuite/tests/typecheck/should_compile/tc242.hs
@@ -7,7 +7,7 @@ f1 (x:xs) = xs ++ [ x :: a ]   -- OK
 f2 :: forall a. [a] -> [a]
 f2 = \(x:xs) -> xs ++ [ x :: a ]   -- OK
 
--- This pair is a cut-down version of Trac #2030
+-- This pair is a cut-down version of #2030
 isSafe alts = isSafeAlts alts
 
 isSafeAlts :: forall m . Int -> m Int
diff --git a/testsuite/tests/typecheck/should_fail/FDsFromGivens.hs b/testsuite/tests/typecheck/should_fail/FDsFromGivens.hs
index 110199b97bb4b2073eb414fa6838f87872990cd7..39333f6614b7255fd53154fad446d79f5b358273 100644
--- a/testsuite/tests/typecheck/should_fail/FDsFromGivens.hs
+++ b/testsuite/tests/typecheck/should_fail/FDsFromGivens.hs
@@ -7,7 +7,7 @@ class C a b | a -> b where
 
 {- Failing, as it righteously should! It's inaccessible code -}
 -- But (c.f. test T5236) we no longer reject this in the
--- typechecker (see Trac #12466)
+-- typechecker (see #12466)
 -- Instead we get a redundant pattern-match warning,
 -- in the post-typechecking pattern-match checks
 g1 :: (C Char [a], C Char Bool) => a -> ()
diff --git a/testsuite/tests/typecheck/should_fail/T10715.hs b/testsuite/tests/typecheck/should_fail/T10715.hs
index 801ec4a5d7a4815529bcdbe4893d326ac5567402..a3d5d261c9c9aec0363c8264751efd7f20d5d8de 100644
--- a/testsuite/tests/typecheck/should_fail/T10715.hs
+++ b/testsuite/tests/typecheck/should_fail/T10715.hs
@@ -6,10 +6,10 @@ import Data.Ord ( Down )  -- convenient newtype
 
 data X a
 
--- See Trac #10715 for a long discussion about whether
+-- See #10715 for a long discussion about whether
 -- this should be accepted or not.
 --
--- But in Trac #12466 we decided to accept contradictory
+-- But in #12466 we decided to accept contradictory
 -- type signatures, so definition is now accepeted even
 -- though you can never call it.  Instead we get a
 -- redundant pattern-match warning, in the
diff --git a/testsuite/tests/typecheck/should_fail/T11948.hs b/testsuite/tests/typecheck/should_fail/T11948.hs
index 2b737be0ad2b900653225878ff8a309c3c5d46f2..13ecce5d8e110299c27ccb5c59153062d5367014 100644
--- a/testsuite/tests/typecheck/should_fail/T11948.hs
+++ b/testsuite/tests/typecheck/should_fail/T11948.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE MultiParamTypeClasses, TypeFamilies, NoMonoLocalBinds #-}
 -- The NoMonoLocalBinds is crucial to making inference fail
--- See Trac #11948 comment:2
+-- See #11948 comment:2
 {-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-}
 
 module T11948 where
diff --git a/testsuite/tests/typecheck/should_fail/T1633.hs b/testsuite/tests/typecheck/should_fail/T1633.hs
index fb95956774358e32586c41ecf6738bc68a1b6e2a..d76bd71298cb1dda3858efd78cf10aa440389de4 100644
--- a/testsuite/tests/typecheck/should_fail/T1633.hs
+++ b/testsuite/tests/typecheck/should_fail/T1633.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE FlexibleInstances #-}
 
 -- This just tests what the kind error message looks like
--- Trac #1633
+-- #1633
 
 module T1633 where
 
diff --git a/testsuite/tests/typecheck/should_fail/T1899.hs b/testsuite/tests/typecheck/should_fail/T1899.hs
index a49b647be7f3ee2e4c4fe76e926373016b034236..835d8f1aa23ec227c004bcff639ba02900ca757d 100644
--- a/testsuite/tests/typecheck/should_fail/T1899.hs
+++ b/testsuite/tests/typecheck/should_fail/T1899.hs
@@ -1,4 +1,4 @@
--- Test for Trac #1899
+-- Test for #1899
 
 module T1899 where
 
diff --git a/testsuite/tests/typecheck/should_fail/T2126.hs b/testsuite/tests/typecheck/should_fail/T2126.hs
index 0720565b0c5a8432092e31c3126b192bff4fb978..9abfe10a20b7f01b8a4bd90437a4641608859435 100644
--- a/testsuite/tests/typecheck/should_fail/T2126.hs
+++ b/testsuite/tests/typecheck/should_fail/T2126.hs
@@ -1,4 +1,4 @@
--- Trac #2126
+-- #2126
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_fail/T2307.hs b/testsuite/tests/typecheck/should_fail/T2307.hs
index 5bf508679c4c3ef2f79e1602ad5141b347081ec6..6ca238b09792dd508637792b47d758e4a180353d 100644
--- a/testsuite/tests/typecheck/should_fail/T2307.hs
+++ b/testsuite/tests/typecheck/should_fail/T2307.hs
@@ -3,7 +3,7 @@
               IncoherentInstances,
               FlexibleInstances #-}
 
--- Trac #2307
+-- #2307
 
 module ShouldFail where
 
diff --git a/testsuite/tests/typecheck/should_fail/T2414.hs b/testsuite/tests/typecheck/should_fail/T2414.hs
index fba628db27b7c832aa3c7f630fedea4e52a1a80a..205a525af978946accac75363bbf669ddfa7e454 100644
--- a/testsuite/tests/typecheck/should_fail/T2414.hs
+++ b/testsuite/tests/typecheck/should_fail/T2414.hs
@@ -1,4 +1,4 @@
--- Test for Trac #2414
+-- Test for #2414
 -- Should provoke an occurs-check error
 
 module ShouldFail where
diff --git a/testsuite/tests/typecheck/should_fail/T2538.hs b/testsuite/tests/typecheck/should_fail/T2538.hs
index 11d9c479b541eb5e8d9da48f71467b391329c5d8..849256ad3a72914ecd23f634af4aa2eac43eb4f5 100644
--- a/testsuite/tests/typecheck/should_fail/T2538.hs
+++ b/testsuite/tests/typecheck/should_fail/T2538.hs
@@ -1,5 +1,5 @@
 
--- Trac #2538
+-- #2538
 module ShouldFail where
 import Data.Ix
 
diff --git a/testsuite/tests/typecheck/should_fail/T2714.hs b/testsuite/tests/typecheck/should_fail/T2714.hs
index b5e8d9c8b9a07d299eb257c10329d640ec4598e1..52d67e38ece64b5f9513c2c27b683edbbb5598f0 100644
--- a/testsuite/tests/typecheck/should_fail/T2714.hs
+++ b/testsuite/tests/typecheck/should_fail/T2714.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE ScopedTypeVariables, RankNTypes #-}
 
--- Trac #2714
+-- #2714
 
 module T2714 where
 
diff --git a/testsuite/tests/typecheck/should_fail/T2806.hs b/testsuite/tests/typecheck/should_fail/T2806.hs
index ac95542c94b628413de4596e43255b03ef829463..e348d25e9b16062ebb3ea4049491e766c783772f 100644
--- a/testsuite/tests/typecheck/should_fail/T2806.hs
+++ b/testsuite/tests/typecheck/should_fail/T2806.hs
@@ -2,7 +2,7 @@
 {-# LANGUAGE MagicHash #-}
 {-# OPTIONS_GHC -Wunbanged-strict-patterns #-}
 
--- Trac #2806
+-- #2806
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_fail/T2994.hs b/testsuite/tests/typecheck/should_fail/T2994.hs
index cd09745aba4c1d919b5ec5d2748bc94c25f68644..aed2c4aa21a11a80cd6e480247325efab5b775f8 100644
--- a/testsuite/tests/typecheck/should_fail/T2994.hs
+++ b/testsuite/tests/typecheck/should_fail/T2994.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE MultiParamTypeClasses #-}
 
--- Trac #2994
+-- #2994
 
 module T2994 where
 
diff --git a/testsuite/tests/typecheck/should_fail/T3155.hs b/testsuite/tests/typecheck/should_fail/T3155.hs
index 3a4c0d2f771fcc169848b23690538f6d75861c09..81f8c7d1396440b04feb6eb6529023664191421c 100644
--- a/testsuite/tests/typecheck/should_fail/T3155.hs
+++ b/testsuite/tests/typecheck/should_fail/T3155.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE GADTs, TypeOperators #-}
 module T3155 where
 
--- Test Trac #3155
+-- Test #3155
 -- Gave bad error message in GHC 6.10
 
 data Any s where
diff --git a/testsuite/tests/typecheck/should_fail/T3176.hs b/testsuite/tests/typecheck/should_fail/T3176.hs
index 0235ad712fb8cec741e125f3a1398f56fab70bbf..e87f86b64f5370dd33cb4c1039b5e4260d14030b 100644
--- a/testsuite/tests/typecheck/should_fail/T3176.hs
+++ b/testsuite/tests/typecheck/should_fail/T3176.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE ExistentialQuantification #-}
 
--- Trac #3176
+-- #3176
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_fail/T3323.hs b/testsuite/tests/typecheck/should_fail/T3323.hs
index 22ed5208064ffcdcbccb86092626b56ef44808b4..3a5f27eccc2e2048d3130ad66d9aac9bd4ff9c1a 100644
--- a/testsuite/tests/typecheck/should_fail/T3323.hs
+++ b/testsuite/tests/typecheck/should_fail/T3323.hs
@@ -1,4 +1,4 @@
--- Trac #3323
+-- #3323
 module T3323 where
 
 import GHC.IO.Handle.Types
diff --git a/testsuite/tests/typecheck/should_fail/T3406.hs b/testsuite/tests/typecheck/should_fail/T3406.hs
index e31a32a79c96bf0033d486380ee3a84c5d4d151f..fbc314061cf1f8315d8519ac067bfdf5ed49c709 100644
--- a/testsuite/tests/typecheck/should_fail/T3406.hs
+++ b/testsuite/tests/typecheck/should_fail/T3406.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 
--- Trac #3406
+-- #3406
 -- A pattern signature that discards the bound variables
 
 module T3406 where
diff --git a/testsuite/tests/typecheck/should_fail/T3613.hs b/testsuite/tests/typecheck/should_fail/T3613.hs
index 8b6f745027f02b48778dda7dd4cd316db671d0f7..fe68db520ef90ee6d88d30bb7adebe2fd360dcfb 100644
--- a/testsuite/tests/typecheck/should_fail/T3613.hs
+++ b/testsuite/tests/typecheck/should_fail/T3613.hs
@@ -1,4 +1,4 @@
--- c.f Trac #3613
+-- c.f #3613
 
 module T3613 where
 
diff --git a/testsuite/tests/typecheck/should_fail/T5236.hs b/testsuite/tests/typecheck/should_fail/T5236.hs
index f32c06dcdb97eef39eb73838f7493c64906a9fa8..9f617826c39ebc36431305ad9c7508bd6b2ee18c 100644
--- a/testsuite/tests/typecheck/should_fail/T5236.hs
+++ b/testsuite/tests/typecheck/should_fail/T5236.hs
@@ -12,7 +12,7 @@ instance Id B B
 
 -- The fundeps mean that this type signature
 -- has a (derived) insoluble Given, A~B, but
--- we now ignore that (Trac #12466)
+-- we now ignore that (#12466)
 loop :: Id A B => Bool
 loop = True
 
diff --git a/testsuite/tests/typecheck/should_fail/T8392a.hs b/testsuite/tests/typecheck/should_fail/T8392a.hs
index 940f8b6a9972004c3542808a74000a12f47d5c29..40fd339805b0cbfdeb37af97caf5333604ea36f2 100644
--- a/testsuite/tests/typecheck/should_fail/T8392a.hs
+++ b/testsuite/tests/typecheck/should_fail/T8392a.hs
@@ -3,7 +3,7 @@ module T8392a where
 
 -- Should complain even with AllowAmbiguousTypes
 --
--- But (Trac #12466) we now don't complain about
+-- But (#12466) we now don't complain about
 -- contradictory signatures
 -- Instead we get a redundant pattern-match warning,
 -- in the post-typechecking pattern-match checks
diff --git a/testsuite/tests/typecheck/should_fail/T8806.hs b/testsuite/tests/typecheck/should_fail/T8806.hs
index 6b80f15ee1995c4d4e3c056e1561f4233c1c6272..f2bda3b6ca4ddd4187f93ddbd9935a82668e4ea5 100644
--- a/testsuite/tests/typecheck/should_fail/T8806.hs
+++ b/testsuite/tests/typecheck/should_fail/T8806.hs
@@ -1,4 +1,4 @@
--- Trac #8806
+-- #8806
 
 module T8806 where
 
diff --git a/testsuite/tests/typecheck/should_fail/T8883.hs b/testsuite/tests/typecheck/should_fail/T8883.hs
index 5b0fc5922c2739004dfb77e4dcf339837fec410d..c3af3af51342be384eb6f42a9552eb4cb41f931b 100644
--- a/testsuite/tests/typecheck/should_fail/T8883.hs
+++ b/testsuite/tests/typecheck/should_fail/T8883.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TypeFamilies #-}
 
--- Trac #8883
+-- #8883
 
 module T8883 where
 
diff --git a/testsuite/tests/typecheck/should_fail/T9858a.hs b/testsuite/tests/typecheck/should_fail/T9858a.hs
index fda55c20db95f26b1c40289efc0e98c443a63b3c..b9cbf8fa1addb72836b65cee27a4664d09766b31 100644
--- a/testsuite/tests/typecheck/should_fail/T9858a.hs
+++ b/testsuite/tests/typecheck/should_fail/T9858a.hs
@@ -1,4 +1,4 @@
--- From comment:76 in Trac #9858
+-- From comment:76 in #9858
 -- This exploit still works in GHC 7.10.1.
 -- By Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn
 
diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs
index 833609d48a053871425a4d1319c921e981bfcd7f..3967c3c0bd7f9611436ff6327e7f9e59d604322f 100644
--- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs
+++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs
@@ -23,7 +23,7 @@ foo5 = coerce :: Void -> ()
 
 ------------------------------------
 -- This next one generates an exponentally big type as it
--- tries to unwrap.  See comment:15 in Trac #11518
+-- tries to unwrap.  See comment:15 in #11518
 -- Adding asserions that force the types can make us
 -- run out of space.
 newtype VoidBad a = VoidBad (VoidBad (a,a))
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index bd13b2f8cedc677e8530f93d310c0e34b9495b11..6344d74c7af8e24d304944dc49d4a704d75c2953 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -140,7 +140,7 @@ test('tcfail154', normal, compile_fail, [''])
 test('tcfail155', normal, compile_fail, [''])
 test('tcfail156', normal, compile_fail, [''])
 test('tcfail157', normal, compile_fail, [''])
-# Skip tcfail158 until Trac ticket #15899 fixes the broken test
+# Skip tcfail158 until #15899 fixes the broken test
 test('tcfail158', skip, compile_fail, [''])
 test('tcfail159', normal, compile_fail, [''])
 test('tcfail160', normal, compile_fail, [''])
diff --git a/testsuite/tests/typecheck/should_fail/tcfail138.hs b/testsuite/tests/typecheck/should_fail/tcfail138.hs
index 31cde734ec624f9d301e5a4e60e0ed6ecb088d27..1c628a1b5b37f604ec3c59b85ec3d993b2a72f1e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail138.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail138.hs
@@ -20,7 +20,7 @@
 -- So, today, this program fails.  It's trivial to fix by adding a fundep for C
 --      class (G a, L a b) => C a b | a -> b
 
--- Note: Sept 08: when fixing Trac #1470, tc138 started working!
+-- Note: Sept 08: when fixing #1470, tc138 started working!
 -- This test is a very strange one (fundeps, undecidable instances),
 -- so I'm just marking it as "should-succeed".  It's not very clear to
 -- me what the "right" answer should be; when we have the type equality
diff --git a/testsuite/tests/typecheck/should_fail/tcfail169.hs b/testsuite/tests/typecheck/should_fail/tcfail169.hs
index 46606a838d7c9fb65e2d827faed6b4663c2b5e05..510e61212c2d4b4ffdef96a4dbcb5190e2d4d224 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail169.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail169.hs
@@ -1,5 +1,5 @@
 
--- Trac #958
+-- #958
 
 module ShoulFail where
 
diff --git a/testsuite/tests/typecheck/should_fail/tcfail175.hs b/testsuite/tests/typecheck/should_fail/tcfail175.hs
index 5eacd24291ec70744fb9d3045b56b8b2ab670f39..09e7dc3c9bdb5f6223a5494a5b523f0ea6064669 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail175.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail175.hs
@@ -1,6 +1,6 @@
 
 -- Crashed GHC 6.6!
--- Trac #1153
+-- #1153
  
 module ShouldFail where
 
diff --git a/testsuite/tests/typecheck/should_fail/tcfail177.hs b/testsuite/tests/typecheck/should_fail/tcfail177.hs
index 8d264db53d9defe785372663bb4e9124bbc8f8f0..4cbe12bfbca649f9951b9011eb25080fb31cda82 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail177.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail177.hs
@@ -1,6 +1,6 @@
 module ShouldFail where
 
--- See Trac #1176
+-- See #1176
 -- This is really a pretty-printer test, not a typechecker test
 --
 -- Before ghc-7.2 the error messages looked like this (notice the wrong
diff --git a/testsuite/tests/typecheck/should_fail/tcfail178.hs b/testsuite/tests/typecheck/should_fail/tcfail178.hs
index 8071def02e896c0466c39d6e164871ad0607c6d9..74174ce249c68729f3fc6f8d6990796753b23c6c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail178.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail178.hs
@@ -1,4 +1,4 @@
--- See Trac #1221
+-- See #1221
 
 module ShouldFail where
 
diff --git a/testsuite/tests/typecheck/should_fail/tcfail185.hs b/testsuite/tests/typecheck/should_fail/tcfail185.hs
index d6026368ec5e4a7655338559f26ce087d9237840..c717936ce7a5d08a9e8d1a7fbf45eb46287ca29a 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail185.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail185.hs
@@ -1,4 +1,4 @@
--- See Trac #1606
+-- See #1606
 
 module ShouldFail where
 
diff --git a/testsuite/tests/typecheck/should_fail/tcfail186.hs b/testsuite/tests/typecheck/should_fail/tcfail186.hs
index 6148517a6d6a6a9e4c0fdea0cd620b0caae50cc9..647fbe33ae82e638b14040885f4c212d172f387f 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail186.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail186.hs
@@ -1,4 +1,4 @@
--- Trac #1814
+-- #1814
 
 module ShouldFail where
 
diff --git a/testsuite/tests/typecheck/should_fail/tcfail187.hs b/testsuite/tests/typecheck/should_fail/tcfail187.hs
index eb508066ecd960b4bc42b87bf89b6065b87ecf6d..d863b54e41cc44df3aa928bf36471b955376e6f0 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail187.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail187.hs
@@ -1,4 +1,4 @@
--- Trac #1806
+-- #1806
 
 module ShouldFail where
 
diff --git a/testsuite/tests/typecheck/should_fail/tcfail188.hs b/testsuite/tests/typecheck/should_fail/tcfail188.hs
index 821f0c69dc414e7aefef921a5c293d57e8a49010..fef1676e50116d806146dbb35de0e4e6988577f9 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail188.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail188.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE RankNTypes, KindSignatures #-}
 {-# OPTIONS_GHC -Werror #-}
 
--- Trac #959
+-- #959
 
 module ShouldFail where
 
diff --git a/testsuite/tests/typecheck/should_fail/tcfail204.hs b/testsuite/tests/typecheck/should_fail/tcfail204.hs
index ed561c3290902722cb4adf365726dd7dc203cd1a..321098cbd054ad56b50d3c82b422369ae8f8f334 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail204.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail204.hs
@@ -2,7 +2,7 @@
 {-# OPTIONS_GHC -Wall #-}
 {-# OPTIONS_GHC -Werror #-}
 
--- Trac #3261
+-- #3261
 
 module Foo where
 
diff --git a/testsuite/tests/typecheck/should_run/Defer01.hs b/testsuite/tests/typecheck/should_run/Defer01.hs
index 135fd837ca8bbc3f9f9adb3bbb69b427c0b2ffc5..551c626f7c4c0cd7cb42b3cf17dc865de7f1e29f 100644
--- a/testsuite/tests/typecheck/should_run/Defer01.hs
+++ b/testsuite/tests/typecheck/should_run/Defer01.hs
@@ -42,7 +42,7 @@ class MyClass a where myOp :: a -> String
 
 j = myOp 23 -- Two errors, should not combine them
 
--- No longer reported as an error: Trac #12466
+-- No longer reported as an error: #12466
 k :: (Int ~ Bool) => Int -> Bool
 k x = x
 
diff --git a/utils/gen-dll/Main.hs b/utils/gen-dll/Main.hs
index 7cc965bd7dcd2e10808e982e652553c722d83bec..39f8ed9c1321deb8aa4b57e54ff2427096263334 100644
--- a/utils/gen-dll/Main.hs
+++ b/utils/gen-dll/Main.hs
@@ -5,7 +5,7 @@
   gen-dll is a replacement for dll-split which aims to solve a simple problem
   during the building of stage2. The issue is that the PE image format only has
   a 16-bit field for the symbol count. This means we can't have more than 2^16-1
-  symbols in a single PE file. See Trac #5987.
+  symbols in a single PE file. See #5987.
 
   gen-dll solves this issue by partitioning the object files in such a way that
   a single dll never has more than the allowed amount of symbols. The general
diff --git a/utils/ghc-in-ghci/settings.ghci b/utils/ghc-in-ghci/settings.ghci
index f6a6843afbd1788bcab100c38448bdf2dcec2249..d2e2e1f5202e5a8c9c2870793162c4afab178f1d 100644
--- a/utils/ghc-in-ghci/settings.ghci
+++ b/utils/ghc-in-ghci/settings.ghci
@@ -54,7 +54,7 @@
 :set -i_build/stage1/compiler/build
 
 -- -fobject-code is required because bytecode doesn't support unboxed tuples
--- https://ghc.haskell.org/trac/ghc/ticket/1257
+-- https://gitlab.haskell.org/ghc/ghc/issues/1257
 :set -odir ./.ghci-objects
 :set -hidir ./.ghci-objects
 :set -fobject-code
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 534bbac6ddfb5dc79eeea0c5c1fca84d7ce50973..4886d85f745f23ae871302d28c8103978208958f 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -1312,7 +1312,7 @@ So, instead, we do two things here:
   - We recompute it: we simply look up the unit ID of the package in the original
     database, and use *its* abi-depends.
 
-See Trac #14381, and Cabal issue #4728.
+See #14381, and Cabal issue #4728.
 
 Additionally, because we are throwing away the original (declared) ABI deps, we
 return a boolean that indicates whether any abi-depends were actually
diff --git a/utils/runghc/Main.hs b/utils/runghc/Main.hs
index dec53eefb0acacbcbf29651ce4ddc8e661668a66..f0ccb27c833b5205fec34022cf12fc278689cd3a 100644
--- a/utils/runghc/Main.hs
+++ b/utils/runghc/Main.hs
@@ -64,7 +64,7 @@ main = do
 -- a scenario, we must guess where ghc lives. Given a path where ghc might
 -- live, we check for the existence of ghc. If we can't find it, we assume that
 -- we're building ghc from source, in which case we fall back on ghc-stage2.
--- (See Trac #1185.)
+-- (See #1185.)
 findGhc :: FilePath -> IO FilePath
 findGhc path = do
     let ghcDir = takeDirectory (normalise path)