summaryrefslogtreecommitdiff
path: root/compiler/typecheck
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/typecheck')
-rw-r--r--compiler/typecheck/ClsInst.hs8
-rw-r--r--compiler/typecheck/FunDeps.hs18
-rw-r--r--compiler/typecheck/Inst.hs2
-rw-r--r--compiler/typecheck/TcAnnotations.hs4
-rw-r--r--compiler/typecheck/TcBinds.hs18
-rw-r--r--compiler/typecheck/TcCanonical.hs28
-rw-r--r--compiler/typecheck/TcDeriv.hs36
-rw-r--r--compiler/typecheck/TcDerivInfer.hs4
-rw-r--r--compiler/typecheck/TcDerivUtils.hs8
-rw-r--r--compiler/typecheck/TcEnv.hs16
-rw-r--r--compiler/typecheck/TcErrors.hs38
-rw-r--r--compiler/typecheck/TcEvidence.hs4
-rw-r--r--compiler/typecheck/TcExpr.hs22
-rw-r--r--compiler/typecheck/TcFlatten.hs12
-rw-r--r--compiler/typecheck/TcForeign.hs2
-rw-r--r--compiler/typecheck/TcGenDeriv.hs24
-rw-r--r--compiler/typecheck/TcGenFunctor.hs6
-rw-r--r--compiler/typecheck/TcGenGenerics.hs4
-rw-r--r--compiler/typecheck/TcHoleErrors.hs2
-rw-r--r--compiler/typecheck/TcHsSyn.hs8
-rw-r--r--compiler/typecheck/TcHsType.hs26
-rw-r--r--compiler/typecheck/TcInstDcls.hs22
-rw-r--r--compiler/typecheck/TcInteract.hs38
-rw-r--r--compiler/typecheck/TcMType.hs16
-rw-r--r--compiler/typecheck/TcMatches.hs6
-rw-r--r--compiler/typecheck/TcPat.hs6
-rw-r--r--compiler/typecheck/TcPatSyn.hs28
-rw-r--r--compiler/typecheck/TcRnDriver.hs16
-rw-r--r--compiler/typecheck/TcRnExports.hs8
-rw-r--r--compiler/typecheck/TcRnMonad.hs6
-rw-r--r--compiler/typecheck/TcRnTypes.hs18
-rw-r--r--compiler/typecheck/TcRules.hs4
-rw-r--r--compiler/typecheck/TcSMonad.hs28
-rw-r--r--compiler/typecheck/TcSigs.hs12
-rw-r--r--compiler/typecheck/TcSimplify.hs66
-rw-r--r--compiler/typecheck/TcSplice.hs12
-rw-r--r--compiler/typecheck/TcTyClsDecls.hs42
-rw-r--r--compiler/typecheck/TcTyDecls.hs4
-rw-r--r--compiler/typecheck/TcType.hs16
-rw-r--r--compiler/typecheck/TcUnify.hs34
-rw-r--r--compiler/typecheck/TcValidity.hs66
41 files changed, 369 insertions, 369 deletions
diff --git a/compiler/typecheck/ClsInst.hs b/compiler/typecheck/ClsInst.hs
index 9f58a0323a..58b9734b05 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 94525e8294..14399df4a6 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 77e8cdf0b2..89e5569c1e 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 4d246efc23..050c5db977 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 05fe393b98..b4803fc043 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 9abc04809d..765abc7c47 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 4736ded2f2..736f44e211 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 d38c922879..d834b09bbe 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 32a7aca922..cb5f6da02d 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 7337345ed0..f0be9a83ab 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 3f0f82cb1d..b5d98d07c9 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 9ee23ebfea..b5209a4791 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 d8c53aade2..4d813b0086 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 80202b7cbc..39a33f3fd7 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 4e5feb4d43..877ba805f2 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 e4f50ddaf7..4d731db15c 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 02f45ad316..240fc27103 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 123cfd3535..8e328b0eed 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 3f2556c8c4..db47450aa1 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 7755daf44b..52783e7210 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 0357c1046d..7438c4823b 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 7314dd7f0e..9642756b99 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 277e3249d4..3a80d5a62c 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 0c9e0e223e..d6a753f76b 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 4286a5463a..48410e0a7c 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 f24fb4a3d0..38ca85969a 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 50721dc67a..5dcee99bfd 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 9c60709d3c..60ff3335dd 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 ea52b12741..f584a7fceb 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 8b720d6b62..951cc7a5a6 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 9cf338b9d0..bfedaf2ccc 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 2955704e56..f1d549568a 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 d4d3d03b40..c52e624d8d 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 7b00165c52..d2e4a62546 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 418aa987e4..cd9d8585f5 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 1aba34e802..c495a72d49 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 2c9a672e8e..a3e39adfe4 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 e40fd3abf4..205771b2db 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 d4bac5c12b..14807da8eb 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 8a3e03c09e..29aff60921 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 e7ca2e2caa..b267547dd7 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