Commit abf5736b authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski

Typos in comments [skip ci]

parent 3300eeac
Pipeline #16583 skipped
......@@ -783,8 +783,8 @@ is crucial for understanding how case-of-case interacts with join points:
"" -> True
_ -> False
The simplifier will pull the case into the join point (see Note [Case-of-case
and join points] in Simplify):
The simplifier will pull the case into the join point (see Note [Join points
and case-of-case] in Simplify):
join
j :: Int -> Bool -> Bool -- changed!
......@@ -879,7 +879,7 @@ transformation universally. This transformation would do:
===>
join go @a n f x = case n of 0 -> case x of True -> e1; False -> e2
n -> go @a (n-1) f (f x)
n -> go @a (n-1) f (f x)
in go @Bool n neg True
but that is ill-typed, as `x` is type `a`, not `Bool`.
......
......@@ -840,7 +840,7 @@ lintVarOcc var nargs
(text "Non term variable" <+> ppr var)
-- See GHC.Core Note [Variable occurrences in Core]
-- Cneck that the type of the occurrence is the same
-- Check that the type of the occurrence is the same
-- as the type of the binding site
; ty <- applySubstTy (idType var)
; var' <- lookupIdInScope var
......@@ -1509,7 +1509,7 @@ lintArrow :: SDoc -> LintedKind -> LintedKind -> LintM LintedKind
-- If you edit this function, you may need to update the GHC formalism
-- See Note [GHC Formalism]
lintArrow what k1 k2 -- Eg lintArrow "type or kind `blah'" k1 k2
-- or lintarrow "coercion `blah'" k1 k2
-- or lintArrow "coercion `blah'" k1 k2
= do { unless (classifiesTypeWithValues k1) (addErrL (msg (text "argument") k1))
; unless (classifiesTypeWithValues k2) (addErrL (msg (text "result") k2))
; return liftedTypeKind }
......
......@@ -2322,7 +2322,7 @@ There are some particularly delicate points here:
says f=bottom, and replaces the (f `seq` True) with just
(f `cast` unsafe-co). BUT, as thing stand, 'f' got arity 1, and it
*keeps* arity 1 (perhaps also wrongly). So CorePrep eta-expands
the definition again, so that it does not termninate after all.
the definition again, so that it does not terminate after all.
Result: seg-fault because the boolean case actually gets a function value.
See #1947.
......
......@@ -898,9 +898,9 @@ NOTE THAT
* The CUSK completely fixes the kind of the type constructor, forever.
* The precise rules, for each declaration form, for whethher a declaration
* The precise rules, for each declaration form, for whether a declaration
has a CUSK are given in the user manual section "Complete user-supplied
kind signatures and polymorphic recursion". BUt they simply implement
kind signatures and polymorphic recursion". But they simply implement
PRINCIPLE above.
* Open type families are interesting:
......
......@@ -200,7 +200,7 @@ type CmdSyntaxTable p = [(Name, HsExpr p)]
-- See Note [CmdSyntaxTable]
{-
Note [CmdSyntaxtable]
Note [CmdSyntaxTable]
~~~~~~~~~~~~~~~~~~~~~
Used only for arrow-syntax stuff (HsCmdTop), the CmdSyntaxTable keeps
track of the methods needed for a Cmd.
......
......@@ -777,7 +777,7 @@ pprIfaceDecl ss (IfaceData { ifName = tycon, ifCType = ctype,
then isIfaceTauType kind
-- Even in the presence of a standalone kind signature, a non-tau
-- result kind annotation cannot be discarded as it determines the arity.
-- See Note [Arity inference in kcDeclHeader_sig] in TcHsType
-- See Note [Arity inference in kcCheckDeclHeader_sig] in TcHsType
else isIfaceLiftedTypeKind kind)
(dcolon <+> ppr kind)
......@@ -1280,7 +1280,7 @@ noParens pp = pp
pprParendIfaceExpr :: IfaceExpr -> SDoc
pprParendIfaceExpr = pprIfaceExpr parens
-- | Pretty Print an IfaceExpre
-- | Pretty Print an IfaceExpr
--
-- The first argument should be a function that adds parens in context that need
-- an atomic value (e.g. function args)
......
......@@ -922,10 +922,10 @@ we do want to turn that (free) r into LiftedRep, so it prints as
(forall a. blah)
Conclusion: keep track of whether we we are in the kind of a
binder; ohly if so, convert free RuntimeRep variables to LiftedRep.
binder; only if so, convert free RuntimeRep variables to LiftedRep.
-}
-- | Default 'RuntimeRep' variables to 'LiftedPtr'. e.g.
-- | Default 'RuntimeRep' variables to 'LiftedRep'. e.g.
--
-- @
-- ($) :: forall (r :: GHC.Types.RuntimeRep) a (b :: TYPE r).
......
......@@ -1058,7 +1058,7 @@ and emits a warning.
tagToEnumRule :: RuleM CoreExpr
-- If data T a = A | B | C
-- then tag2Enum# (T ty) 2# --> B ty
-- then tagToEnum# (T ty) 2# --> B ty
tagToEnumRule = do
[Type ty, Lit (LitNumber LitNumInt i _)] <- getArgs
case splitTyConApp_maybe ty of
......
......@@ -280,7 +280,7 @@ less to gain by trying to CSE them. (#13219)
Note [Look inside join-point binders]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Another way how CSE for joint points is tricky is
Another way how CSE for join points is tricky is
let join foo x = (x, 42)
join bar x = (x, 42)
......
......@@ -351,7 +351,7 @@ refrain from bumping the overall tick-count for such innocuous
transformations, and perhaps terminate the simplifier one pass
earlier.
BUt alas I found that virtually nothing was innocuous! This Note
But alas I found that virtually nothing was innocuous! This Note
just records what I learned, in case anyone wants to try again.
These transformations are not innocuous:
......
......@@ -146,7 +146,7 @@ exitifyRec in_scope pairs
, disjointVarSet fvs recursive_calls
= go_exit captured (deAnnotate ann_e) fvs
-- We could not turn it into a exit joint point. So now recurse
-- We could not turn it into a exit join point. So now recurse
-- into all expression where eligible exit join points might sit,
-- i.e. into all tail-call positions:
......
......@@ -1993,8 +1993,8 @@ Example with the "Merge Nested Cases" optimization (from #12877):
main = case t of t0
0## -> ...
DEFAULT -> case t0 `minusWord#` 1## of t1
0## -> ...
DEFAUT -> case t1 `minusWord#` 1## of t2
0## -> ...
DEFAULT -> case t1 `minusWord#` 1## of t2
0## -> ...
DEFAULT -> case t2 `minusWord#` 1## of _
0## -> ...
......
......@@ -585,7 +585,7 @@ makeTrivialWithInfo mode top_lvl occ_fs info expr
var = mkLocalIdWithInfo name expr_ty info
-- Now something very like completeBind,
-- but without the postInlineUnconditinoally part
-- but without the postInlineUnconditionally part
; (arity, is_bot, expr2) <- tryEtaExpandRhs mode var expr1
; unf <- mkLetUnfolding (sm_dflags mode) top_lvl InlineRhs var expr2
......@@ -1025,7 +1025,7 @@ work. T5631 is a good example of this.
-- Context goes *inside* the lambdas. IOW, if the join point has arity n, we do:
-- \x1 .. xn -> e => \x1 .. xn -> E[e]
-- Note that we need the arity of the join point, since e may be a lambda
-- (though this is unlikely). See Note [Case-of-case and join points].
-- (though this is unlikely). See Note [Join points and case-of-case].
simplJoinRhs :: SimplEnv -> InId -> InExpr -> SimplCont
-> SimplM OutExpr
simplJoinRhs env bndr expr cont
......@@ -1572,7 +1572,7 @@ Simplifying rules and stable-unfoldings happens a bit after
simplifying the right-hand side, so we remember whether or not it
is a join point, and what 'cont' is, in a value of type MaybeJoinCont
#13900 wsa caused by forgetting to push 'cont' into the RHS
#13900 was caused by forgetting to push 'cont' into the RHS
of a SpecConstr-generated RULE for a join point.
-}
......@@ -1693,7 +1693,7 @@ We need to be very careful here to remain consistent---neither part is
optional!
We need do make the continuation E duplicable (since we are duplicating it)
with mkDuableCont.
with mkDupableCont.
Note [Join points with -fno-case-of-case]
......@@ -2424,7 +2424,7 @@ Note [FloatBinds from constructor wrappers]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we have FloatBinds coming from the constructor wrapper
(as in Note [exprIsConApp_maybe on data constructors with wrappers]),
ew cannot float past them. We'd need to float the FloatBind
we cannot float past them. We'd need to float the FloatBind
together with the simplify floats, unfortunately the
simplifier doesn't have case-floats. The simplest thing we can
do is to wrap all the floats here. The next iteration of the
......@@ -2757,7 +2757,7 @@ We really must record that b is already evaluated so that we don't
go and re-evaluate it when constructing the result.
See Note [Data-con worker strictness] in MkId.hs
NB: simplLamBinders preserves this eval info
NB: simplLamBndrs preserves this eval info
In addition to handling data constructor fields with !s, addEvals
also records the fact that the result of seq# is always in WHNF.
......
......@@ -679,7 +679,7 @@ tcPolyCheck :: TcPragEnv
-> LHsBind GhcRn -- Must be a FunBind
-> TcM (LHsBinds GhcTcId, [TcId])
-- There is just one binding,
-- it is a Funbind
-- it is a FunBind
-- it has a complete type signature,
tcPolyCheck prag_fn
(CompleteSig { sig_bndr = poly_id
......
......@@ -273,7 +273,7 @@ There are three possibilities:
See Note [Zonking the LHS of a RULE]
* RuntimeUnkFlexi: is a special case for the GHCi debugger.
It's a way to have a variable that is not a mutuable
It's a way to have a variable that is not a mutable
unification variable, but doesn't have a binding site
either.
-}
......
......@@ -933,8 +933,8 @@ There are several fiddly subtleties lurking here
eta-reduced type variables last.
* Although we eta-reduce the axiom, we eta-/expand/ the representation
tycon Drep. The kind of D says it takses four arguments, but the
data instance header only supplies three. But the AlgTyCOn for Drep
tycon Drep. The kind of D says it takes four arguments, but the
data instance header only supplies three. But the AlgTyCon for Drep
itself must have enough TyConBinders so that its result kind is Type.
So, with etaExpandAlgTyCon we make up some extra TyConBinders
......
......@@ -1708,7 +1708,7 @@ solveImplication imp@(Implic { ic_tclvl = tclvl
where
-- TcLevels must be strictly increasing (see (ImplicInv) in
-- Note [TcLevel and untouchable type variables] in TcType),
-- and in fact I thinkthey should always increase one level at a time.
-- and in fact I think they should always increase one level at a time.
-- Though sensible, this check causes lots of testsuite failures. It is
-- remaining commented out for now.
......
......@@ -1068,7 +1068,7 @@ We do kind inference as follows:
- Have complete fresh Names; see TcMType
Note [Unification variables need fresh Names]
Assign initial monomorophic kinds to S, T
Assign initial monomorphic kinds to S, T
T :: kk1 -> * -> kk2 -> *
S :: kk3 -> * -> kk4 -> *
......@@ -1098,7 +1098,7 @@ We do kind inference as follows:
* Step 4. Extend the type environment with a TcTyCon for S and T, now
with their utterly-final polymorphic kinds (needed for recursive
occurrences of S, T). Now typecheck the declarations, and build the
final AlgTyCOn for S and T resp.
final AlgTyCon for S and T resp.
The first three steps are in kcTyClGroup; the fourth is in
tcTyClDecls.
......
......@@ -2403,7 +2403,7 @@ mkPrimEqPredRole Nominal = mkPrimEqPred
mkPrimEqPredRole Representational = mkReprPrimEqPred
mkPrimEqPredRole Phantom = panic "mkPrimEqPredRole phantom"
-- | Creates a primite type equality predicate with explicit kinds
-- | Creates a primitive type equality predicate with explicit kinds
mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
mkHeteroPrimEqPred k1 k2 ty1 ty2 = mkTyConApp eqPrimTyCon [k1, k2, ty1, ty2]
......
......@@ -1651,7 +1651,7 @@ There are wrinkles, of course:
larger in-scope set than strictly necessary is always OK, as in-scope sets
are only ever used to avoid collisions.
Sadly, the freshening substitution described in (1) really musn't bind
Sadly, the freshening substitution described in (1) really mustn't bind
variables outside of their scope: note that its domain is the *unrenamed*
variables. This means that the substitution gets "pushed down" (like a
reader monad) while the in-scope set gets threaded (like a state monad).
......
......@@ -768,7 +768,7 @@ P2. match (F1 a Bool) (F1 Double String)
In case P1, we must find (a ↦ Int) to satisfy M2.
In case P2, we must /not/ find (a ↦ Double), in order to satisfy I2. (Note
that the correct mapping for I2 is (a ↦ Int). There is no way to discover
this, but we musn't map a to anything else!)
this, but we mustn't map a to anything else!)
We thus must parameterize the algorithm over whether it's being used
for an injectivity check (refrain from looking at non-injective arguments
......
......@@ -88,7 +88,7 @@ zipWith4M f xs ys ws zs = sequenceA (zipWith4 f xs ys ws zs)
zipWithAndUnzipM :: Monad m
=> (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d])
{-# INLINABLE zipWithAndUnzipM #-}
-- See Note [flatten_many performance] in TcFlatten for why this
-- See Note [flatten_args performance] in TcFlatten for why this
-- pragma is essential.
zipWithAndUnzipM f (x:xs) (y:ys)
= do { (c, d) <- f x y
......
......@@ -261,7 +261,7 @@ T14140:
T15631:
$(RM) -f T15631.o T15631.hi
'$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-uniques -dsuppress-ticks T15631.hs | grep 'case'
# Expecting one fewwer case expressions after fixing #15631
# Expecting one fewer case expressions after fixing #15631
T17140:
$(RM) -f T17140*.hi T17140*.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment