summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-03-10 17:58:32 +0100
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-03-10 18:05:01 +0100
commitabf5736bcad2d740b5854e2e4a9b3547b9b06639 (patch)
tree6ce982e8fb785f48fbefcb766890849272d9b415
parent3300eeacbbf7a3d1f961f809be5d236c48827b28 (diff)
downloadhaskell-abf5736bcad2d740b5854e2e4a9b3547b9b06639.tar.gz
Typos in comments [skip ci]
-rw-r--r--compiler/GHC/Core.hs6
-rw-r--r--compiler/GHC/Core/Lint.hs4
-rw-r--r--compiler/GHC/Core/Utils.hs2
-rw-r--r--compiler/GHC/Hs/Decls.hs4
-rw-r--r--compiler/GHC/Hs/Expr.hs2
-rw-r--r--compiler/GHC/Iface/Syntax.hs4
-rw-r--r--compiler/GHC/Iface/Type.hs4
-rw-r--r--compiler/prelude/PrelRules.hs2
-rw-r--r--compiler/simplCore/CSE.hs2
-rw-r--r--compiler/simplCore/CoreMonad.hs2
-rw-r--r--compiler/simplCore/Exitify.hs2
-rw-r--r--compiler/simplCore/SimplUtils.hs4
-rw-r--r--compiler/simplCore/Simplify.hs12
-rw-r--r--compiler/typecheck/TcBinds.hs2
-rw-r--r--compiler/typecheck/TcHsSyn.hs2
-rw-r--r--compiler/typecheck/TcInstDcls.hs4
-rw-r--r--compiler/typecheck/TcSimplify.hs2
-rw-r--r--compiler/typecheck/TcTyClsDecls.hs4
-rw-r--r--compiler/types/Coercion.hs2
-rw-r--r--compiler/types/FamInstEnv.hs2
-rw-r--r--compiler/types/Unify.hs2
-rw-r--r--compiler/utils/MonadUtils.hs2
-rw-r--r--testsuite/tests/simplCore/should_compile/Makefile2
23 files changed, 37 insertions, 37 deletions
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs
index 59556fccc2..7a3996364c 100644
--- a/compiler/GHC/Core.hs
+++ b/compiler/GHC/Core.hs
@@ -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`.
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index 091e4d8571..1ebffd7b60 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -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 }
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index 67ff7823e4..07faeee243 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -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.
diff --git a/compiler/GHC/Hs/Decls.hs b/compiler/GHC/Hs/Decls.hs
index 490113f2eb..b09e0d9eea 100644
--- a/compiler/GHC/Hs/Decls.hs
+++ b/compiler/GHC/Hs/Decls.hs
@@ -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:
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index 1f51dccf3d..0c14332d49 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -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.
diff --git a/compiler/GHC/Iface/Syntax.hs b/compiler/GHC/Iface/Syntax.hs
index 719c8bbb48..5c6aeab0e9 100644
--- a/compiler/GHC/Iface/Syntax.hs
+++ b/compiler/GHC/Iface/Syntax.hs
@@ -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)
diff --git a/compiler/GHC/Iface/Type.hs b/compiler/GHC/Iface/Type.hs
index 4f8c6571f7..0ff9235d12 100644
--- a/compiler/GHC/Iface/Type.hs
+++ b/compiler/GHC/Iface/Type.hs
@@ -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).
diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs
index a83dd54a94..643bcae06d 100644
--- a/compiler/prelude/PrelRules.hs
+++ b/compiler/prelude/PrelRules.hs
@@ -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
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index 8fe56f0965..637312c3ca 100644
--- a/compiler/simplCore/CSE.hs
+++ b/compiler/simplCore/CSE.hs
@@ -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)
diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs
index 7da11f9062..2dcafcdbcb 100644
--- a/compiler/simplCore/CoreMonad.hs
+++ b/compiler/simplCore/CoreMonad.hs
@@ -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:
diff --git a/compiler/simplCore/Exitify.hs b/compiler/simplCore/Exitify.hs
index cbb7469e4f..cf8a2af16f 100644
--- a/compiler/simplCore/Exitify.hs
+++ b/compiler/simplCore/Exitify.hs
@@ -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:
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index 6f46ded027..cc3214e59b 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -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## -> ...
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index ad8557b0a4..6ea8268f10 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -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.
diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs
index cc2ee8ec84..594fe3030b 100644
--- a/compiler/typecheck/TcBinds.hs
+++ b/compiler/typecheck/TcBinds.hs
@@ -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
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs
index 1ccd8aced2..d9626c2854 100644
--- a/compiler/typecheck/TcHsSyn.hs
+++ b/compiler/typecheck/TcHsSyn.hs
@@ -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.
-}
diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs
index 68ed568e05..68fa70256b 100644
--- a/compiler/typecheck/TcInstDcls.hs
+++ b/compiler/typecheck/TcInstDcls.hs
@@ -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
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index ede2b26938..476512bdd0 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -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.
diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index 2c4c09722c..09d6bb70fc 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -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.
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index 858b7d8f61..0a2c686f8a 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -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]
diff --git a/compiler/types/FamInstEnv.hs b/compiler/types/FamInstEnv.hs
index de3e867944..6ebd86900e 100644
--- a/compiler/types/FamInstEnv.hs
+++ b/compiler/types/FamInstEnv.hs
@@ -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).
diff --git a/compiler/types/Unify.hs b/compiler/types/Unify.hs
index 0e41ca66ac..4886f9cdc2 100644
--- a/compiler/types/Unify.hs
+++ b/compiler/types/Unify.hs
@@ -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
diff --git a/compiler/utils/MonadUtils.hs b/compiler/utils/MonadUtils.hs
index 72669b9362..af8ab4a897 100644
--- a/compiler/utils/MonadUtils.hs
+++ b/compiler/utils/MonadUtils.hs
@@ -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
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index 1daf834381..b40c02175b 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -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