summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-12-21 21:03:29 +0100
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-12-25 18:26:44 +0100
commite6191d39680351bc69dfb379386c4c5273971030 (patch)
tree9652e70935ff5460d9d0a1d3d6fb173ef5a844ee
parent80daefce4ec1169ac3ef0552b8600c71527d84c2 (diff)
downloadhaskell-e6191d39680351bc69dfb379386c4c5273971030.tar.gz
Fix typos
-rw-r--r--compiler/GHC/Builtin/PrimOps.hs2
-rw-r--r--compiler/GHC/Cmm/Sink.hs2
-rw-r--r--compiler/GHC/CmmToAsm/AArch64/CodeGen.hs2
-rw-r--r--compiler/GHC/CmmToAsm/CFG.hs2
-rw-r--r--compiler/GHC/Core/Lint.hs2
-rw-r--r--compiler/GHC/Core/Multiplicity.hs4
-rw-r--r--compiler/GHC/Core/Opt/Arity.hs2
-rw-r--r--compiler/GHC/Core/Opt/ConstantFold.hs4
-rw-r--r--compiler/GHC/Core/Opt/SetLevels.hs6
-rw-r--r--compiler/GHC/Core/Opt/Simplify.hs2
-rw-r--r--compiler/GHC/Core/Opt/SpecConstr.hs2
-rw-r--r--compiler/GHC/Core/Opt/Specialise.hs2
-rw-r--r--compiler/GHC/Core/TyCon.hs2
-rw-r--r--compiler/GHC/Core/Utils.hs2
-rw-r--r--compiler/GHC/CoreToIface.hs4
-rw-r--r--compiler/GHC/CoreToStg/Prep.hs4
-rw-r--r--compiler/GHC/HsToCore/Binds.hs2
-rw-r--r--compiler/GHC/HsToCore/Expr.hs2
-rw-r--r--compiler/GHC/HsToCore/Match.hs4
-rw-r--r--compiler/GHC/Iface/Type.hs6
-rw-r--r--compiler/GHC/Parser.y2
-rw-r--r--compiler/GHC/Rename/Expr.hs14
-rw-r--r--compiler/GHC/Tc/Gen/App.hs4
-rw-r--r--compiler/GHC/Tc/Gen/Splice.hs2
-rw-r--r--compiler/GHC/Tc/Solver.hs8
-rw-r--r--compiler/GHC/Tc/Types.hs4
-rw-r--r--compiler/GHC/Tc/Types/Constraint.hs2
-rw-r--r--compiler/GHC/Tc/Types/Evidence.hs2
-rw-r--r--compiler/GHC/Tc/Validity.hs2
-rw-r--r--compiler/GHC/Types/Id/Make.hs10
-rw-r--r--compiler/GHC/Types/Var.hs2
-rw-r--r--compiler/Language/Haskell/Syntax/Expr.hs2
-rw-r--r--docs/users_guide/debugging.rst2
-rw-r--r--docs/users_guide/exts/gadt.rst2
-rw-r--r--docs/users_guide/exts/safe_haskell.rst2
-rw-r--r--docs/users_guide/ghci.rst2
-rw-r--r--docs/users_guide/hints.rst2
-rw-r--r--docs/users_guide/using-optimisation.rst2
-rw-r--r--libraries/base/GHC/Base.hs2
-rw-r--r--libraries/base/GHC/Float.hs4
-rw-r--r--libraries/base/GHC/TypeNats.hs2
-rw-r--r--libraries/base/Unsafe/Coerce.hs4
-rw-r--r--rules/hs-suffix-way-rules.mk2
-rw-r--r--testsuite/driver/perf_notes.py2
-rw-r--r--testsuite/tests/dependent/should_compile/all.T2
-rw-r--r--testsuite/tests/typecheck/should_run/tcrun011.hs2
46 files changed, 72 insertions, 72 deletions
diff --git a/compiler/GHC/Builtin/PrimOps.hs b/compiler/GHC/Builtin/PrimOps.hs
index 164d1e2ea7..c048482a8a 100644
--- a/compiler/GHC/Builtin/PrimOps.hs
+++ b/compiler/GHC/Builtin/PrimOps.hs
@@ -467,7 +467,7 @@ Note [Implementation: how can_fail/has_side_effects affect transformations]
How do we ensure that floating/duplication/discarding are done right
in the simplifier?
-Two main predicates on primpops test these flags:
+Two main predicates on primops test these flags:
primOpOkForSideEffects <=> not has_side_effects
primOpOkForSpeculation <=> not (has_side_effects || can_fail)
diff --git a/compiler/GHC/Cmm/Sink.hs b/compiler/GHC/Cmm/Sink.hs
index 19160065ba..7d90967132 100644
--- a/compiler/GHC/Cmm/Sink.hs
+++ b/compiler/GHC/Cmm/Sink.hs
@@ -443,7 +443,7 @@ dropAssignments platform should_drop state assigs
-- -----------------------------------------------------------------------------
-- Try to inline assignments into a node.
--- This also does constant folding for primpops, since
+-- This also does constant folding for primops, since
-- inlining opens up opportunities for doing so.
tryToInline
diff --git a/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs b/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
index 142f20385e..65872c73be 100644
--- a/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
+++ b/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
@@ -1265,7 +1265,7 @@ genCondBranch _ true false expr = do
--
-- To actually get the value of <symbol>, we'd need to ldr x0, x0 still, which
-- for the first case can be optimized to use ldr x0, [x0, #:lo12:<symbol>]
--- instaed of the add instruction.
+-- instead of the add instruction.
--
-- As the memory model for AArch64 for PIC is considered to be +/- 4GB, we do
-- not need to go through the GOT, unless we want to address the full address
diff --git a/compiler/GHC/CmmToAsm/CFG.hs b/compiler/GHC/CmmToAsm/CFG.hs
index f571f962b0..58041fef2c 100644
--- a/compiler/GHC/CmmToAsm/CFG.hs
+++ b/compiler/GHC/CmmToAsm/CFG.hs
@@ -238,7 +238,7 @@ sanityCheckCfg m blockSet msg
diff = (setUnion cfgNodes blockSet) `setDifference` (setIntersection cfgNodes blockSet) :: LabelSet
-- | Filter the CFG with a custom function f.
--- Paramaeters are `f from to edgeInfo`
+-- Parameters are `f from to edgeInfo`
filterEdges :: (BlockId -> BlockId -> EdgeInfo -> Bool) -> CFG -> CFG
filterEdges f cfg =
mapMapWithKey filterSources cfg
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index 899ba20fb0..c098afd57c 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -775,7 +775,7 @@ Note [Representation polymorphism invariants] in GHC.Core. However, we do *not*
want to do this in a compulsory unfolding. Compulsory unfoldings arise
only internally, for things like newtype wrappers, dictionaries, and
(notably) unsafeCoerce#. These might legitimately be representation-polymorphic;
-indeed representation-polyorphic unfoldings are a primary reason for the
+indeed representation-polymorphic unfoldings are a primary reason for the
very existence of compulsory unfoldings (we can't compile code for
the original, representation-polymorphic, binding).
diff --git a/compiler/GHC/Core/Multiplicity.hs b/compiler/GHC/Core/Multiplicity.hs
index 42dc6c4b8b..2c3828c712 100644
--- a/compiler/GHC/Core/Multiplicity.hs
+++ b/compiler/GHC/Core/Multiplicity.hs
@@ -145,7 +145,7 @@ can contain 0, and multiplicities can't.
Why do we need a 0 usage? A function which doesn't use its argument will be
required to annotate it with `Many`:
- \(x # Many) -> 0
+ \(x % Many) -> 0
However, we cannot replace absence with Many when computing usages
compositionally: in
@@ -289,7 +289,7 @@ In future work, instead of approximating we might add type families
and allow users to write types involving operations on multiplicities.
In this case, we could enforce more invariants in Mult, for example,
enforce that it is in the form of a sum of products, and even
-that the sumands and factors are ordered somehow, to have more equalities.
+that the summands and factors are ordered somehow, to have more equalities.
-}
-- With only two multiplicities One and Many, we can always replace
diff --git a/compiler/GHC/Core/Opt/Arity.hs b/compiler/GHC/Core/Opt/Arity.hs
index c0a5f79b11..9d2e873b56 100644
--- a/compiler/GHC/Core/Opt/Arity.hs
+++ b/compiler/GHC/Core/Opt/Arity.hs
@@ -1912,7 +1912,7 @@ collectBindersPushingCo e
Note [collectBindersPushingCo]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We just look for coercions of form
- <type> # w -> blah
+ <type> % w -> blah
(and similarly for foralls) to keep this function simple. We could do
more elaborate stuff, but it'd involve substitution etc.
diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs
index cce8830a97..919520cb83 100644
--- a/compiler/GHC/Core/Opt/ConstantFold.hs
+++ b/compiler/GHC/Core/Opt/ConstantFold.hs
@@ -1410,7 +1410,7 @@ this case
Here x contains an invalid shift and consequently we would like to rewrite it
as follows:
- let x = I# (error "invalid shift)
+ let x = I# (error "invalid shift")
in ...
This was originally done in the fix to #16449 but this breaks the let/app
@@ -3305,7 +3305,7 @@ Instead, we deal with turning one branch into DEFAULT in GHC.Core.Opt.Simplify.U
Note [caseRules for dataToTag]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-See also Note [dataToTag#] in primpops.txt.pp
+See also Note [dataToTag#] in primops.txt.pp
We want to transform
case dataToTag x of
diff --git a/compiler/GHC/Core/Opt/SetLevels.hs b/compiler/GHC/Core/Opt/SetLevels.hs
index 084e8430e6..c5ad4e4b1c 100644
--- a/compiler/GHC/Core/Opt/SetLevels.hs
+++ b/compiler/GHC/Core/Opt/SetLevels.hs
@@ -55,9 +55,9 @@
This can only work if @wild@ is an unrestricted binder. Indeed, even with the
extended typing rule (in the linter) for case expressions, if
- case x of wild # 1 { p -> e}
+ case x of wild % 1 { p -> e}
is well-typed, then
- case x of wild # 1 { p -> e[wild\x] }
+ case x of wild % 1 { p -> e[wild\x] }
is only well-typed if @e[wild\x] = e@ (that is, if @wild@ is not used in @e@
at all). In which case, it is, of course, pointless to do the substitution
anyway. So for a linear binder (and really anything which isn't unrestricted),
@@ -1594,7 +1594,7 @@ initialEnv float_lams binds
, le_env = emptyVarEnv }
where
in_scope_toplvl = emptyInScopeSet `extendInScopeSetList` bindersOfBinds binds
- -- The Simplifier (see Note [Glomming] in GHC.Core.Opt.Occuranal) and
+ -- The Simplifier (see Note [Glomming] in GHC.Core.Opt.OccurAnal) and
-- the specialiser (see Note [Top level scope] in GHC.Core.Opt.Specialise)
-- may both produce top-level bindings where an early binding refers
-- to a later one. So here we put all the top-level binders in scope before
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs
index 1398bfd6e7..0e945043b6 100644
--- a/compiler/GHC/Core/Opt/Simplify.hs
+++ b/compiler/GHC/Core/Opt/Simplify.hs
@@ -45,7 +45,7 @@ import GHC.Core.FVs ( mkRuleInfo )
import GHC.Core.Rules ( lookupRule, getRules, initRuleOpts )
import GHC.Core.Multiplicity
-import GHC.Types.Literal ( litIsLifted ) --, mkLitInt ) -- temporalily commented out. See #8326
+import GHC.Types.Literal ( litIsLifted ) --, mkLitInt ) -- temporarily commented out. See #8326
import GHC.Types.SourceText
import GHC.Types.Id
import GHC.Types.Id.Make ( seqId )
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs
index 6f82257148..03cce88623 100644
--- a/compiler/GHC/Core/Opt/SpecConstr.hs
+++ b/compiler/GHC/Core/Opt/SpecConstr.hs
@@ -2003,7 +2003,7 @@ Consider (#14270) a call like
in ... f (K @(a |> co)) ...
where 'co' is a coercion variable not in scope at f's definition site.
-If we aren't caereful we'll get
+If we aren't careful we'll get
let $sf a co = e (K @(a |> co))
RULE "SC:f" forall a co. f (K @(a |> co)) = $sf a co
diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs
index 7071932e2a..f158041fc8 100644
--- a/compiler/GHC/Core/Opt/Specialise.hs
+++ b/compiler/GHC/Core/Opt/Specialise.hs
@@ -1000,7 +1000,7 @@ of an imported function 'g', which we want to specialise in turn,
and similarly specialising 'g' might expose a new call to 'h'.
We track the stack of enclosing functions. So when specialising 'h' we
-haev a specImport call stack of [g,f]. We do this for two reasons:
+have a specImport call stack of [g,f]. We do this for two reasons:
* Note [Warning about missed specialisations]
* Note [Avoiding recursive specialisation]
diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs
index a83e391257..18a01226d7 100644
--- a/compiler/GHC/Core/TyCon.hs
+++ b/compiler/GHC/Core/TyCon.hs
@@ -1173,7 +1173,7 @@ data AlgTyConRhs
-- Watch out! If any newtypes become transparent
-- again check #1072.
nt_fixed_rep :: Bool
- -- ^ 'True' if the newtype has a know, fixed representation
+ -- ^ 'True' if the newtype has a known, fixed representation
-- when fully applied to its arguments, 'False' otherwise.
-- This can only ever be 'False' with UnliftedNewtypes.
--
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index b7becd8036..2df35f01ea 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -157,7 +157,7 @@ coreAltType alt@(Alt _ bs rhs)
coreAltsType :: [CoreAlt] -> Type
-- ^ Returns the type of the first alternative, which should be the same as for all alternatives
coreAltsType (alt:_) = coreAltType alt
-coreAltsType [] = panic "corAltsType"
+coreAltsType [] = panic "coreAltsType"
mkLamType :: Var -> Type -> Type
-- ^ Makes a @(->)@ type or an implicit forall type, depending
diff --git a/compiler/GHC/CoreToIface.hs b/compiler/GHC/CoreToIface.hs
index 2a4e6c9f33..4ce87ae50b 100644
--- a/compiler/GHC/CoreToIface.hs
+++ b/compiler/GHC/CoreToIface.hs
@@ -169,7 +169,7 @@ toIfaceTypeX :: VarSet -> Type -> IfaceType
-- translates the tyvars in 'free' as IfaceFreeTyVars
--
-- Synonyms are retained in the interface type
-toIfaceTypeX fr (TyVarTy tv) -- See Note [TcTyVars in IfaceType] in GHC.Iface.Type
+toIfaceTypeX fr (TyVarTy tv) -- See Note [Free tyvars in IfaceType] in GHC.Iface.Type
| tv `elemVarSet` fr = IfaceFreeTyVar tv
| otherwise = IfaceTyVar (toIfaceTyVar tv)
toIfaceTypeX fr ty@(AppTy {}) =
@@ -282,7 +282,7 @@ toIfaceCoercionX fr co
go (Refl ty) = IfaceReflCo (toIfaceTypeX fr ty)
go (GRefl r ty mco) = IfaceGReflCo r (toIfaceTypeX fr ty) (go_mco mco)
go (CoVarCo cv)
- -- See [TcTyVars in IfaceType] in GHC.Iface.Type
+ -- See Note [Free tyvars in IfaceType] in GHC.Iface.Type
| cv `elemVarSet` fr = IfaceFreeCoVar cv
| otherwise = IfaceCoVarCo (toIfaceCoVar cv)
go (HoleCo h) = IfaceHoleCo (coHoleCoVar h)
diff --git a/compiler/GHC/CoreToStg/Prep.hs b/compiler/GHC/CoreToStg/Prep.hs
index 918530695f..e3932e835e 100644
--- a/compiler/GHC/CoreToStg/Prep.hs
+++ b/compiler/GHC/CoreToStg/Prep.hs
@@ -1218,7 +1218,7 @@ Consider the Core program (from #11291),
The late inlining logic in cpe_app would transform this into:
- (case bot of {}) realWorldPrimId#
+ (case bot of {}) realWorld#
Which would rise to a panic in CoreToStg.myCollectArgs, which expects only
variables in function position.
@@ -1451,7 +1451,7 @@ maybeSaturate fn expr n_args
Note [Eta expansion]
~~~~~~~~~~~~~~~~~~~~~
-Eta expand to match the arity claimed by the binder Remember,
+Eta expand to match the arity claimed by the binder. Remember,
CorePrep must not change arity
Eta expansion might not have happened already, because it is done by
diff --git a/compiler/GHC/HsToCore/Binds.hs b/compiler/GHC/HsToCore/Binds.hs
index 596e4333b1..96b7a82f91 100644
--- a/compiler/GHC/HsToCore/Binds.hs
+++ b/compiler/GHC/HsToCore/Binds.hs
@@ -1271,7 +1271,7 @@ ds_ev_typeable ty (EvTypeableTrFun evm ev1 ev2)
; em <- getRep evm m
; mkTrFun <- dsLookupGlobalId mkTrFunName
-- mkTrFun :: forall (m :: Multiplicity) r1 r2 (a :: TYPE r1) (b :: TYPE r2).
- -- TypeRep m -> TypeRep a -> TypeRep b -> TypeRep (a # m -> b)
+ -- TypeRep m -> TypeRep a -> TypeRep b -> TypeRep (a % m -> b)
; let r1 = getRuntimeRep t1
r2 = getRuntimeRep t2
; return $ mkApps (mkTyApps (Var mkTrFun) [m, r1, r2, t1, t2])
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs
index f818be46a1..c2501de165 100644
--- a/compiler/GHC/HsToCore/Expr.hs
+++ b/compiler/GHC/HsToCore/Expr.hs
@@ -1227,7 +1227,7 @@ Some further observations about `withDict`:
otherwise.
* For examples of how `withDict` is used in the `base` library, see `withSNat`
- in GHC.TypeNats, as well as `withSChar` and `withSSymbol` n GHC.TypeLits.
+ in GHC.TypeNats, as well as `withSChar` and `withSSymbol` in GHC.TypeLits.
* The `r` is representation-polymorphic,
to support things like `withTypeable` in `Data.Typeable.Internal`.
diff --git a/compiler/GHC/HsToCore/Match.hs b/compiler/GHC/HsToCore/Match.hs
index a4cdb78f6d..28391fa815 100644
--- a/compiler/GHC/HsToCore/Match.hs
+++ b/compiler/GHC/HsToCore/Match.hs
@@ -1010,11 +1010,11 @@ sameGroup (PgN l1) (PgN l2) = l1==l2 -- Order is significant
-- Order is significant, match PgN after PgLit
-- If the exponents are small check for value equality rather than syntactic equality
-- This is implemented in the Eq instance for FractionalLit, we do this to avoid
- -- computing the value of excessivly large rationals.
+ -- computing the value of excessively large rationals.
sameGroup (PgOverS s1) (PgOverS s2) = s1==s2
sameGroup (PgNpK l1) (PgNpK l2) = l1==l2 -- See Note [Grouping overloaded literal patterns]
sameGroup (PgCo t1) (PgCo t2) = t1 `eqType` t2
- -- CoPats are in the same goup only if the type of the
+ -- CoPats are in the same group only if the type of the
-- enclosed pattern is the same. The patterns outside the CoPat
-- always have the same type, so this boils down to saying that
-- the two coercions are identical.
diff --git a/compiler/GHC/Iface/Type.hs b/compiler/GHC/Iface/Type.hs
index 2427bba019..c984303ac4 100644
--- a/compiler/GHC/Iface/Type.hs
+++ b/compiler/GHC/Iface/Type.hs
@@ -926,7 +926,7 @@ ppr_ty ctxt_prec ty@(IfaceForAllTy {}) = ppr_sigma ctxt_prec ty
ppr_ty ctxt_prec ty@(IfaceFunTy InvisArg _ _ _) = ppr_sigma ctxt_prec ty
ppr_ty _ (IfaceFreeTyVar tyvar) = ppr tyvar -- This is the main reason for IfaceFreeTyVar!
-ppr_ty _ (IfaceTyVar tyvar) = ppr tyvar -- See Note [TcTyVars in IfaceType]
+ppr_ty _ (IfaceTyVar tyvar) = ppr tyvar -- See Note [Free tyvars in IfaceType]
ppr_ty ctxt_prec (IfaceTyConApp tc tys) = pprTyTcApp ctxt_prec tc tys
ppr_ty ctxt_prec (IfaceTupleTy i p tys) = pprTuple ctxt_prec i p tys
ppr_ty _ (IfaceLitTy n) = pprIfaceTyLit n
@@ -1034,7 +1034,7 @@ as they appear during kind-checking of "newtype T :: TYPE r where..."
-- @
-- ($) :: forall (r :: GHC.Types.RuntimeRep) a (b :: TYPE r).
-- (a -> b) -> a -> b
--- Just :: forall (k :: Multiplicity) a. a # k -> Maybe a
+-- Just :: forall (k :: Multiplicity) a. a % k -> Maybe a
-- @
--
-- turns in to,
@@ -1722,7 +1722,7 @@ ppr_co ctxt_prec co@(IfaceForAllCo {})
= let (tvs, co'') = split_co co' in ((name,kind_co):tvs,co'')
split_co co' = ([], co')
--- Why these three? See Note [TcTyVars in IfaceType]
+-- Why these three? See Note [Free tyvars in IfaceType]
ppr_co _ (IfaceFreeCoVar covar) = ppr covar
ppr_co _ (IfaceCoVarCo covar) = ppr covar
ppr_co _ (IfaceHoleCo covar) = braces (ppr covar)
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y
index b7c2655f36..c93ce8ff4c 100644
--- a/compiler/GHC/Parser.y
+++ b/compiler/GHC/Parser.y
@@ -2881,7 +2881,7 @@ aexp2 :: { ECP }
| overloaded_label {% acsExpr (\cs -> sL1a $1 (HsOverLabel (comment (glRR $1) cs) $! unLoc $1)) }
| literal { ECP $ pvA (mkHsLitPV $! $1) }
-- This will enable overloaded strings permanently. Normally the renamer turns HsString
--- into HsOverLit when -foverloaded-strings is on.
+-- into HsOverLit when -XOverloadedStrings is on.
-- | STRING { sL (getLoc $1) (HsOverLit $! mkHsIsString (getSTRINGs $1)
-- (getSTRING $1) noExtField) }
| INTEGER { ECP $ mkHsOverLitPV (sL1a $1 $ mkHsIntegral (getINTEGER $1)) }
diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs
index c4f12cf243..837d2b55e8 100644
--- a/compiler/GHC/Rename/Expr.hs
+++ b/compiler/GHC/Rename/Expr.hs
@@ -607,11 +607,11 @@ to generate `(\x -> op x e)`. See Historical
Note [Desugaring operator sections]
Here are their definitions:
- leftSection :: forall r1 r2 n (a:TYPE r1) (b:TYPE r2).
+ leftSection :: forall r1 r2 n (a::TYPE r1) (b::TYPE r2).
(a %n-> b) -> a %n-> b
leftSection f x = f x
- rightSection :: forall r1 r2 r3 (a:TYPE r1) (b:TYPE r2) (c:TYPE r3).
+ rightSection :: forall r1 r2 r3 n1 n2 (a::TYPE r1) (b::TYPE r2) (c::TYPE r3).
(a %n1 -> b %n2-> c) -> b %n2-> a %n1-> c
rightSection f y x = f x y
@@ -623,13 +623,13 @@ Note the wrinkles:
Plus, infix operator applications would be trickier to make
rebindable, so it'd be inconsistent to do so for sections.
- TL;DR: we still us the renamer-expansion mechanism for operator
- sections , but only to eliminate special-purpose code paths in the
+ TL;DR: we still use the renamer-expansion mechanism for operator
+ sections, but only to eliminate special-purpose code paths in the
renamer and desugarer.
* leftSection and rightSection must be representation-polymorphic, to allow
- (+# 4#) and (4# +#) to work. See GHC.Types.Id.Make.
- Note [Wired-in Ids for rebindable syntax] in
+ (+# 4#) and (4# +#) to work. See
+ Note [Wired-in Ids for rebindable syntax] in GHC.Types.Id.Make.
* leftSection and rightSection must be multiplicity-polymorphic.
(Test linear/should_compile/OldList showed this up.)
@@ -2159,7 +2159,7 @@ allowed this to be transformed into
(\(x,y) -> \z -> C) <$> A <*> B
-then it could be lazier than the standard desuraging using >>=. See #13875
+then it could be lazier than the standard desugaring using >>=. See #13875
for more examples.
Thus, whenever we have a strict pattern match, we treat it as a
diff --git a/compiler/GHC/Tc/Gen/App.hs b/compiler/GHC/Tc/Gen/App.hs
index 22454d1acc..1ee4e95753 100644
--- a/compiler/GHC/Tc/Gen/App.hs
+++ b/compiler/GHC/Tc/Gen/App.hs
@@ -954,7 +954,7 @@ Note [VTA for out-of-scope functions]
Suppose 'wurble' is not in scope, and we have
(wurble @Int @Bool True 'x')
-Then the renamer will make (HsUnboundVar "wurble) for 'wurble',
+Then the renamer will make (HsUnboundVar "wurble") for 'wurble',
and the typechecker will typecheck it with tcUnboundId, giving it
a type 'alpha', and emitting a deferred Hole constraint, to
be reported later.
@@ -978,7 +978,7 @@ We do /not/ want to fail altogether in this case (via failM) because
that may abandon an entire instance decl, which (in the presence of
-fdefer-type-errors) leads to leading to #17792.
-Downside; the typechecked term has lost its visible type arguments; we
+Downside: the typechecked term has lost its visible type arguments; we
don't even kind-check them. But let's jump that bridge if we come to
it. Meanwhile, let's not crash!
diff --git a/compiler/GHC/Tc/Gen/Splice.hs b/compiler/GHC/Tc/Gen/Splice.hs
index bba7eeaedc..d1e8ce2abe 100644
--- a/compiler/GHC/Tc/Gen/Splice.hs
+++ b/compiler/GHC/Tc/Gen/Splice.hs
@@ -988,7 +988,7 @@ runMeta' show_code ppr_hs run_and_convert expr
-- to carry on. Mind you, the staging restrictions mean we won't
-- actually run f, but it still seems wrong. And, more concretely,
-- see #5358 for an example that fell over when trying to
- -- reify a function with a "?" kind in it. (These don't occur
+ -- reify a function with an unlifted kind in it. (These don't occur
-- in type-correct programs.)
; failIfErrsM
diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs
index e276ad16d9..aba2ad54a8 100644
--- a/compiler/GHC/Tc/Solver.hs
+++ b/compiler/GHC/Tc/Solver.hs
@@ -216,7 +216,7 @@ solveEqualities callsite thing_inside
simplifyAndEmitFlatConstraints :: WantedConstraints -> TcM ()
-- See Note [Failure in local type signatures]
simplifyAndEmitFlatConstraints wanted
- = do { -- Solve and zonk to esablish the
+ = do { -- Solve and zonk to establish the
-- preconditions for floatKindEqualities
wanted <- runTcSEqualities (solveWanteds wanted)
; wanted <- TcM.zonkWC wanted
@@ -2740,7 +2740,7 @@ findDefaultableGroups (default_tys, (ovl_strings, extended_defaults)) wanteds
| otherwise = all is_std_class clss && (any (isNumClass ovl_strings) clss)
-- is_std_class adds IsString to the standard numeric classes,
- -- when -foverloaded-strings is enabled
+ -- when -XOverloadedStrings is enabled
is_std_class cls = isStandardClass cls ||
(ovl_strings && (cls `hasKey` isStringClassKey))
@@ -2792,14 +2792,14 @@ disambigGroup (default_ty:default_tys) group@(the_tv, wanteds)
-- ill-kinded defaulting attempts like (Eq []) or (Foldable Int) here.
-- In interactive mode, or with -XExtendedDefaultRules,
--- we default Show a to Show () to avoid graututious errors on "show []"
+-- we default Show a to Show () to avoid gratuitous errors on "show []"
isInteractiveClass :: Bool -- -XOverloadedStrings?
-> Class -> Bool
isInteractiveClass ovl_strings cls
= isNumClass ovl_strings cls || (classKey cls `elem` interactiveClassKeys)
-- isNumClass adds IsString to the standard numeric classes,
- -- when -foverloaded-strings is enabled
+ -- when -XOverloadedStrings is enabled
isNumClass :: Bool -- -XOverloadedStrings?
-> Class -> Bool
isNumClass ovl_strings cls
diff --git a/compiler/GHC/Tc/Types.hs b/compiler/GHC/Tc/Types.hs
index 772f40d1bb..393b9678d2 100644
--- a/compiler/GHC/Tc/Types.hs
+++ b/compiler/GHC/Tc/Types.hs
@@ -804,7 +804,7 @@ data TcLclEnv -- Changes as we move inside an expression
-- The ThBindEnv records the TH binding level of in-scope Names
-- defined in this module (not imported)
-- We can't put this info in the TypeEnv because it's needed
- -- (and extended) in the renamer, for untyed splices
+ -- (and extended) in the renamer, for untyped splices
tcl_arrow_ctxt :: ArrowCtxt, -- Arrow-notation context
@@ -1174,7 +1174,7 @@ data IdBindingInfo -- See Note [Meaning of IdBindingInfo and ClosedTypeId]
-- | IsGroupClosed describes a group of mutually-recursive bindings
data IsGroupClosed
= IsGroupClosed
- (NameEnv RhsNames) -- Free var info for the RHS of each binding in the goup
+ (NameEnv RhsNames) -- Free var info for the RHS of each binding in the group
-- Used only for (static e) checks
ClosedTypeId -- True <=> all the free vars of the group are
diff --git a/compiler/GHC/Tc/Types/Constraint.hs b/compiler/GHC/Tc/Types/Constraint.hs
index ed07cad136..103f0744b6 100644
--- a/compiler/GHC/Tc/Types/Constraint.hs
+++ b/compiler/GHC/Tc/Types/Constraint.hs
@@ -1329,7 +1329,7 @@ data Implication
-- hence for all the given evidence variables.
ic_wanted :: WantedConstraints, -- The wanteds
- -- See Invariang (WantedInf) in GHC.Tc.Utils.TcType
+ -- See Invariant (WantedInf) in GHC.Tc.Utils.TcType
ic_binds :: EvBindsVar, -- Points to the place to fill in the
-- abstraction and bindings.
diff --git a/compiler/GHC/Tc/Types/Evidence.hs b/compiler/GHC/Tc/Types/Evidence.hs
index cad95a5242..62a7eaab4e 100644
--- a/compiler/GHC/Tc/Types/Evidence.hs
+++ b/compiler/GHC/Tc/Types/Evidence.hs
@@ -584,7 +584,7 @@ data EvTypeable
-- given a dictionaries for @s@ and @t@.
| EvTypeableTrFun EvTerm EvTerm EvTerm
- -- ^ Dictionary for @Typeable (s # w -> t)@,
+ -- ^ Dictionary for @Typeable (s % w -> t)@,
-- given a dictionaries for @w@, @s@, and @t@.
| EvTypeableTyLit EvTerm
diff --git a/compiler/GHC/Tc/Validity.hs b/compiler/GHC/Tc/Validity.hs
index c5dc68469f..9c4b262333 100644
--- a/compiler/GHC/Tc/Validity.hs
+++ b/compiler/GHC/Tc/Validity.hs
@@ -1606,7 +1606,7 @@ checkHasFieldInst _ tys = pprPanic "checkHasFieldInst" (ppr tys)
Consider the (bogus)
instance Eq Char#
We elaborate to 'Eq (Char# |> UnivCo(hole))' where the hole is an
-insoluble equality constraint for * ~ #. We'll report the insoluble
+insoluble equality constraint for Type ~ TYPE WordRep. We'll report the insoluble
constraint separately, but we don't want to *also* complain that Eq is
not applied to a type constructor. So we look gaily look through
CastTys here.
diff --git a/compiler/GHC/Types/Id/Make.hs b/compiler/GHC/Types/Id/Make.hs
index 01553cc1b5..085214bb50 100644
--- a/compiler/GHC/Types/Id/Make.hs
+++ b/compiler/GHC/Types/Id/Make.hs
@@ -412,12 +412,12 @@ There is an exception: if `b` (more generally all the fields besides `a`) is
unrestricted, then is perfectly possible to have a linear projection. Such a
linear projection has as simple definition.
- data Bar = MkBar { c :: C, d # Many :: D }
+ data Bar = MkBar { c :: C, d % Many :: D }
c :: Bar %1 -> C
c MkBar{ c=x, d=_} = x
-The `# Many` syntax, for records, does not exist yet. But there is one important
+The `% Many` syntax, for records, does not exist yet. But there is one important
special case which already happens: when there is a single field (usually a
newtype).
@@ -455,7 +455,7 @@ information. Implicitly, they are all unrestricted. See the linear types proposa
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0111-linear-types.rst .
When translating to core `C => ...` is always translated to an unrestricted
-arrow `C # Many -> ...`.
+arrow `C % Many -> ...`.
Therefore there is no loss of generality if we make all selectors unrestricted.
@@ -1530,7 +1530,7 @@ does not linger for long.
-- See Note [Left and right sections] in GHC.Rename.Expr
-- See Note [Wired-in Ids for rebindable syntax]
--- leftSection :: forall r1 r2 n (a:TYPE r1) (b:TYPE r2).
+-- leftSection :: forall r1 r2 n (a::TYPE r1) (b::TYPE r2).
-- (a %n-> b) -> a %n-> b
-- leftSection f x = f x
-- Important that it is eta-expanded, so that (leftSection undefined `seq` ())
@@ -1557,7 +1557,7 @@ leftSectionId = pcMiscPrelId leftSectionName ty info
-- See Note [Left and right sections] in GHC.Rename.Expr
-- See Note [Wired-in Ids for rebindable syntax]
--- rightSection :: forall r1 r2 r3 (a:TYPE r1) (b:TYPE r2) (c:TYPE r3).
+-- rightSection :: forall r1 r2 r3 n1 n2 (a::TYPE r1) (b::TYPE r2) (c::TYPE r3).
-- (a %n1 -> b %n2-> c) -> b %n2-> a %n1-> c
-- rightSection f y x = f x y
-- Again, multiplicity polymorphism is important
diff --git a/compiler/GHC/Types/Var.hs b/compiler/GHC/Types/Var.hs
index be2c677799..a60b7aa141 100644
--- a/compiler/GHC/Types/Var.hs
+++ b/compiler/GHC/Types/Var.hs
@@ -765,7 +765,7 @@ mkTcTyVar name kind details
}
tcTyVarDetails :: TyVar -> TcTyVarDetails
--- See Note [TcTyVars in the typechecker] in GHC.Tc.Utils.TcType
+-- See Note [TcTyVars and TyVars in the typechecker] in GHC.Tc.Utils.TcType
tcTyVarDetails (TcTyVar { tc_tv_details = details }) = details
tcTyVarDetails (TyVar {}) = vanillaSkolemTv
tcTyVarDetails var = pprPanic "tcTyVarDetails" (ppr var <+> dcolon <+> pprKind (tyVarKind var))
diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs
index 16e0e4d2e5..e51e327866 100644
--- a/compiler/Language/Haskell/Syntax/Expr.hs
+++ b/compiler/Language/Haskell/Syntax/Expr.hs
@@ -1216,7 +1216,7 @@ data StmtLR idL idR body -- body should always be (LHs**** idR)
-- ^ Post renaming has optional fail and bind / (>>=) operator.
-- Post typechecking, also has multiplicity of the argument
-- and the result type of the function passed to bind;
- -- that is, (P, S) in (>>=) :: Q -> (R # P -> S) -> T
+ -- that is, (P, S) in (>>=) :: Q -> (R % P -> S) -> T
-- See Note [The type of bind in Stmts]
(LPat idL)
body
diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst
index f0a929df5e..cc96dbc775 100644
--- a/docs/users_guide/debugging.rst
+++ b/docs/users_guide/debugging.rst
@@ -1062,7 +1062,7 @@ Other
:shortdesc: Don't generate bindings for Typeable methods
:type: dynamic
- This avoid generating Typeable-related bindings for modules and types. This
+ This avoids generating Typeable-related bindings for modules and types. This
is useful when debugging because it gives smaller modules and dumps, but the
compiler will panic if you try to use Typeable instances of things that you
built with this flag.
diff --git a/docs/users_guide/exts/gadt.rst b/docs/users_guide/exts/gadt.rst
index 00820739c9..3463bd63da 100644
--- a/docs/users_guide/exts/gadt.rst
+++ b/docs/users_guide/exts/gadt.rst
@@ -132,7 +132,7 @@ also sets :extension:`GADTSyntax` and :extension:`MonoLocalBinds`.
alternatives must be rigid.
A type is "rigid" if it is completely known to the compiler at its
- binding site. The easiest way to ensure that a variable a rigid type
+ binding site. The easiest way to ensure that a variable has a rigid type
is to give it a type signature. For more precise details see `Simple
unification-based type inference for
GADTs <https://research.microsoft.com/%7Esimonpj/papers/gadt/>`__. The
diff --git a/docs/users_guide/exts/safe_haskell.rst b/docs/users_guide/exts/safe_haskell.rst
index da62f093b2..5ceb15aa9f 100644
--- a/docs/users_guide/exts/safe_haskell.rst
+++ b/docs/users_guide/exts/safe_haskell.rst
@@ -173,7 +173,7 @@ guarantee that the code is safe. Or those modules compiled with
Safe.
This is why the RIO module is compiled with :extension:`Safe` or
-:extension:`Trustworthy`>, to allow the ``Danger`` module to import it. The
+:extension:`Trustworthy`, to allow the ``Danger`` module to import it. The
:extension:`Trustworthy` flag doesn't place any restrictions on the module like
:extension:`Safe` does (expect to restrict overlapping instances to `safe
overlapping instances <#safe-overlapping-instances>`__). Instead the
diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst
index 427829da99..9995814920 100644
--- a/docs/users_guide/ghci.rst
+++ b/docs/users_guide/ghci.rst
@@ -534,7 +534,7 @@ not to replace module loading but to make definitions in .ghci-files
Any exceptions raised during the evaluation or execution of the
statement are caught and printed by the GHCi command line interface (for
more information on exceptions, see the module :base-ref:`Control.Exception.` in
-the libraries documentation.
+the libraries documentation.)
Every new binding shadows any existing bindings of the same name,
including entities that are in scope in the current module context.
diff --git a/docs/users_guide/hints.rst b/docs/users_guide/hints.rst
index 0d011a2563..7365cb5696 100644
--- a/docs/users_guide/hints.rst
+++ b/docs/users_guide/hints.rst
@@ -236,7 +236,7 @@ Look at the Core syntax!
their Core code. ``lets`` are bad, ``cases`` are good, dictionaries
(``d.⟨Class⟩.⟨Unique⟩``) [or anything overloading-ish] are bad,
nested lambdas are bad, explicit data constructors are good,
- primitive operations (e.g., ``eqInt#``) are good, ...
+ primitive operations (e.g., ``==#``) are good, ...
Use strictness annotations:
Putting a strictness annotation (``!``) on a constructor field helps
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 36fc057890..37e4a4aae6 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -1311,7 +1311,7 @@ by saying ``-fno-wombat``.
sub-demand* that says "Called at most once, where the result is used
according to ``L``". The expression ``f `seq` f 1`` puts ``f`` under
demand ``SC1(L)`` and serves as an example where the upper bound on
- evaluation cardinality doesn't conincide with that of the call cardinality.
+ evaluation cardinality doesn't coincide with that of the call cardinality.
Cardinality is always relative to the enclosing call cardinality, so
``g 1 2 + g 3 4`` puts ``g`` under demand ``SCS(C1(L))``, which says
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index 0bd88e8356..8aa2312343 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -1367,7 +1367,7 @@ The rules for map work like this.
-- http://research.microsoft.com/en-us/um/people/simonpj/papers/ext-f/coercible.pdf
{-# RULES "map/coerce" [1] map coerce = coerce #-}
--- See Note [Getting the map/coerce RULE to work] in CoreOpt
+-- See Note [Getting the map/coerce RULE to work] in GHC.Core.SimpleOpt
----------------------------------------------
-- append
diff --git a/libraries/base/GHC/Float.hs b/libraries/base/GHC/Float.hs
index f614410a6b..b73a5994a5 100644
--- a/libraries/base/GHC/Float.hs
+++ b/libraries/base/GHC/Float.hs
@@ -1522,8 +1522,8 @@ tries to operate on the resulting `Word32` the code generator will generate code
that performs an integer/word operation on a floating-point register, which
results in a compile error.
-The correct way of implementing `reinterpret_cast` to implement a primpop, but
-that requires a unique implementation for all supported archetectures. The next
+The correct way of implementing `reinterpret_cast` to implement a primop, but
+that requires a unique implementation for all supported architectures. The next
best solution is to write the value from the source register to memory and then
read it from memory into the destination register and the best way to do that
is using CMM.
diff --git a/libraries/base/GHC/TypeNats.hs b/libraries/base/GHC/TypeNats.hs
index 8991ab2e0c..4325f3a8bf 100644
--- a/libraries/base/GHC/TypeNats.hs
+++ b/libraries/base/GHC/TypeNats.hs
@@ -127,7 +127,7 @@ After inlining and simplification, this ends up looking something like this:
See Note [withDict] in "GHC.HsToCore.Expr" for details on how
we actually construct the dictionary.
-Note that using `Any Nat` is not really correct, as multilple calls to
+Note that using `Any Nat` is not really correct, as multiple calls to
`someNatVal` would violate coherence:
type T = Any Nat
diff --git a/libraries/base/Unsafe/Coerce.hs b/libraries/base/Unsafe/Coerce.hs
index 0b35eeca1b..9504eb13e2 100644
--- a/libraries/base/Unsafe/Coerce.hs
+++ b/libraries/base/Unsafe/Coerce.hs
@@ -166,11 +166,11 @@ several ways
(U7) We add a built-in RULE
unsafeEqualityProof k t t ==> UnsafeRefl (Refl t)
- to simplify the ase when the two tpyes are equal.
+ to simplify the case when the two types are equal.
(U8) The is a super-magic RULE in GHC.base
map coerce = coerce
- (see Note [Getting the map/coerce RULE to work] in CoreOpt)
+ (see Note [Getting the map/coerce RULE to work] in GHC.Core.SimpleOpt)
But it's all about turning coerce into a cast, and unsafeCoerce
no longer does that. So we need a separate map/unsafeCoerce
RULE, in this module.
diff --git a/rules/hs-suffix-way-rules.mk b/rules/hs-suffix-way-rules.mk
index 286e04eee7..da3d368c0b 100644
--- a/rules/hs-suffix-way-rules.mk
+++ b/rules/hs-suffix-way-rules.mk
@@ -33,7 +33,7 @@ else
#
# The order in which implicit rules are defined can influence a build.
#
-# Case study: genprimpos/Lexer.hs
+# Case study: genprimops/Lexer.hs
#
# We have two implicit rules for creating .o files, which after instantiating
# with a specific directory ($1=utils/genprimops) and distdir ($2=dist) look
diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py
index b21b0de977..1fd37bcb4e 100644
--- a/testsuite/driver/perf_notes.py
+++ b/testsuite/driver/perf_notes.py
@@ -798,7 +798,7 @@ def main() -> None:
# HEAD~3 20000 20000
def strMetric(x):
return '{:.2f}'.format(x.value) if x != None else ""
- # Data is in colum major format, so transpose and pass to print_table.
+ # Data is in column major format, so transpose and pass to print_table.
T = TypeVar('T')
def transpose(xss: List[List[T]]) -> List[List[T]]:
return list(map(list, zip(*xss)))
diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T
index a368edd128..5f947f5e37 100644
--- a/testsuite/tests/dependent/should_compile/all.T
+++ b/testsuite/tests/dependent/should_compile/all.T
@@ -11,7 +11,7 @@ test('mkGADTVars', normal, compile, [''])
test('TypeLevelVec',normal,compile, [''])
test('T9632', normal, compile, [''])
-# dynamic-paper used to run out of simplfier ticks because of
+# dynamic-paper used to run out of simplifier ticks because of
# infinite inlining, but the new case-depth mechanism cuts that off,
# so it now compiles fine.
#
diff --git a/testsuite/tests/typecheck/should_run/tcrun011.hs b/testsuite/tests/typecheck/should_run/tcrun011.hs
index ead5827568..715a8a61cd 100644
--- a/testsuite/tests/typecheck/should_run/tcrun011.hs
+++ b/testsuite/tests/typecheck/should_run/tcrun011.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE ExistentialQuantification, FlexibleContexts,
MultiParamTypeClasses #-}
--- !!! Existential data tyes
+-- !!! Existential data types
-- Hugs didn't like this one
module Main (main) where