summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Wignall <brianwignall@gmail.com>2020-01-10 10:47:46 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-12 21:30:08 -0500
commit0b5ddc7f2c10ee84631dd6cb5f6368afbc389449 (patch)
treed9a77d5b2c55d75d9ae5b6fa199612315de9d163
parent350e2b78788d47255d27489dfc62d664498b5de4 (diff)
downloadhaskell-0b5ddc7f2c10ee84631dd6cb5f6368afbc389449.tar.gz
Fix more typos, via an improved Levenshtein-style corrector
-rw-r--r--aclocal.m44
-rw-r--r--compiler/GHC/CoreToStg.hs4
-rw-r--r--compiler/GHC/Hs/Binds.hs4
-rw-r--r--compiler/GHC/Hs/Decls.hs6
-rw-r--r--compiler/GHC/Hs/Types.hs6
-rw-r--r--compiler/GHC/Hs/Utils.hs4
-rw-r--r--compiler/GHC/HsToCore/PmCheck/Oracle.hs12
-rw-r--r--compiler/GHC/Iface/Ext/Ast.hs4
-rw-r--r--compiler/GHC/Rename/Env.hs2
-rw-r--r--compiler/GHC/Rename/Fixity.hs4
-rw-r--r--compiler/GHC/Rename/Names.hs6
-rw-r--r--compiler/GHC/Rename/Source.hs4
-rw-r--r--compiler/GHC/Rename/Types.hs2
-rw-r--r--compiler/basicTypes/BasicTypes.hs12
-rw-r--r--compiler/basicTypes/Demand.hs10
-rw-r--r--compiler/basicTypes/IdInfo.hs4
-rw-r--r--compiler/basicTypes/Literal.hs4
-rw-r--r--compiler/basicTypes/MkId.hs2
-rw-r--r--compiler/basicTypes/Module.hs2
-rw-r--r--compiler/basicTypes/RdrName.hs4
-rw-r--r--compiler/cmm/CLabel.hs4
-rw-r--r--compiler/cmm/CmmSwitch.hs4
-rw-r--r--compiler/coreSyn/CoreArity.hs8
-rw-r--r--compiler/coreSyn/CoreOpt.hs4
-rw-r--r--compiler/coreSyn/CoreSyn.hs10
-rw-r--r--compiler/coreSyn/CoreUnfold.hs14
-rw-r--r--compiler/coreSyn/CoreUtils.hs8
-rw-r--r--compiler/deSugar/Coverage.hs2
-rw-r--r--compiler/deSugar/Desugar.hs2
-rw-r--r--compiler/deSugar/DsBinds.hs2
-rw-r--r--compiler/deSugar/DsExpr.hs2
-rw-r--r--compiler/deSugar/Match.hs4
-rw-r--r--compiler/deSugar/MatchLit.hs2
-rw-r--r--compiler/ghci/ByteCodeGen.hs4
-rw-r--r--compiler/llvmGen/LlvmCodeGen/CodeGen.hs2
-rw-r--r--compiler/main/DynFlags.hs10
-rw-r--r--compiler/main/GhcMake.hs6
-rw-r--r--compiler/main/Packages.hs6
-rw-r--r--compiler/main/Plugins.hs2
-rw-r--r--compiler/nativeGen/BlockLayout.hs4
-rw-r--r--compiler/nativeGen/CFG.hs18
-rw-r--r--compiler/nativeGen/Dwarf/Types.hs2
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs2
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs2
-rw-r--r--compiler/parser/Parser.y12
-rw-r--r--compiler/prelude/PrelInfo.hs2
-rw-r--r--compiler/prelude/PrelRules.hs6
-rw-r--r--compiler/prelude/PrimOp.hs2
-rw-r--r--compiler/prelude/TysWiredIn.hs6
-rw-r--r--compiler/simplCore/CSE.hs6
-rw-r--r--compiler/simplCore/Exitify.hs2
-rw-r--r--compiler/simplCore/OccurAnal.hs12
-rw-r--r--compiler/simplCore/SetLevels.hs6
-rw-r--r--compiler/simplCore/SimplUtils.hs14
-rw-r--r--compiler/simplCore/Simplify.hs6
-rw-r--r--compiler/simplCore/simplifier.tib2
-rw-r--r--compiler/specialise/Rules.hs4
-rw-r--r--compiler/specialise/SpecConstr.hs8
-rw-r--r--compiler/stranal/DmdAnal.hs4
-rw-r--r--compiler/typecheck/ClsInst.hs2
-rw-r--r--compiler/typecheck/Constraint.hs10
-rw-r--r--compiler/typecheck/FunDeps.hs4
-rw-r--r--compiler/typecheck/Inst.hs4
-rw-r--r--compiler/typecheck/TcBackpack.hs2
-rw-r--r--compiler/typecheck/TcBinds.hs10
-rw-r--r--compiler/typecheck/TcCanonical.hs12
-rw-r--r--compiler/typecheck/TcClassDcl.hs2
-rw-r--r--compiler/typecheck/TcDeriv.hs2
-rw-r--r--compiler/typecheck/TcDerivInfer.hs2
-rw-r--r--compiler/typecheck/TcEnv.hs6
-rw-r--r--compiler/typecheck/TcErrors.hs4
-rw-r--r--compiler/typecheck/TcGenDeriv.hs2
-rw-r--r--compiler/typecheck/TcGenFunctor.hs2
-rw-r--r--compiler/typecheck/TcHsSyn.hs10
-rw-r--r--compiler/typecheck/TcHsType.hs14
-rw-r--r--compiler/typecheck/TcInstDcls.hs10
-rw-r--r--compiler/typecheck/TcInteract.hs14
-rw-r--r--compiler/typecheck/TcMType.hs10
-rw-r--r--compiler/typecheck/TcMatches.hs4
-rw-r--r--compiler/typecheck/TcPatSyn.hs8
-rw-r--r--compiler/typecheck/TcRnDriver.hs6
-rw-r--r--compiler/typecheck/TcRnMonad.hs10
-rw-r--r--compiler/typecheck/TcRnTypes.hs6
-rw-r--r--compiler/typecheck/TcSMonad.hs12
-rw-r--r--compiler/typecheck/TcSimplify.hs12
-rw-r--r--compiler/typecheck/TcSplice.hs6
-rw-r--r--compiler/typecheck/TcTyClsDecls.hs22
-rw-r--r--compiler/typecheck/TcTyDecls.hs4
-rw-r--r--compiler/typecheck/TcType.hs10
-rw-r--r--compiler/typecheck/TcUnify.hs6
-rw-r--r--compiler/typecheck/TcValidity.hs14
-rw-r--r--compiler/types/Class.hs2
-rw-r--r--compiler/types/FamInstEnv.hs6
-rw-r--r--compiler/types/InstEnv.hs4
-rw-r--r--compiler/types/TyCoRep.hs4
-rw-r--r--compiler/types/TyCon.hs4
-rw-r--r--compiler/types/Type.hs8
-rw-r--r--compiler/utils/Util.hs4
-rw-r--r--configure.ac4
-rw-r--r--docs/opt-coercion/fc-normalization-rta.bib6
-rw-r--r--docs/opt-coercion/prooftree.sty2
-rw-r--r--docs/rts/rts.tex10
-rw-r--r--docs/users_guide/ghci.rst2
-rw-r--r--docs/users_guide/glasgow_exts.rst8
-rw-r--r--docs/users_guide/runtime_control.rst6
-rw-r--r--docs/users_guide/using.rst2
-rw-r--r--ghc/GHCi/UI.hs2
-rw-r--r--ghc/Main.hs6
-rw-r--r--hadrian/README.md2
-rw-r--r--hadrian/src/Hadrian/BuildPath.hs2
-rw-r--r--hadrian/src/Hadrian/Utilities.hs2
-rw-r--r--libraries/base/GHC/Float.hs4
-rw-r--r--libraries/base/GHC/Float/RealFracMethods.hs2
-rw-r--r--libraries/base/System/Posix/Internals.hs2
-rw-r--r--libraries/ghc-boot/GHC/PackageDb.hs4
-rw-r--r--mk/config.mk.in2
-rw-r--r--mk/install.mk.in2
-rw-r--r--rts/LdvProfile.c2
-rw-r--r--rts/PrimOps.cmm2
-rw-r--r--rts/STM.c4
-rw-r--r--rts/Schedule.c4
-rw-r--r--rts/TraverseHeap.c2
-rw-r--r--rts/linker/Elf.c2
-rw-r--r--rts/linker/MachO.c6
-rw-r--r--rts/sm/GC.c4
-rw-r--r--rts/sm/NonMovingMark.c4
-rw-r--r--testsuite/driver/perf_notes.py2
-rw-r--r--testsuite/tests/boxy/Base1.hs2
-rw-r--r--testsuite/tests/numeric/should_run/numrun014.hs2
-rw-r--r--testsuite/tests/programs/andy_cherry/andy_cherry.stdout4
-rw-r--r--testsuite/tests/programs/andy_cherry/mygames.pgn4
-rw-r--r--testsuite/tests/programs/joao-circular/Visfun_Lazy.hs4
-rw-r--r--testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs4
-rw-r--r--utils/gen-dll/Main.hs4
-rw-r--r--utils/genprimopcode/Syntax.hs2
136 files changed, 360 insertions, 360 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 6b005acf82..f2115152ea 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1994,7 +1994,7 @@ case "$1" in
# GHC_LLVM_TARGET(target_cpu, target_vendor, target_os, llvm_target_var)
# --------------------------------
-# converts the canonicalized target into someting llvm can understand
+# converts the canonicalized target into something llvm can understand
AC_DEFUN([GHC_LLVM_TARGET], [
case "$2-$3" in
*-freebsd*-gnueabihf)
@@ -2238,7 +2238,7 @@ EOF
# FIND_GHC_BOOTSTRAP_PROG()
# --------------------------------
-# Parse the bootstrap GHC's compier settings file for the location of things
+# Parse the bootstrap GHC's compiler settings file for the location of things
# like the `llc` and `opt` commands.
#
# $1 = the variable to set
diff --git a/compiler/GHC/CoreToStg.hs b/compiler/GHC/CoreToStg.hs
index 1ee5febd2e..83799f6e49 100644
--- a/compiler/GHC/CoreToStg.hs
+++ b/compiler/GHC/CoreToStg.hs
@@ -723,7 +723,7 @@ mkTopStgRhs dflags this_mod ccs bndr rhs
(_, all_cafs_ccs) = getAllCAFsCC this_mod
-- Generate a non-top-level RHS. Cost-centre is always currentCCS,
--- see Note [Cost-centre initialzation plan].
+-- see Note [Cost-centre initialization plan].
mkStgRhs :: Id -> StgExpr -> StgRhs
mkStgRhs bndr rhs
| StgLam bndrs body <- rhs
@@ -837,7 +837,7 @@ data LetInfo
-- For a let(rec)-bound variable, x, we record LiveInfo, the set of
-- variables that are live if x is live. This LiveInfo comprises
-- (a) dynamic live variables (ones with a non-top-level binding)
--- (b) static live variabes (CAFs or things that refer to CAFs)
+-- (b) static live variables (CAFs or things that refer to CAFs)
--
-- For "normal" variables (a) is just x alone. If x is a let-no-escaped
-- variable then x is represented by a code pointer and a stack pointer
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs
index 1a7db17ccd..adb8604913 100644
--- a/compiler/GHC/Hs/Binds.hs
+++ b/compiler/GHC/Hs/Binds.hs
@@ -345,7 +345,7 @@ type instance XXHsBindsLR (GhcPass pL) (GhcPass pR) = NoExtCon
--
-- See Note [AbsBinds]
--- | Abtraction Bindings Export
+-- | Abstraction Bindings Export
data ABExport p
= ABE { abe_ext :: XABE p
, abe_poly :: IdP p -- ^ Any INLINE pragma is attached to this Id
@@ -562,7 +562,7 @@ again we can desugar without a let:
undef = /\ a. \ (d:HasCallStack) -> error a d "undef"
The abs_sig field supports this direct desugaring, with no local
-let-bining. When abs_sig = True
+let-binding. When abs_sig = True
* the abs_binds is single FunBind
diff --git a/compiler/GHC/Hs/Decls.hs b/compiler/GHC/Hs/Decls.hs
index 69cfd0a111..4f5164d7e7 100644
--- a/compiler/GHC/Hs/Decls.hs
+++ b/compiler/GHC/Hs/Decls.hs
@@ -907,7 +907,7 @@ Invariants
depend on group_tyclds, or on earlier TyClGroups, but not on later
ones.
-See Note [Dependency analsis of type, class, and instance decls]
+See Note [Dependency analysis of type, class, and instance decls]
in GHC.Rename.Source for more info.
-}
@@ -1189,7 +1189,7 @@ data HsDataDefn pass -- The payload of a data type defn
-- For @data T a where { T1 :: T a }@
-- the 'LConDecls' all have 'ConDeclGADT'.
- dd_derivs :: HsDeriving pass -- ^ Optional 'deriving' claues
+ dd_derivs :: HsDeriving pass -- ^ Optional 'deriving' clause
-- For details on above see note [Api annotations] in ApiAnnotation
}
@@ -1412,7 +1412,7 @@ There's a wrinkle in ConDeclGADT
con_args = PrefixCon []
con_res_ty = a :*: (b -> (a :*: (b -> (a :+: b))))
- - In the renamer (GHC.Rename.Source.rnConDecl), we unravel it afer
+ - In the renamer (GHC.Rename.Source.rnConDecl), we unravel it after
operator fixities are sorted. So we generate. So we end
up with
con_args = PrefixCon [ a :*: b, a :*: b ]
diff --git a/compiler/GHC/Hs/Types.hs b/compiler/GHC/Hs/Types.hs
index 92f064144a..78d03c5859 100644
--- a/compiler/GHC/Hs/Types.hs
+++ b/compiler/GHC/Hs/Types.hs
@@ -674,7 +674,7 @@ data HsType pass
| HsExplicitListTy -- A promoted explicit list
(XExplicitListTy pass)
- PromotionFlag -- whether explcitly promoted, for pretty printer
+ PromotionFlag -- whether explicitly promoted, for pretty printer
[LHsType pass]
-- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'["@,
-- 'ApiAnnotation.AnnClose' @']'@
@@ -888,7 +888,7 @@ type LConDeclField pass = Located (ConDeclField pass)
-- For details on above see note [Api annotations] in ApiAnnotation
-- | Constructor Declaration Field
-data ConDeclField pass -- Record fields have Haddoc docs on them
+data ConDeclField pass -- Record fields have Haddock docs on them
= ConDeclField { cd_fld_ext :: XConDeclField pass,
cd_fld_names :: [LFieldOcc pass],
-- ^ See Note [ConDeclField passs]
@@ -958,7 +958,7 @@ gives
hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
-- Get the lexically-scoped type variables of a HsSigType
-- - the explicitly-given forall'd type variables
--- - the named wildcars; see Note [Scoping of named wildcards]
+-- - the named wildcards; see Note [Scoping of named wildcards]
-- because they scope in the same way
hsWcScopedTvs sig_ty
| HsWC { hswc_ext = nwcs, hswc_body = sig_ty1 } <- sig_ty
diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs
index f9133eba87..a6c70574d0 100644
--- a/compiler/GHC/Hs/Utils.hs
+++ b/compiler/GHC/Hs/Utils.hs
@@ -551,7 +551,7 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup
-- #big_tuples#
--
-- GHCs built in tuples can only go up to 'mAX_TUPLE_SIZE' in arity, but
--- we might concievably want to build such a massive tuple as part of the
+-- we might conceivably want to build such a massive tuple as part of the
-- output of a desugaring stage (notably that for list comprehensions).
--
-- We call tuples above this size \"big tuples\", and emulate them by
@@ -566,7 +566,7 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup
-- and 'mkTupleCase' functions to do all your work with tuples you should be
-- fine, and not have to worry about the arity limitation at all.
--- | Lifts a \"small\" constructor into a \"big\" constructor by recursive decompositon
+-- | Lifts a \"small\" constructor into a \"big\" constructor by recursive decomposition
mkChunkified :: ([a] -> a) -- ^ \"Small\" constructor function, of maximum input arity 'mAX_TUPLE_SIZE'
-> [a] -- ^ Possible \"big\" list of things to construct from
-> a -- ^ Constructed thing made possible by recursive decomposition
diff --git a/compiler/GHC/HsToCore/PmCheck/Oracle.hs b/compiler/GHC/HsToCore/PmCheck/Oracle.hs
index 713656c6ff..f5e2293155 100644
--- a/compiler/GHC/HsToCore/PmCheck/Oracle.hs
+++ b/compiler/GHC/HsToCore/PmCheck/Oracle.hs
@@ -83,7 +83,7 @@ import Data.Ord (comparing)
import qualified Data.Semigroup as Semigroup
import Data.Tuple (swap)
--- Debugging Infrastructre
+-- Debugging Infrastructure
tracePm :: String -> SDoc -> DsM ()
tracePm herald doc = do
@@ -142,7 +142,7 @@ mkOneConFull arg_tys con = do
-- pprTrace "mkOneConFull" (ppr con $$ ppr arg_tys $$ ppr univ_tvs $$ ppr _con_res_ty) (return ())
-- Substitute universals for type arguments
let subst_univ = zipTvSubst univ_tvs arg_tys
- -- Instantiate fresh existentials as arguments to the contructor. This is
+ -- Instantiate fresh existentials as arguments to the constructor. This is
-- important for instantiating the Thetas and field types.
(subst, _) <- cloneTyVarBndrs subst_univ ex_tvs <$> getUniqueSupplyM
let field_tys' = substTys subst field_tys
@@ -175,7 +175,7 @@ Consider the following code (see #12957 and #15450):
We want to warn that the pattern-matching in `f` is non-exhaustive. But GHC
used not to do this; in fact, it would warn that the match was /redundant/!
This is because the constraint (Int ~ Bool) in `f` is unsatisfiable, and the
-coverage checker deems any matches with unsatifiable constraint sets to be
+coverage checker deems any matches with unsatisfiable constraint sets to be
unreachable.
We decide to better than this. When beginning coverage checking, we first
@@ -562,7 +562,7 @@ tyIsSatisfiable recheck_complete_sets new_ty_cs = SC $ \delta ->
Invariant applying to each VarInfo: Whenever we have @(C, [y,z])@ in 'vi_pos',
any entry in 'vi_neg' must be incomparable to C (return Nothing) according to
'eqPmAltCons'. Those entries that are comparable either lead to a refutation
-or are redudant. Examples:
+or are redundant. Examples:
* @x ~ Just y@, @x /~ [Just]@. 'eqPmAltCon' returns @Equal@, so refute.
* @x ~ Nothing@, @x /~ [Just]@. 'eqPmAltCon' returns @Disjoint@, so negative
info is redundant and should be discarded.
@@ -934,7 +934,7 @@ guessConLikeUnivTyArgsFromResTy _ res_ty (PatSynCon ps) = do
subst <- tcMatchTy con_res_ty res_ty
traverse (lookupTyVar subst) univ_tvs
--- | Kind of tries to add a non-void contraint to 'Delta', but doesn't really
+-- | Kind of tries to add a non-void constraint to 'Delta', but doesn't really
-- commit to upholding that constraint in the future. This will be rectified
-- in a follow-up patch. The status quo should work good enough for now.
addVarNonVoidCt :: Delta -> Id -> MaybeT DsM Delta
@@ -1340,7 +1340,7 @@ determine whether a strict type is inhabitable by a terminating value or not.
`nonVoid ty` returns True when either:
1. `ty` has at least one InhabitationCandidate for which both its term and type
- constraints are satifiable, and `nonVoid` returns `True` for all of the
+ constraints are satisfiable, and `nonVoid` returns `True` for all of the
strict argument types in that InhabitationCandidate.
2. We're unsure if it's inhabited by a terminating value.
diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs
index a3c2efe77b..50d5d8e3e7 100644
--- a/compiler/GHC/Iface/Ext/Ast.hs
+++ b/compiler/GHC/Iface/Ext/Ast.hs
@@ -304,7 +304,7 @@ concatM :: Monad m => [m [a]] -> m [a]
concatM xs = concat <$> sequence xs
{- Note [Capturing Scopes and other non local information]
-toHie is a local tranformation, but scopes of bindings cannot be known locally,
+toHie is a local transformation, but scopes of bindings cannot be known locally,
hence we have to push the relevant info down into the binding nodes.
We use the following types (*Context and *Scoped) to wrap things and
carry the required info
@@ -479,7 +479,7 @@ instance HasLoc (HsDataDefn GhcRn) where
loc _ = noSrcSpan
{- Note [Real DataCon Name]
-The typechecker subtitutes the conLikeWrapId for the name, but we don't want
+The typechecker substitutes the conLikeWrapId for the name, but we don't want
this showing up in the hieFile, so we replace the name in the Id with the
original datacon name
See also Note [Data Constructor Naming]
diff --git a/compiler/GHC/Rename/Env.hs b/compiler/GHC/Rename/Env.hs
index 3b0f766a37..443c5614c8 100644
--- a/compiler/GHC/Rename/Env.hs
+++ b/compiler/GHC/Rename/Env.hs
@@ -406,7 +406,7 @@ lookupConstructorFields :: Name -> RnM [FieldLabel]
-- data type decls
--
-- * For constructors from imported modules, use the *type* environment
--- since imported modles are already compiled, the info is conveniently
+-- since imported modules are already compiled, the info is conveniently
-- right there
lookupConstructorFields con_name
diff --git a/compiler/GHC/Rename/Fixity.hs b/compiler/GHC/Rename/Fixity.hs
index 884e2593d0..74b886f49c 100644
--- a/compiler/GHC/Rename/Fixity.hs
+++ b/compiler/GHC/Rename/Fixity.hs
@@ -70,7 +70,7 @@ type MiniFixityEnv = FastStringEnv (Located Fixity)
--
-- It is keyed by the *FastString*, not the *OccName*, because
-- the single fixity decl infix 3 T
- -- affects both the data constructor T and the type constrctor T
+ -- affects both the data constructor T and the type constructor T
--
-- We keep the location so that if we find
-- a duplicate, we can report it sensibly
@@ -181,7 +181,7 @@ lookupTyFixityRn :: Located Name -> RnM Fixity
lookupTyFixityRn = lookupFixityRn . unLoc
-- | Look up the fixity of a (possibly ambiguous) occurrence of a record field
--- selector. We use 'lookupFixityRn'' so that we can specifiy the 'OccName' as
+-- selector. We use 'lookupFixityRn'' so that we can specify the 'OccName' as
-- the field label, which might be different to the 'OccName' of the selector
-- 'Name' if @DuplicateRecordFields@ is in use (#1173). If there are
-- multiple possible selectors with different fixities, generate an error.
diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs
index 9ead354935..e23191bf0c 100644
--- a/compiler/GHC/Rename/Names.hs
+++ b/compiler/GHC/Rename/Names.hs
@@ -93,7 +93,7 @@ graph. So we can just worry mostly about direct imports.
There is one trust property that can change for a package though without
recompilation being triggered: package trust. So we must check that all
-packages a module tranitively depends on to be trusted are still trusted when
+packages a module transitively depends on to be trusted are still trusted when
we are compiling this module (as due to recompilation avoidance some modules
below may not be considered trusted any more without recompilation being
triggered).
@@ -406,7 +406,7 @@ calculateAvails dflags iface mod_safe' want_boot imported_by =
-- reported. Easiest thing is just to filter them out up
-- front. This situation only arises if a module imports
-- itself, or another module that imported it. (Necessarily,
- -- this invoves a loop.)
+ -- this involves a loop.)
--
-- We do this *after* filterImports, so that if you say
-- module A where
@@ -1510,7 +1510,7 @@ decls, and simply trim their import lists. NB that
* We do *not* change the 'qualified' or 'as' parts!
- * We do not disard a decl altogether; we might need instances
+ * We do not discard a decl altogether; we might need instances
from it. Instead we just trim to an empty import list
-}
diff --git a/compiler/GHC/Rename/Source.hs b/compiler/GHC/Rename/Source.hs
index 648dc29456..6796aa6b41 100644
--- a/compiler/GHC/Rename/Source.hs
+++ b/compiler/GHC/Rename/Source.hs
@@ -700,7 +700,7 @@ rnFamInstEqn doc atfi rhs_kvars
-- bound in the type patterns.
; payload_kvar_names <- mapM (newTyVarNameRn mb_cls) payload_kvars
- -- all names not bound in an explict forall
+ -- all names not bound in an explicit forall
; let all_imp_var_names = imp_var_names ++ payload_kvar_names
-- All the free vars of the family patterns
@@ -768,7 +768,7 @@ rnTyFamInstDecl atfi (TyFamInstDecl { tfid_eqn = eqn })
-- 1. A type family equation that is not associated
-- with a parent type class ('NonAssocTyFamEqn')
--
--- 2. An associated type family default delcaration ('AssocTyFamDeflt')
+-- 2. An associated type family default declaration ('AssocTyFamDeflt')
--
-- 3. An associated type family instance declaration ('AssocTyFamInst')
data AssocTyFamInfo
diff --git a/compiler/GHC/Rename/Types.hs b/compiler/GHC/Rename/Types.hs
index b5c950618c..05df4865ec 100644
--- a/compiler/GHC/Rename/Types.hs
+++ b/compiler/GHC/Rename/Types.hs
@@ -658,7 +658,7 @@ rnTyVar env rdr_name
; return name }
rnLTyVar :: Located RdrName -> RnM (Located Name)
--- Called externally; does not deal with wildards
+-- Called externally; does not deal with wildcards
rnLTyVar (L loc rdr_name)
= do { tyvar <- lookupTypeOccRn rdr_name
; return (L loc tyvar) }
diff --git a/compiler/basicTypes/BasicTypes.hs b/compiler/basicTypes/BasicTypes.hs
index 3763611349..dc545ea838 100644
--- a/compiler/basicTypes/BasicTypes.hs
+++ b/compiler/basicTypes/BasicTypes.hs
@@ -2,7 +2,7 @@
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1997-1998
-\section[BasicTypes]{Miscellanous types}
+\section[BasicTypes]{Miscellaneous types}
This module defines a miscellaneously collection of very simple
types that
@@ -970,8 +970,8 @@ data InterestingCxt
| NotInteresting
deriving (Eq)
--- | If there is any 'interesting' identifier occurance, then the
--- aggregated occurance info of that identifier is considered interesting.
+-- | If there is any 'interesting' identifier occurrence, then the
+-- aggregated occurrence info of that identifier is considered interesting.
instance Semi.Semigroup InterestingCxt where
NotInteresting <> x = x
IsInteresting <> _ = IsInteresting
@@ -990,8 +990,8 @@ data InsideLam
| NotInsideLam
deriving (Eq)
--- | If any occurance of an identifier is inside a lambda, then the
--- occurance info of that identifier marks it as occuring inside a lambda
+-- | If any occurrence of an identifier is inside a lambda, then the
+-- occurrence info of that identifier marks it as occurring inside a lambda
instance Semi.Semigroup InsideLam where
NotInsideLam <> x = x
IsInsideLam <> _ = IsInsideLam
@@ -1003,7 +1003,7 @@ instance Monoid InsideLam where
-----------------
data OneBranch
= InOneBranch
- -- ^ One syntactic occurance: Occurs in only one case branch
+ -- ^ One syntactic occurrence: Occurs in only one case branch
-- so no code-duplication issue to worry about
| MultipleBranches
deriving (Eq)
diff --git a/compiler/basicTypes/Demand.hs b/compiler/basicTypes/Demand.hs
index 19fbce3690..2ac18a4393 100644
--- a/compiler/basicTypes/Demand.hs
+++ b/compiler/basicTypes/Demand.hs
@@ -526,7 +526,7 @@ This too would get <Str, Used>, but this time there really isn't any
point in w/w since the components of the pair are not used at all.
So the solution is: don't aggressively collapse UProd [Used,Used] to
-Used; intead leave it as-is. In effect we are using the UseDmd to do a
+Used; instead leave it as-is. In effect we are using the UseDmd to do a
little bit of boxity analysis. Not very nice.
Note [Used should win]
@@ -700,7 +700,7 @@ cleanEvalProdDmd n = JD { sd = HeadStr, ud = UProd (replicate n useTop) }
{-
************************************************************************
* *
- Demand: combining stricness and usage
+ Demand: combining strictness and usage
* *
************************************************************************
-}
@@ -1089,7 +1089,7 @@ For a
The CPR information, though, is valid after the number of arguments mentioned
in the type is given. Therefore, when forgetting the demand on arguments, as in
-dmdAnalRhs, this needs to be considere (via removeDmdTyArgs).
+dmdAnalRhs, this needs to be considered (via removeDmdTyArgs).
Consider
b2 x y = x `seq` y `seq` error (show x)
@@ -1128,7 +1128,7 @@ We
3. combine the termination results, but
4. take CPR info from the first argument.
-3 and 4 are implementd in bothDmdResult.
+3 and 4 are implemented in bothDmdResult.
-}
-- Equality needed for fixpoints in DmdAnal
@@ -1444,7 +1444,7 @@ Note [Default demand on free variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the variable is not mentioned in the environment of a demand type,
its demand is taken to be a result demand of the type.
- For the stricness component,
+ For the strictness component,
if the result demand is a Diverges, then we use HyperStr
else we use Lazy
For the usage component, we use Absent.
diff --git a/compiler/basicTypes/IdInfo.hs b/compiler/basicTypes/IdInfo.hs
index b514df64f4..b2ec6acb5a 100644
--- a/compiler/basicTypes/IdInfo.hs
+++ b/compiler/basicTypes/IdInfo.hs
@@ -250,7 +250,7 @@ data IdInfo
oneShotInfo :: OneShotInfo,
-- ^ Info about a lambda-bound variable, if the 'Id' is one
inlinePragInfo :: InlinePragma,
- -- ^ Any inline pragma atached to the 'Id'
+ -- ^ Any inline pragma attached to the 'Id'
occInfo :: OccInfo,
-- ^ How the 'Id' occurs in the program
strictnessInfo :: StrictSig,
@@ -425,7 +425,7 @@ data RuleInfo
-- ru_fn though.
-- Note [Rule dependency info] in OccurAnal
--- | Assume that no specilizations exist: always safe
+-- | Assume that no specializations exist: always safe
emptyRuleInfo :: RuleInfo
emptyRuleInfo = RuleInfo [] emptyDVarSet
diff --git a/compiler/basicTypes/Literal.hs b/compiler/basicTypes/Literal.hs
index b567dcc6ba..bea0478d5c 100644
--- a/compiler/basicTypes/Literal.hs
+++ b/compiler/basicTypes/Literal.hs
@@ -831,7 +831,7 @@ Here are the moving parts:
* We define LitRubbish as a constructor in Literal.Literal
-* It is given its polymoprhic type by Literal.literalType
+* It is given its polymorphic type by Literal.literalType
* WwLib.mk_absent_let introduces a LitRubbish for absent
arguments of boxed, unlifted type.
@@ -842,7 +842,7 @@ Here are the moving parts:
which the garbage collector can follow if it encounters it.
We considered maintaining LitRubbish in STG, and lowering
- it in the code genreators, but it seems simpler to do it
+ it in the code generators, but it seems simpler to do it
once and for all in CoreToSTG.
In ByteCodeAsm we just lower it as a 0 literal, because
diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs
index 658b9de529..7a3d71cb7b 100644
--- a/compiler/basicTypes/MkId.hs
+++ b/compiler/basicTypes/MkId.hs
@@ -1178,7 +1178,7 @@ wrapNewTypeBody tycon args result_expr
-- When unwrapping, we do *not* apply any family coercion, because this will
-- be done via a CoPat by the type checker. We have to do it this way as
-- computing the right type arguments for the coercion requires more than just
--- a spliting operation (cf, TcPat.tcConPat).
+-- a splitting operation (cf, TcPat.tcConPat).
unwrapNewTypeBody :: TyCon -> [Type] -> CoreExpr -> CoreExpr
unwrapNewTypeBody tycon args result_expr
diff --git a/compiler/basicTypes/Module.hs b/compiler/basicTypes/Module.hs
index f5b65e7638..eb5452e6a8 100644
--- a/compiler/basicTypes/Module.hs
+++ b/compiler/basicTypes/Module.hs
@@ -1068,7 +1068,7 @@ versions of them installed. To the user, everything looks normal.
However, for each invocation of GHC, only a single instance of each wired-in
package will be recognised (the desired one is selected via
-@-package@\/@-hide-package@), and GHC will internall pretend that it has the
+@-package@\/@-hide-package@), and GHC will internally pretend that it has the
*unversioned* 'UnitId', including in .hi files and object file symbols.
Unselected versions of wired-in packages will be ignored, as will any other
diff --git a/compiler/basicTypes/RdrName.hs b/compiler/basicTypes/RdrName.hs
index 1cf2b6b260..42628ad516 100644
--- a/compiler/basicTypes/RdrName.hs
+++ b/compiler/basicTypes/RdrName.hs
@@ -452,7 +452,7 @@ type GlobalRdrEnv = OccEnv [GlobalRdrElt]
--
-- NB: greOccName gre is usually the same as
-- nameOccName (gre_name gre), but not always in the
--- case of record seectors; see greOccName
+-- case of record selectors; see greOccName
-- | Global Reader Element
--
@@ -509,7 +509,7 @@ gre_lcl is True, or gre_imp is non-empty.
It is just possible to have *both* if there is a module loop: a Name
is defined locally in A, and also brought into scope by importing a
-module that SOURCE-imported A. Exapmle (#7672):
+module that SOURCE-imported A. Example (#7672):
A.hs-boot module A where
data T
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 9452b5f6c8..fb2f06716d 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -803,7 +803,7 @@ maybeLocalBlockLabel _ = Nothing
-- | Check whether a label corresponds to a C function that has
--- a prototype in a system header somehere, or is built-in
+-- a prototype in a system header somewhere, or is built-in
-- to the C compiler. For these labels we avoid generating our
-- own C prototypes.
isMathFun :: CLabel -> Bool
@@ -1474,7 +1474,7 @@ mayRedirectTo symbol target
{-
Note [emit-time elimination of static indirections]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-As described in #15155, certain static values are repesentationally
+As described in #15155, certain static values are representationally
equivalent, e.g. 'cast'ed values (when created by 'newtype' wrappers).
newtype A = A Int
diff --git a/compiler/cmm/CmmSwitch.hs b/compiler/cmm/CmmSwitch.hs
index a5fa6457e2..26bf5c4ce9 100644
--- a/compiler/cmm/CmmSwitch.hs
+++ b/compiler/cmm/CmmSwitch.hs
@@ -324,7 +324,7 @@ targetSupportsSwitch _ = False
-- | This function creates a SwitchPlan from a SwitchTargets value, breaking it
-- down into smaller pieces suitable for code generation.
createSwitchPlan :: SwitchTargets -> SwitchPlan
--- Lets do the common case of a singleton map quicky and efficiently (#10677)
+-- Lets do the common case of a singleton map quickly and efficiently (#10677)
createSwitchPlan (SwitchTargets _signed _range (Just defLabel) m)
| [(x, l)] <- M.toList m
= IfEqual x l (Unconditionally defLabel)
@@ -484,7 +484,7 @@ reassocTuples initial ((a,b):tuples) last
--
-- - CmmSwitch, which provides the CmmSwitchTargets type and contains the strategy
-- for implementing a Cmm switch (createSwitchPlan), and
--- - CmmImplementSwitchPlans, which contains the actuall Cmm graph modification,
+-- - CmmImplementSwitchPlans, which contains the actual Cmm graph modification,
--
-- for these reasons:
--
diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs
index d3f24fa7bf..e4738897e6 100644
--- a/compiler/coreSyn/CoreArity.hs
+++ b/compiler/coreSyn/CoreArity.hs
@@ -267,7 +267,7 @@ Or, to put it another way
there is no work lost in duplicating the partial
application (e x1 .. x(n-1))
-In the divegent case, no work is lost by duplicating because if the thing
+In the divergent case, no work is lost by duplicating because if the thing
is evaluated once, that's the end of the program.
Or, to put it another way, in any context C
@@ -356,7 +356,7 @@ we want to get: coerce T (\x::[T] -> (coerce ([T]->Int) e) x)
HOWEVER, note that if you use coerce bogusly you can ge
coerce Int negate
And since negate has arity 2, you might try to eta expand. But you can't
- decopose Int to a function type. Hence the final case in eta_expand.
+ decompose Int to a function type. Hence the final case in eta_expand.
Note [The state-transformer hack]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -855,7 +855,7 @@ returns a CoreExpr satisfying the same invariant. See Note [Eta
expansion and the CorePrep invariants] in CorePrep.
This means the eta-expander has to do a bit of on-the-fly
-simplification but it's not too hard. The alernative, of relying on
+simplification but it's not too hard. The alternative, of relying on
a subsequent clean-up phase of the Simplifier to de-crapify the result,
means you can't really use it in CorePrep, which is painful.
@@ -1106,7 +1106,7 @@ mkEtaWW orig_n orig_expr in_scope orig_ty
-- is levity-polymorphic
= WARN( True, (ppr orig_n <+> ppr orig_ty) $$ ppr orig_expr )
(getTCvInScope subst, reverse eis)
- -- This *can* legitmately happen:
+ -- This *can* legitimately happen:
-- e.g. coerce Int (\x. x) Essentially the programmer is
-- playing fast and loose with types (Happy does this a lot).
-- So we simply decline to eta-expand. Otherwise we'd end up
diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs
index d4451e9ff8..c516799bef 100644
--- a/compiler/coreSyn/CoreOpt.hs
+++ b/compiler/coreSyn/CoreOpt.hs
@@ -833,7 +833,7 @@ We need to be careful about UTF8 strings here. ""# contains a ByteString, so
we must parse it back into a FastString to split off the first character.
That way we can treat unpackCString# and unpackCStringUtf8# in the same way.
-We must also be caeful about
+We must also be careful about
lvl = "foo"#
...(unpackCString# lvl)...
to ensure that we see through the let-binding for 'lvl'. Hence the
@@ -1138,7 +1138,7 @@ to compute the type arguments to the dictionary constructor.
Note [DFun arity check]
~~~~~~~~~~~~~~~~~~~~~~~
-Here we check that the total number of supplied arguments (inclding
+Here we check that the total number of supplied arguments (including
type args) matches what the dfun is expecting. This may be *less*
than the ordinary arity of the dfun: see Note [DFun unfoldings] in CoreSyn
-}
diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs
index 3d2f6be299..53824737a1 100644
--- a/compiler/coreSyn/CoreSyn.hs
+++ b/compiler/coreSyn/CoreSyn.hs
@@ -225,7 +225,7 @@ But caching the type in the Case constructor
exprType (Case scrut bndr ty alts) = ty
is better for at least three reasons:
-* It works when there are no alternatives (see case invarant 1 above)
+* It works when there are no alternatives (see case invariant 1 above)
* It might be faster in deeply-nested situations.
@@ -1042,7 +1042,7 @@ data TickishScoping =
-- ==>
-- tick<...> case foo of x -> bar
--
- -- While this is always leagl, we want to make a best effort to
+ -- While this is always legal, we want to make a best effort to
-- only make us of this where it exposes transformation
-- opportunities.
| SoftScope
@@ -1262,8 +1262,8 @@ its left hand side mentions nothing defined in this module. Orphan-hood
has two major consequences
* A module that contains orphans is called an "orphan module". If
- the module being compiled depends (transitively) on an oprhan
- module M, then M.hi is read in regardless of whether M is oherwise
+ the module being compiled depends (transitively) on an orphan
+ module M, then M.hi is read in regardless of whether M is otherwise
needed. This is to ensure that we don't miss any instance decls in
M. But it's painful, because it means we need to keep track of all
the orphan modules below us.
@@ -1273,7 +1273,7 @@ has two major consequences
mentions on the LHS. For example
data T = T1 | T2
instance Eq T where ....
- The instance (Eq T) is incorprated as part of T's fingerprint.
+ The instance (Eq T) is incorporated as part of T's fingerprint.
In contrast, orphans are all fingerprinted together in the
mi_orph_hash field of the ModIface.
diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs
index 65f0e9b8f8..260530bc55 100644
--- a/compiler/coreSyn/CoreUnfold.hs
+++ b/compiler/coreSyn/CoreUnfold.hs
@@ -226,13 +226,13 @@ specUnfolding to specialise its unfolding. Some important points:
{- INLINABLE f #-}
Now if we specialise f, should the specialised version still have
an INLINABLE pragma? If it does, we'll capture a specialised copy
- of <big-rhs> as its unfolding, and that probaby won't inline. But
+ of <big-rhs> as its unfolding, and that probably won't inline. But
if we don't, the specialised version of <big-rhs> might be small
enough to inline at a call site. This happens with Control.Monad.liftM3,
and can cause a lot more allocation as a result (nofib n-body shows this).
Moreover, keeping the INLINABLE thing isn't much help, because
- the specialised function (probaby) isn't overloaded any more.
+ the specialised function (probably) isn't overloaded any more.
Conclusion: drop the INLINEALE pragma. In practice what this means is:
if a stable unfolding has UnfoldingGuidance of UnfWhen,
@@ -255,7 +255,7 @@ The semantics of an INLINE pragma is
that is, applied to at least as many arguments as appear
on the LHS of the Haskell source definition.
-(This soure-code-derived arity is stored in the `ug_arity` field of
+(This source-code-derived arity is stored in the `ug_arity` field of
the `UnfoldingGuidance`.)
In the example, x's ug_arity is 0, so we should inline it at every use
@@ -362,14 +362,14 @@ the unfolding in question was a DFun unfolding.
But more generally, the simplifier is designed on the
basis that it is looking at occurrence-analysed expressions, so better
-ensure that they acutally are.
+ensure that they actually are.
We use occurAnalyseExpr_NoBinderSwap instead of occurAnalyseExpr;
see Note [No binder swap in unfoldings].
Note [No binder swap in unfoldings]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The binder swap can temporarily violate Core Lint, by assinging
+The binder swap can temporarily violate Core Lint, by assigning
a LocalId binding to a GlobalId. For example, if A.foo{r872}
is a GlobalId with unique r872, then
@@ -528,7 +528,7 @@ are very cheap, because exposing them to a caller is so valuable.
[25/5/11] All sizes are now multiplied by 10, except for primops
(which have sizes like 1 or 4. This makes primops look fantastically
-cheap, and seems to be almost unversally beneficial. Done partly as a
+cheap, and seems to be almost universally beneficial. Done partly as a
result of #4978.
Note [Do not inline top-level bottoming functions]
@@ -1612,5 +1612,5 @@ computeDiscount dflags arg_discounts res_discount arg_infos cont_info
-- constructors; but we only want to invoke that large discount
-- when there's a case continuation.
-- Otherwise we, rather arbitrarily, threshold it. Yuk.
- -- But we want to aovid inlining large functions that return
+ -- But we want to avoid inlining large functions that return
-- constructors into contexts that are simply "interesting"
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index cd2221246e..679360f3de 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -8,7 +8,7 @@ Utility functions on @Core@ syntax
{-# LANGUAGE CPP #-}
--- | Commonly useful utilites for manipulating the Core language
+-- | Commonly useful utilities for manipulating the Core language
module CoreUtils (
-- * Constructing expressions
mkCast,
@@ -552,7 +552,7 @@ can be eliminated by expanding the synonym.
Note [Binding coercions]
~~~~~~~~~~~~~~~~~~~~~~~~
-Consider binding a CoVar, c = e. Then, we must atisfy
+Consider binding a CoVar, c = e. Then, we must satisfy
Note [CoreSyn type and coercion invariant] in CoreSyn,
which allows only (Coercion co) on the RHS.
@@ -609,7 +609,7 @@ that cannot match. For example:
Suppose that for some silly reason, x isn't substituted in the case
expression. (Perhaps there's a NOINLINE on it, or profiling SCC stuff
-gets in the way; cf #3118.) Then the full-lazines pass might produce
+gets in the way; cf #3118.) Then the full-laziness pass might produce
this
x = Red
@@ -1622,7 +1622,7 @@ app_ok primop_ok fun args
-----------------------------
altsAreExhaustive :: [Alt b] -> Bool
--- True <=> the case alternatives are definiely exhaustive
+-- True <=> the case alternatives are definitely exhaustive
-- False <=> they may or may not be
altsAreExhaustive []
= False -- Should not happen
diff --git a/compiler/deSugar/Coverage.hs b/compiler/deSugar/Coverage.hs
index 6930af6e0b..75eeb07570 100644
--- a/compiler/deSugar/Coverage.hs
+++ b/compiler/deSugar/Coverage.hs
@@ -1195,7 +1195,7 @@ mkTickish boxLabel countEntries topOnly pos fvs decl_path = do
let ids = filter (not . isUnliftedType . idType) $ occEnvElts fvs
-- unlifted types cause two problems here:
-- * we can't bind them at the GHCi prompt
- -- (bindLocalsAtBreakpoint already fliters them out),
+ -- (bindLocalsAtBreakpoint already filters them out),
-- * the simplifier might try to substitute a literal for
-- the Id, and we can't handle that.
diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs
index 48edd61b1b..bbf67cfc48 100644
--- a/compiler/deSugar/Desugar.hs
+++ b/compiler/deSugar/Desugar.hs
@@ -516,7 +516,7 @@ If you have
{-# RULES "rule-for-f" forall x. f (g x) = ... #-}
then there's a good chance that in a potential rule redex
...f (g e)...
-then 'f' or 'g' will inline befor the rule can fire. Solution: add an
+then 'f' or 'g' will inline before the rule can fire. Solution: add an
INLINE [n] or NOINLINE [n] pragma to 'f' and 'g'.
Note that this applies to all the free variables on the LHS, both the
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index 87aca99136..ef6f72e780 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -792,7 +792,7 @@ From a user SPECIALISE pragma for f, we generate
We need two pragma-like things:
* spec_fn's inline pragma: inherited from f's inline pragma (ignoring
- activation on SPEC), unless overriden by SPEC INLINE
+ activation on SPEC), unless overridden by SPEC INLINE
* Activation of RULE: from SPECIALISE pragma (if activation given)
otherwise from f's inline pragma
diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs
index a5019ae042..1271bcbe7b 100644
--- a/compiler/deSugar/DsExpr.hs
+++ b/compiler/deSugar/DsExpr.hs
@@ -1075,7 +1075,7 @@ warnDiscardedDoBindings rhs rhs_ty
_ -> return () } } }
| otherwise -- RHS does have type of form (m ty), which is weird
- = return () -- but at lesat this warning is irrelevant
+ = return () -- but at least this warning is irrelevant
badMonadBind :: LHsExpr GhcTc -> Type -> SDoc
badMonadBind rhs elt_ty
diff --git a/compiler/deSugar/Match.hs b/compiler/deSugar/Match.hs
index 3cc88e31db..d5518aa870 100644
--- a/compiler/deSugar/Match.hs
+++ b/compiler/deSugar/Match.hs
@@ -756,7 +756,7 @@ matchWrapper ctxt mb_scr (MG { mg_alts = L _ matches
; match_result <-
-- Extend the environment with knowledge about
- -- the matches before desguaring the RHS
+ -- the matches before desugaring the RHS
-- See Note [Type and Term Equality Propagation]
applyWhen (needToRunPmCheck dflags origin)
(addTyCsDs dicts . addScrutTmCs mb_scr vars . addPatTmCs upats vars)
@@ -952,7 +952,7 @@ fails we try to read a Bool. But clearly we can't combine the two into a single
match.
Conclusion: we can combine when we invoke PRead /at the same type/. Hence
-in PgSyn we record the instantiaing types, and use them in sameGroup.
+in PgSyn we record the instantiating types, and use them in sameGroup.
Note [Take care with pattern order]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/deSugar/MatchLit.hs b/compiler/deSugar/MatchLit.hs
index 3fb64f6769..14d5b942b1 100644
--- a/compiler/deSugar/MatchLit.hs
+++ b/compiler/deSugar/MatchLit.hs
@@ -166,7 +166,7 @@ warnAboutOverflowedOverLit hsOverLit = do
dflags <- getDynFlags
warnAboutOverflowedLiterals dflags (getIntegralLit hsOverLit)
--- | Emit warnings on integral literals which overflow the boudns implied by
+-- | Emit warnings on integral literals which overflow the bounds implied by
-- their type.
warnAboutOverflowedLit :: HsLit GhcTc -> DsM ()
warnAboutOverflowedLit hsLit = do
diff --git a/compiler/ghci/ByteCodeGen.hs b/compiler/ghci/ByteCodeGen.hs
index 90931a4d74..2e24bf540c 100644
--- a/compiler/ghci/ByteCodeGen.hs
+++ b/compiler/ghci/ByteCodeGen.hs
@@ -997,7 +997,7 @@ doCase d s p (_,scrut) bndr alts is_unboxed_tuple
ret_frame_size_b :: StackDepth
ret_frame_size_b = 2 * wordSize dflags
- -- The extra frame we push to save/restor the CCCS when profiling
+ -- The extra frame we push to save/restore the CCCS when profiling
save_ccs_size_b | profiling = 2 * wordSize dflags
| otherwise = 0
@@ -1473,7 +1473,7 @@ The code we generate is this:
The 'bogus-word' push is because TESTEQ_I expects the top of the stack
to have an info-table, and the next word to have the value to be
tested. This is very weird, but it's the way it is right now. See
-Interpreter.c. We don't acutally need an info-table here; we just
+Interpreter.c. We don't actually need an info-table here; we just
need to have the argument to be one-from-top on the stack, hence pushing
a 1-word null. See #8383.
-}
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
index 0e907fc0eb..c01e575546 100644
--- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
@@ -1798,7 +1798,7 @@ genLit _ CmmHighStackMark
-- | Find CmmRegs that get assigned and allocate them on the stack
--
--- Any register that gets written needs to be allcoated on the
+-- Any register that gets written needs to be allocated on the
-- stack. This avoids having to map a CmmReg to an equivalent SSA form
-- and avoids having to deal with Phi node insertion. This is also
-- the approach recommended by LLVM developers.
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 72da94cb44..675b69feb9 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -563,7 +563,7 @@ data GeneralFlag
| Opt_RegsGraph -- do graph coloring register allocation
| Opt_RegsIterative -- do iterative coalescing graph coloring register allocation
| Opt_PedanticBottoms -- Be picky about how we treat bottom
- | Opt_LlvmTBAA -- Use LLVM TBAA infastructure for improving AA (hidden flag)
+ | Opt_LlvmTBAA -- Use LLVM TBAA infrastructure for improving AA (hidden flag)
| Opt_LlvmFillUndefWithGarbage -- Testing for undef bugs (hidden flag)
| Opt_IrrefutableTuples
| Opt_CmmSink
@@ -972,7 +972,7 @@ data DynFlags = DynFlags {
rawSettings :: [(String, String)],
integerLibrary :: IntegerLibrary,
- -- ^ IntegerGMP or IntegerSimple. Set at configure time, but may be overriden
+ -- ^ IntegerGMP or IntegerSimple. Set at configure time, but may be overridden
-- by GHC-API users. See Note [The integer library] in PrelNames
llvmConfig :: LlvmConfig,
-- ^ N.B. It's important that this field is lazy since we load the LLVM
@@ -1106,7 +1106,7 @@ data DynFlags = DynFlags {
-- they don't have to be loaded each time they are needed. See
-- 'DynamicLoading.initializePlugins'.
staticPlugins :: [StaticPlugin],
- -- ^ staic plugins which do not need dynamic loading. These plugins are
+ -- ^ static plugins which do not need dynamic loading. These plugins are
-- intended to be added by GHC API users directly to this list.
--
-- To add dynamically loaded plugins through the GHC API see
@@ -3005,7 +3005,7 @@ dynamic_flags_deps = [
Nothing -> upd (\d -> d { parMakeCount = Nothing })))
-- When the number of parallel builds
-- is omitted, it is the same
- -- as specifing that the number of
+ -- as specifying that the number of
-- parallel builds is equal to the
-- result of getNumProcessors
, make_ord_flag defFlag "instantiated-with" (sepArg setUnitIdInsts)
@@ -5180,7 +5180,7 @@ setDumpFlag' dump_flag
Opt_D_no_debug_output]
forceRecompile :: DynP ()
--- Whenver we -ddump, force recompilation (by switching off the
+-- Whenever we -ddump, force recompilation (by switching off the
-- recompilation checker), else you don't see the dump! However,
-- don't switch it off in --make mode, else *everything* gets
-- recompiled which probably isn't what you want
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index 60cef1b8d0..6525163608 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -841,7 +841,7 @@ checkStability hpt sccs all_home_mods =
-> isObjectLinkable l && t == linkableTime l
_other -> True
-- why '>=' rather than '>' above? If the filesystem stores
- -- times to the nearset second, we may occasionally find that
+ -- times to the nearest second, we may occasionally find that
-- the object & source have the same modification time,
-- especially if the source was automatically generated
-- and compiled. Using >= is slightly unsafe, but it matches
@@ -1464,7 +1464,7 @@ upsweep mHscMessage old_hpt stable_mods cleanup sccs = do
-- Space-saving: delete the old HPT entry
-- for mod BUT if mod is a hs-boot
-- node, don't delete it. For the
- -- interface, the HPT entry is probaby for the
+ -- interface, the HPT entry is probably for the
-- main Haskell source file. Deleting it
-- would force the real module to be recompiled
-- every time.
@@ -2389,7 +2389,7 @@ checkSummaryTimestamp
else return Nothing
-- We have to repopulate the Finder's cache for file targets
- -- because the file might not even be on the regular serach path
+ -- because the file might not even be on the regular search path
-- and it was likely flushed in depanal. This is not technically
-- needed when we're called from sumariseModule but it shouldn't
-- hurt.
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs
index c1ab3d62c3..8f3f6822a8 100644
--- a/compiler/main/Packages.hs
+++ b/compiler/main/Packages.hs
@@ -206,7 +206,7 @@ fromExposedModules :: Bool -> ModuleOrigin
fromExposedModules e = ModOrigin (Just e) [] [] False
-- | Smart constructor for a module which is in @reexported-modules@. Takes
--- as an argument whether or not the reexporting package is expsed, and
+-- as an argument whether or not the reexporting package is exposed, and
-- also its 'PackageConfig'.
fromReexportedModules :: Bool -> PackageConfig -> ModuleOrigin
fromReexportedModules True pkg = ModOrigin Nothing [pkg] [] False
@@ -569,7 +569,7 @@ readPackageConfig dflags conf_file = do
"can't find a package database at " ++ conf_file
let
- -- Fix #16360: remove trailing slash from conf_file before calculting pkgroot
+ -- Fix #16360: remove trailing slash from conf_file before calculating pkgroot
conf_file' = dropTrailingPathSeparator conf_file
top_dir = topDir dflags
pkgroot = takeDirectory conf_file'
@@ -1491,7 +1491,7 @@ mkPackageState dflags dbs preload0 = do
-- When exposing units, we want to consider all of those in the most preferable
-- packages. We can implement that by looking for units that are equi-preferable
-- with the most preferable unit for package. Being equi-preferable means that
- -- they must be in the same database, with the same version, and the same pacakge name.
+ -- they must be in the same database, with the same version, and the same package name.
--
-- We must take care to consider all these units and not just the most
-- preferable one, otherwise we can end up with problems like #16228.
diff --git a/compiler/main/Plugins.hs b/compiler/main/Plugins.hs
index 649aa476c1..0d6c2da2ce 100644
--- a/compiler/main/Plugins.hs
+++ b/compiler/main/Plugins.hs
@@ -201,7 +201,7 @@ flagRecompile =
-- | Default plugin: does nothing at all, except for marking that safe
-- inference has failed unless @-fplugin-trustworthy@ is passed. For
--- compatibility reaso you should base all your plugin definitions on this
+-- compatibility reason you should base all your plugin definitions on this
-- default value.
defaultPlugin :: Plugin
defaultPlugin = Plugin {
diff --git a/compiler/nativeGen/BlockLayout.hs b/compiler/nativeGen/BlockLayout.hs
index 9b5f2eda8f..f0e98cda75 100644
--- a/compiler/nativeGen/BlockLayout.hs
+++ b/compiler/nativeGen/BlockLayout.hs
@@ -342,7 +342,7 @@ takeL n (BlockChain blks) =
-- We have the chains (A-B-C-D) and (E-F) and an Edge C->E.
--
-- While placing the latter after the former doesn't result in sequential
--- control flow it is still benefical. As block C and E might end
+-- control flow it is still beneficial. As block C and E might end
-- up in the same cache line.
--
-- So we place these chains next to each other even if we can't fuse them.
@@ -740,7 +740,7 @@ sequenceChain info weights' blocks@((BasicBlock entry _):_) =
--pprTraceIt "placedBlocks" $
-- ++ [] is stil kinda expensive
if null unplaced then blockList else blockList ++ unplaced
- getBlock bid = expectJust "Block placment" $ mapLookup bid blockMap
+ getBlock bid = expectJust "Block placement" $ mapLookup bid blockMap
in
--Assert we placed all blocks given as input
ASSERT(all (\bid -> mapMember bid blockMap) placedBlocks)
diff --git a/compiler/nativeGen/CFG.hs b/compiler/nativeGen/CFG.hs
index fb17d269a8..4dc5f9ccb3 100644
--- a/compiler/nativeGen/CFG.hs
+++ b/compiler/nativeGen/CFG.hs
@@ -291,7 +291,7 @@ from blocks suitable for shortcutting to their jump targets.
Then it redirects all jump instructions to these blocks using the
built up mapping.
This function (shortcutWeightMap) takes the same mapping and
-applies the mapping to the CFG in the way layed out above.
+applies the mapping to the CFG in the way laid out above.
-}
shortcutWeightMap :: LabelMap (Maybe BlockId) -> CFG -> CFG
@@ -575,7 +575,7 @@ addNodesBetween m updates =
so have a larger number of successors. So without more information
we can only say that each individual successor is unlikely to be
jumped to and we rank them accordingly.
- * Calls - We currently ignore calls completly:
+ * Calls - We currently ignore calls completely:
* By the time we return from a call there is a good chance
that the address we return to has already been evicted from
cache eliminating a main advantage sequential placement brings.
@@ -648,7 +648,7 @@ getCfg weights graph =
(CmmCall { cml_cont = Nothing }) -> []
other ->
panic "Foo" $
- ASSERT2(False, ppr "Unkown successor cause:" <>
+ ASSERT2(False, ppr "Unknown successor cause:" <>
(ppr branch <+> text "=>" <> ppr (G.successors other)))
map (\x -> ((bid,x),mkEdgeInfo 0)) $ G.successors other
where
@@ -959,10 +959,10 @@ mkGlobalWeights root localCfg
vertexMapping = mapFromList $ zip revOrder [0..] :: LabelMap Int
blockMapping = listArray (0,mapSize vertexMapping - 1) revOrder :: Array Int BlockId
- -- Map from blockId to indicies starting at zero
+ -- Map from blockId to indices starting at zero
toVertex :: BlockId -> Int
toVertex blockId = expectJust "mkGlobalWeights" $ mapLookup blockId vertexMapping
- -- Map from indicies starting at zero to blockIds
+ -- Map from indices starting at zero to blockIds
fromVertex :: Int -> BlockId
fromVertex vertex = blockMapping ! vertex
@@ -990,13 +990,13 @@ many instances of "loopy" Cmm where these make a difference.
TODO:
* The paper containers more benchmarks which should be implemented.
-* If we turn the likelyhood on if/else branches into a probability
+* If we turn the likelihood on if/else branches into a probability
instead of true/false we could implement this as a Cmm pass.
+ The complete Cmm code still exists and can be accessed by the heuristics
+ There is no chance of register allocation/codegen inserting branches/blocks
+ making the TransitionSource info wrong.
+ potential to use this information in CmmPasses.
- - Requires refactoring of all the code relying on the binary nature of likelyhood.
+ - Requires refactoring of all the code relying on the binary nature of likelihood.
- Requires refactoring `loopInfo` to work on both, Cmm Graphs and the backend CFG.
-}
@@ -1060,7 +1060,7 @@ staticBranchPrediction _root (LoopInfo l_backEdges loopLevels l_loops) cfg =
heuristics = map ($ ((s1,s1_info),(s2,s2_info)))
[lehPredicts, phPredicts, ohPredicts, ghPredicts, lhhPredicts, chPredicts
, shPredicts, rhPredicts]
- -- Apply result of a heuristic. Argument is the likelyhood
+ -- Apply result of a heuristic. Argument is the likelihood
-- predicted for s1.
applyHeuristic :: CFG -> Maybe Prob -> CFG
applyHeuristic cfg Nothing = cfg
@@ -1101,7 +1101,7 @@ staticBranchPrediction _root (LoopInfo l_backEdges loopLevels l_loops) cfg =
(m,not_m) = partition (\succ -> S.member (node, fst succ) backedges) successors
-- Heuristics return nothing if they don't say anything about this branch
- -- or Just (prob_s1) where prob_s1 is the likelyhood for s1 to be the
+ -- or Just (prob_s1) where prob_s1 is the likelihood for s1 to be the
-- taken branch. s1 is the branch in the true case.
-- Loop exit heuristic.
diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs
index 9386117386..a6ba596f35 100644
--- a/compiler/nativeGen/Dwarf/Types.hs
+++ b/compiler/nativeGen/Dwarf/Types.hs
@@ -284,7 +284,7 @@ instance Outputable DwarfFrameBlock where
ppr (DwarfFrameBlock hasInfo unwinds) = braces $ ppr hasInfo <+> ppr unwinds
-- | Header for the @.debug_frame@ section. Here we emit the "Common
--- Information Entry" record that etablishes general call frame
+-- Information Entry" record that establishes general call frame
-- parameters and the default stack layout.
pprDwarfFrame :: DwarfFrame -> SDoc
pprDwarfFrame DwarfFrame{dwCieLabel=cieLabel,dwCieInit=cieInit,dwCieProcs=procs}
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index 0c3aaccda2..ea0b36fb64 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -846,7 +846,7 @@ pprInstr (FCMP reg1 reg2) = hcat [
-- Note: we're using fcmpu, not fcmpo
-- The difference is with fcmpo, compare with NaN is an invalid operation.
-- We don't handle invalid fp ops, so we don't care.
- -- Morever, we use `fcmpu 0, ...` rather than `fcmpu cr0, ...` for
+ -- Moreover, we use `fcmpu 0, ...` rather than `fcmpu cr0, ...` for
-- better portability since some non-GNU assembler (such as
-- IBM's `as`) tend not to support the symbolic register name cr0.
-- This matches the syntax that GCC seems to emit for PPC targets.
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 59a1e4115b..8cea28d920 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -1333,7 +1333,7 @@ x86_complex_amode :: CmmExpr -> CmmExpr -> Integer -> Integer -> NatM Amode
x86_complex_amode base index shift offset
= do (x_reg, x_code) <- getNonClobberedReg base
-- x must be in a temp, because it has to stay live over y_code
- -- we could compre x_reg and y_reg and do something better here...
+ -- we could compare x_reg and y_reg and do something better here...
(y_reg, y_code) <- getSomeReg index
let
code = x_code `appOL` y_code
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index e824c385c4..d69930c26e 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -347,7 +347,7 @@ state 1089 contains 1 shift/reduce conflicts.
Conflict: 'forall'
-Example ambigutiy: '{-# RULES "name" forall a. forall ... #-}'
+Example ambiguity: '{-# RULES "name" forall a. forall ... #-}'
Here the parser cannot tell whether the second 'forall' is the beginning of
a term-level quantifier, for example:
@@ -1965,7 +1965,7 @@ context :: { LHsContext GhcPs }
; ams ctx anns
} }
--- See Note [Constr variatons of non-terminals]
+-- See Note [Constr variations of non-terminals]
constr_context :: { LHsContext GhcPs }
: constr_btype {% do { (anns,ctx) <- checkContext $1
; if null (unLoc ctx)
@@ -2018,16 +2018,16 @@ typedoc :: { LHsType GhcPs }
$4)
[mu AnnRarrow $3] }
--- See Note [Constr variatons of non-terminals]
+-- See Note [Constr variations of non-terminals]
constr_btype :: { LHsType GhcPs }
: constr_tyapps {% mergeOps (unLoc $1) }
--- See Note [Constr variatons of non-terminals]
+-- See Note [Constr variations of non-terminals]
constr_tyapps :: { Located [Located TyEl] } -- NB: This list is reversed
: constr_tyapp { sL1 $1 [$1] }
| constr_tyapps constr_tyapp { sLL $1 $> $ $2 : (unLoc $1) }
--- See Note [Constr variatons of non-terminals]
+-- See Note [Constr variations of non-terminals]
constr_tyapp :: { Located TyEl }
: tyapp { $1 }
| docprev { sL1 $1 $ TyElDocPrev (unLoc $1) }
@@ -2263,7 +2263,7 @@ constrs1 :: { Located [LConDecl GhcPs] }
>> return (sLL $1 $> (addConDoc $5 $2 : addConDocFirst (unLoc $1) $4)) }
| constr { sL1 $1 [$1] }
-{- Note [Constr variatons of non-terminals]
+{- Note [Constr variations of non-terminals]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In record declarations we assume that 'ctype' used to parse the type will not
diff --git a/compiler/prelude/PrelInfo.hs b/compiler/prelude/PrelInfo.hs
index 7d2aa3a163..221b034759 100644
--- a/compiler/prelude/PrelInfo.hs
+++ b/compiler/prelude/PrelInfo.hs
@@ -205,7 +205,7 @@ knownKeysMap = listToUFM [ (nameUnique n, n) | n <- knownKeyNames ]
-- GHCi's ':info' command.
lookupKnownNameInfo :: Name -> SDoc
lookupKnownNameInfo name = case lookupNameEnv knownNamesInfo name of
- -- If we do find a doc, we add comment delimeters to make the output
+ -- If we do find a doc, we add comment delimiters to make the output
-- of ':info' valid Haskell.
Nothing -> empty
Just doc -> vcat [text "{-", doc, text "-}"]
diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs
index c6c27f8ffe..0f8836e3ef 100644
--- a/compiler/prelude/PrelRules.hs
+++ b/compiler/prelude/PrelRules.hs
@@ -722,7 +722,7 @@ Shift.$wgo = \ (w_sCS :: GHC.Prim.Int#) (w1_sCT :: [GHC.Types.Bool]) ->
Note the massive shift on line "!!!!". It can't happen, because we've checked
that w < 64, but the optimiser didn't spot that. We DO NOT want to constant-fold this!
Moreover, if the programmer writes (n `uncheckedShiftL` 9223372036854775807), we
-can't constant fold it, but if it gets to the assember we get
+can't constant fold it, but if it gets to the assembler we get
Error: operand type mismatch for `shl'
So the best thing to do is to rewrite the shift with a call to error,
@@ -1582,7 +1582,7 @@ match_bitInteger dflags id_unf fn [arg]
| Just (LitNumber LitNumInt x _) <- exprIsLiteral_maybe id_unf arg
, x >= 0
, x <= (wordSizeInBits dflags - 1)
- -- Make sure x is small enough to yield a decently small iteger
+ -- Make sure x is small enough to yield a decently small integer
-- Attempting to construct the Integer for
-- (bitInteger 9223372036854775807#)
-- would be a bad idea (#14959)
@@ -2217,7 +2217,7 @@ Take care if we see something like
-1# -> e2
100 -> e3
because there isn't a data constructor with tag -1 or 100. In this case the
-out-of-range alterantive is dead code -- we know the range of tags for x.
+out-of-range alternative is dead code -- we know the range of tags for x.
Hence caseRules returns (AltCon -> Maybe AltCon), with Nothing indicating
an alternative that is unreachable.
diff --git a/compiler/prelude/PrimOp.hs b/compiler/prelude/PrimOp.hs
index 81220140bb..c51304b85d 100644
--- a/compiler/prelude/PrimOp.hs
+++ b/compiler/prelude/PrimOp.hs
@@ -363,7 +363,7 @@ data dependencies of the state token to enforce write-effect ordering
---------- can_fail ----------------------------
A primop "can_fail" if it can fail with an *unchecked* exception on
some elements of its input domain. Main examples:
- division (fails on zero demoninator)
+ division (fails on zero denominator)
array indexing (fails if the index is out of bounds)
An "unchecked exception" is one that is an outright error, (not
diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs
index eb9c04fdc9..a1f9f267fe 100644
--- a/compiler/prelude/TysWiredIn.hs
+++ b/compiler/prelude/TysWiredIn.hs
@@ -680,7 +680,7 @@ Note [How tuples work] See also Note [Known-key names] in PrelNames
pretty-print saturated constraint tuples with round parens;
see BasicTypes.tupleParens.
-* In quite a lot of places things are restrcted just to
+* In quite a lot of places things are restricted just to
BoxedTuple/UnboxedTuple, and then we used BasicTypes.Boxity to distinguish
E.g. tupleTyCon has a Boxity argument
@@ -702,7 +702,7 @@ GHC supports both boxed and unboxed one-tuples:
single value after CPR analysis
- A boxed one-tuple is used by DsUtils.mkSelectorBinds, when
there is just one binder
-Basically it keeps everythig uniform.
+Basically it keeps everything uniform.
However the /naming/ of the type/data constructors for one-tuples is a
bit odd:
@@ -1340,7 +1340,7 @@ boxing_constr_env
{- Note [Boxing primitive types]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-For a handful of primitive types (Int, Char, Word, Flaot, Double),
+For a handful of primitive types (Int, Char, Word, Float, Double),
we can readily box and an unboxed version (Int#, Char# etc) using
the corresponding data constructor. This is useful in a couple
of places, notably let-floating -}
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index 2bb69fa6f9..70e530c294 100644
--- a/compiler/simplCore/CSE.hs
+++ b/compiler/simplCore/CSE.hs
@@ -500,7 +500,7 @@ a SPECIALISE pragma. Then CSE kicks in and notices that the RHSs of
Now there is terrible danger that, in an importing module, we'll inline
'g' before we have a chance to run its specialisation!
-Solution: during CSE, afer a "hit" in the CSE cache
+Solution: during CSE, after a "hit" in the CSE cache
* when adding a binding
g = f
* for a top-level function g
@@ -540,7 +540,7 @@ very bad in TcFlatten.flatten_ty_con_app
flatten_ty_con_app = \x y. let <stuff> in \z. blah
* That allowed the float-out pass to put sguff between
the \y and \z.
-* And that permanently stopped eta expasion of the function,
+* And that permanently stopped eta expansion of the function,
even once <stuff> was simplified.
-}
@@ -667,7 +667,7 @@ differ near the root, so it probably isn't expensive to compare the full
alternative. It seems like the same kind of thing that CSE is supposed
to be doing, which is why I put it here.
-I acutally saw some examples in the wild, where some inlining made e1 too
+I actually saw some examples in the wild, where some inlining made e1 too
big for cheapEqExpr to catch it.
diff --git a/compiler/simplCore/Exitify.hs b/compiler/simplCore/Exitify.hs
index 1183e6cf02..f8266fc154 100644
--- a/compiler/simplCore/Exitify.hs
+++ b/compiler/simplCore/Exitify.hs
@@ -227,7 +227,7 @@ exitifyRec in_scope pairs
; return $ mkVarApps (Var v) abs_vars }
where
- -- Used to detect exit expressoins that are already proper exit jumps
+ -- Used to detect exit expressions that are already proper exit jumps
isCapturedVarArg (Var v) = v `elem` captured
isCapturedVarArg _ = False
diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs
index 99bdaeeec4..f6300edef4 100644
--- a/compiler/simplCore/OccurAnal.hs
+++ b/compiler/simplCore/OccurAnal.hs
@@ -523,7 +523,7 @@ Note [Specialising imported functions] (referred to from Specialise)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BUT for *automatically-generated* rules, the programmer can't be
responsible for the "programmer error" in Note [Rules for imported
-functions]. In paricular, consider specialising a recursive function
+functions]. In particular, consider specialising a recursive function
defined in another module. If we specialise a recursive function B.g,
we get
g_spec = .....(B.g Int).....
@@ -1300,7 +1300,7 @@ nodeScore :: OccEnv
-> VarSet -- Loop-breaker dependencies
-> NodeScore
nodeScore env old_bndr new_bndr bind_rhs lb_deps
- | not (isId old_bndr) -- A type or cercion variable is never a loop breaker
+ | not (isId old_bndr) -- A type or coercion variable is never a loop breaker
= (100, 0, False)
| old_bndr `elemVarSet` lb_deps -- Self-recursive things are great loop breakers
@@ -1974,7 +1974,7 @@ binders are unused. See esp the call to isDeadBinder in
Simplify.mkDupableAlt
In this example, though, the Simplifier will bring 'a' and 'b' back to
-life, beause it binds 'y' to (a,b) (imagine got inlined and
+life, because it binds 'y' to (a,b) (imagine got inlined and
scrutinised y).
-}
@@ -2119,7 +2119,7 @@ oneShotGroup :: OccEnv -> [CoreBndr]
-- The result binders have one-shot-ness set that they might not have had originally.
-- This happens in (build (\c n -> e)). Here the occurrence analyser
-- linearity context knows that c,n are one-shot, and it records that fact in
- -- the binder. This is useful to guide subsequent float-in/float-out tranformations
+ -- the binder. This is useful to guide subsequent float-in/float-out transformations
oneShotGroup env@(OccEnv { occ_one_shots = ctxt }) bndrs
= go ctxt bndrs []
@@ -2210,7 +2210,7 @@ extendFvs env s
Note [Binder swap]
~~~~~~~~~~~~~~~~~~
-The "binder swap" tranformation swaps occurrence of the
+The "binder swap" transformation swaps occurrence of the
scrutinee of a case for occurrences of the case-binder:
(1) case x of b { pi -> ri }
@@ -2559,7 +2559,7 @@ so we had better treat them as having noOccInfo.
This showed up in #15696 we had something like
case eq_sel d of co -> ...(typeError @(...co...) "urk")...
-Then 'd' was substitued by a dictionary, so the expression
+Then 'd' was substituted by a dictionary, so the expression
simpified to
case (Coercion <blah>) of co -> ...(typeError @(...co...) "urk")...
diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs
index a3a5944031..84f7147195 100644
--- a/compiler/simplCore/SetLevels.hs
+++ b/compiler/simplCore/SetLevels.hs
@@ -554,7 +554,7 @@ After floating we may have:
{- some expression involving x and z -}
When analysing <body involving...> we want to use the /ambient/ level,
-and /not/ the desitnation level of the 'case a of (x,-) ->' binding.
+and /not/ the destination level of the 'case a of (x,-) ->' binding.
#16978 was caused by us setting the context level to the destination
level of `x` when analysing <body>. This led us to conclude that we
@@ -792,7 +792,7 @@ Here we may just as well produce
f x = j x 0
and now there is a chance that 'f' will be inlined at its call sites.
-It shouldn't make a lot of difference, but thes tests
+It shouldn't make a lot of difference, but these tests
perf/should_run/MethSharing
simplCore/should_compile/spec-inline
and one nofib program, all improve if you do float to top, because
@@ -800,7 +800,7 @@ of the resulting inlining of f. So ok, let's do it.
Note [Free join points]
~~~~~~~~~~~~~~~~~~~~~~~
-We never float a MFE that has a free join-point variable. You mght think
+We never float a MFE that has a free join-point variable. You might think
this can never occur. After all, consider
join j x = ...
in ....(jump j x)....
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index 6b76c93691..5c653c7adb 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -549,7 +549,7 @@ Note [Do not expose strictness if sm_inline=False]
{-# RULES "foo" forall as bs. stream (zip as bs) = ..blah... #-}
-If we expose zip's bottoming nature when simplifing the LHS of the
+If we expose zip's bottoming nature when simplifying the LHS of the
RULE we get
{-# RULES "foo" forall as bs.
stream (case zip of {}) = ..blah... #-}
@@ -1053,7 +1053,7 @@ For example, it's tempting to look at trivial binding like
and inline it unconditionally. But suppose x is used many times,
but this is the unique occurrence of y. Then inlining x would change
y's occurrence info, which breaks the invariant. It matters: y
-might have a BIG rhs, which will now be dup'd at every occurrenc of x.
+might have a BIG rhs, which will now be dup'd at every occurrence of x.
Even RHSs labelled InlineMe aren't caught here, because there might be
@@ -1236,7 +1236,7 @@ NOTE: This isn't our last opportunity to inline. We're at the binding
site right now, and we'll get another opportunity when we get to the
occurrence(s)
-Note that we do this unconditional inlining only for trival RHSs.
+Note that we do this unconditional inlining only for trivial RHSs.
Don't inline even WHNFs inside lambdas; doing so may simply increase
allocation when the function is called. This isn't the last chance; see
NOTE above.
@@ -1322,7 +1322,7 @@ postInlineUnconditionally env top_lvl bndr occ_info rhs
-- in \y. ....case f of {...} ....
-- Here f is used just once, and duplicating the case work is fine (exprIsCheap).
-- But
--- - We can't preInlineUnconditionally because that woud invalidate
+-- - We can't preInlineUnconditionally because that would invalidate
-- the occ info for b.
-- - We can't postInlineUnconditionally because the RHS is big, and
-- that risks exponential behaviour
@@ -1626,7 +1626,7 @@ where
But there is really no point in doing this, and it generates masses of
coercions and whatnot that eventually disappear again. For T9020, GHC
-allocated 6.6G beore, and 0.8G afterwards; and residency dropped from
+allocated 6.6G before, and 0.8G afterwards; and residency dropped from
1.8G to 45M.
But note that this won't eta-expand, say
@@ -2234,7 +2234,7 @@ Since the case is exhaustive (all cases are) we can convert it to
This may generate sligthtly better code (although it should not, since
all cases are exhaustive) and/or optimise better. I'm not certain that
-it's necessary, but currenty we do make this change. We do it here,
+it's necessary, but currently we do make this change. We do it here,
NOT in the TagToEnum rules (see "Beware" in Note [caseRules for tagToEnum]
in PrelRules)
-}
@@ -2315,7 +2315,7 @@ x=c1=I# a1. So we'll bind a2 to a1, and get
0 -> ...
DEFAULT -> case a1 of ...
-This is corect, but we can't do a case merge in this sweep
+This is correct, but we can't do a case merge in this sweep
because c2 /= a1. Reason: the binding c1=I# a1 went inwards
without getting changed to c1=I# c2.
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index e671378d11..e9bce31a62 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -1712,8 +1712,8 @@ case-of-case we may then end up with this totally bogus result
C -> e) of <outer-alts>
This would be OK in the language of the paper, but not in GHC: j is no longer
-a join point. We can only do the "push contination into the RHS of the
-join point j" if we also push the contination right down to the /jumps/ to
+a join point. We can only do the "push continuation into the RHS of the
+join point j" if we also push the continuation right down to the /jumps/ to
j, so that it can evaporate there. If we are doing case-of-case, we'll get to
join x = case <j-rhs> of <outer-alts> in
@@ -2264,7 +2264,7 @@ Note that SimplUtils.mkCase combines identical RHSs. So
True -> r
False -> r
-Now again the case may be elminated by the CaseElim transformation.
+Now again the case may be eliminated by the CaseElim transformation.
This includes things like (==# a# b#)::Bool so that we simplify
case ==# a# b# of { True -> x; False -> x }
to just
diff --git a/compiler/simplCore/simplifier.tib b/compiler/simplCore/simplifier.tib
index 01919cd14b..e0f9dc91f2 100644
--- a/compiler/simplCore/simplifier.tib
+++ b/compiler/simplCore/simplifier.tib
@@ -335,7 +335,7 @@ should first be eliminated by the dead-alternative transformation.
\subsection{Inlining}
-The inlining transformtion is simple enough:
+The inlining transformation is simple enough:
@
let x = R in B[x] ===> B[R]
@
diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs
index 1eb1dab812..6e391d3fe2 100644
--- a/compiler/specialise/Rules.hs
+++ b/compiler/specialise/Rules.hs
@@ -128,7 +128,7 @@ Note [Overall plumbing for rules]
(b) from the ModGuts,
(c) from the CoreMonad, and
(d) from its mutable variable
- [Of coures this means that we won't see new EPS rules that come in
+ [Of course this means that we won't see new EPS rules that come in
during a single simplifier iteration, but that probably does not
matter.]
@@ -317,7 +317,7 @@ ruleIsVisible vis_orphs Rule { ru_orphan = orph, ru_origin = origin }
{- Note [Where rules are found]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The rules for an Id come from two places:
- (a) the ones it is born with, stored inside the Id iself (idCoreRules fn),
+ (a) the ones it is born with, stored inside the Id itself (idCoreRules fn),
(b) rules added in other modules, stored in the global RuleBase (imp_rules)
It's tempting to think that
diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs
index 9dcf9bb9eb..a5f05cac50 100644
--- a/compiler/specialise/SpecConstr.hs
+++ b/compiler/specialise/SpecConstr.hs
@@ -791,7 +791,7 @@ After optimisation, including SpecConstr, we get:
Not good! We build an (I# x) box every time around the loop.
SpecConstr (as described in the paper) does not specialise f, despite
-the call (f ... (I# x)) because 'y' is not scrutinied in the body.
+the call (f ... (I# x)) because 'y' is not scrutinised in the body.
But it is much better to specialise f for the case where the argument
is of form (I# x); then we build the box only when returning y, which
is on the cold path.
@@ -804,7 +804,7 @@ Here 'x' is not scrutinised in f's body; but if we did specialise 'f'
then the call (g x) might allow 'g' to be specialised in turn.
So sc_keen controls whether or not we take account of whether argument is
-scrutinised in the body. True <=> ignore that, and speicalise whenever
+scrutinised in the body. True <=> ignore that, and specialise whenever
the function is applied to a data constructor.
-}
@@ -1164,7 +1164,7 @@ instance Outputable ArgOcc where
evalScrutOcc :: ArgOcc
evalScrutOcc = ScrutOcc emptyUFM
--- Experimentally, this vesion of combineOcc makes ScrutOcc "win", so
+-- Experimentally, this version of combineOcc makes ScrutOcc "win", so
-- that if the thing is scrutinised anywhere then we get to see that
-- in the overall result, even if it's also used in a boxed way
-- This might be too aggressive; see Note [Reboxing] Alternative 3
@@ -1934,7 +1934,7 @@ where, say,
co :: Foo ~R (Int,Int)
Here we definitely do want to specialise for that pair! We do not
-match on the structre of the coercion; instead we just match on a
+match on the structure of the coercion; instead we just match on a
coercion variable, so the RULE looks like
forall (x::Int, y::Int, co :: (Int,Int) ~R Foo)
diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs
index b1601f2fed..7c14e2963d 100644
--- a/compiler/stranal/DmdAnal.hs
+++ b/compiler/stranal/DmdAnal.hs
@@ -140,7 +140,7 @@ dmdTransformThunkDmd e
-- See ↦* relation in the Cardinality Analysis paper
dmdAnalStar :: AnalEnv
-> Demand -- This one takes a *Demand*
- -> CoreExpr -- Should obey the let/app invariatn
+ -> CoreExpr -- Should obey the let/app invariant
-> (BothDmdArg, CoreExpr)
dmdAnalStar env dmd e
| (dmd_shell, cd) <- toCleanDmd dmd
@@ -501,7 +501,7 @@ dmdFix :: TopLevelFlag
-> AnalEnv -- Does not include bindings for this binding
-> CleanDemand
-> [(Id,CoreExpr)]
- -> (AnalEnv, DmdEnv, [(Id,CoreExpr)]) -- Binders annotated with stricness info
+ -> (AnalEnv, DmdEnv, [(Id,CoreExpr)]) -- Binders annotated with strictness info
dmdFix top_lvl env let_dmd orig_pairs
= loop 1 initial_pairs
diff --git a/compiler/typecheck/ClsInst.hs b/compiler/typecheck/ClsInst.hs
index d6cfb6eaf5..74c232c80d 100644
--- a/compiler/typecheck/ClsInst.hs
+++ b/compiler/typecheck/ClsInst.hs
@@ -60,7 +60,7 @@ data AssocInstInfo
-- Why scoped? See bind_me in
-- TcValidity.checkConsistentFamInst
, ai_inst_env :: VarEnv Type -- ^ Maps /class/ tyvars to their instance types
- -- See Note [Matching in the consistent-instantation check]
+ -- See Note [Matching in the consistent-instantiation check]
}
isNotAssociated :: AssocInstInfo -> Bool
diff --git a/compiler/typecheck/Constraint.hs b/compiler/typecheck/Constraint.hs
index 700c024a0d..657734370e 100644
--- a/compiler/typecheck/Constraint.hs
+++ b/compiler/typecheck/Constraint.hs
@@ -265,7 +265,7 @@ Example 1: (c Int), where c :: * -> Constraint. We can't do anything
Example 2: a ~ b, where a :: *, b :: k, where k is a kind variable
We don't want to use this to substitute 'b' for 'a', in case
- 'k' is subsequently unifed with (say) *->*, because then
+ 'k' is subsequently unified with (say) *->*, because then
we'd have ill-kinded types floating about. Rather we want
to defer using the equality altogether until 'k' get resolved.
@@ -453,7 +453,7 @@ tyCoVarsOfCts :: Cts -> TcTyCoVarSet
tyCoVarsOfCts = fvVarSet . tyCoFVsOfCts
-- | Returns free variables of a bag of constraints as a deterministically
--- odered list. See Note [Deterministic FV] in FV.
+-- ordered list. See Note [Deterministic FV] in FV.
tyCoVarsOfCtsList :: Cts -> [TcTyCoVar]
tyCoVarsOfCtsList = fvVarList . tyCoFVsOfCts
@@ -827,7 +827,7 @@ Note that
It's a bit of a special case, but it's easy to do. The runtime cost
is low because the unsolved set is usually empty anyway (errors
- aside), and the first non-imlicit-parameter will terminate the search.
+ aside), and the first non-implicit-parameter will terminate the search.
The special case is worth it (#11480, comment:2) because it
applies to CallStack constraints, which aren't type errors. If we have
@@ -1181,7 +1181,7 @@ convenient to detect it in the constraint solver:
forall a k (b::k). { wanted constraints }
* Having solved {wanted}, before discarding the now-solved implication,
- the costraint solver checks the dependency order of the skolem
+ the constraint solver checks the dependency order of the skolem
variables (ic_skols). This is done in setImplicationStatus.
* This check is only necessary if the implication was born from a
@@ -1196,7 +1196,7 @@ convenient to detect it in the constraint solver:
* Be careful /NOT/ to discard an implication with non-Nothing
ic_telescope, even if ic_wanted is empty. We must give the
- constraint solver a chance to make that bad-telesope test! Hence
+ constraint solver a chance to make that bad-telescope test! Hence
the extra guard in emitResidualTvConstraint; see #16247
See also TcHsType Note [Keeping scoped variables in order: Explicit]
diff --git a/compiler/typecheck/FunDeps.hs b/compiler/typecheck/FunDeps.hs
index 30c848a7d5..81c3ff4c7a 100644
--- a/compiler/typecheck/FunDeps.hs
+++ b/compiler/typecheck/FunDeps.hs
@@ -321,7 +321,7 @@ improveClsFD clas_tvs fd
--
-- But note (a) we get them from the dfun_id, so they are *in order*
-- because the kind variables may be mentioned in the
- -- type variabes' kinds
+ -- type variables' kinds
-- (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!
@@ -606,7 +606,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 #10675. Currenty it if the two
+The bogus aspect is discussed in #10675. Currently 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)
diff --git a/compiler/typecheck/Inst.hs b/compiler/typecheck/Inst.hs
index 4489482459..47d7ff68a9 100644
--- a/compiler/typecheck/Inst.hs
+++ b/compiler/typecheck/Inst.hs
@@ -262,7 +262,7 @@ deeply_instantiate :: CtOrigin
-> TCvSubst
-> TcSigmaType -> TcM (HsWrapper, TcRhoType)
-- Internal function to deeply instantiate that builds on an existing subst.
--- It extends the input substitution and applies the final subtitution to
+-- It extends the input substitution and applies the final substitution to
-- the types on return. See #12549.
deeply_instantiate orig subst ty
@@ -842,6 +842,6 @@ addClsInstsErr herald ispecs
addErr (hang herald 2 (pprInstances sorted))
where
sorted = sortWith getSrcLoc ispecs
- -- The sortWith just arranges that instances are dislayed in order
+ -- The sortWith just arranges that instances are displayed in order
-- of source location, which reduced wobbling in error messages,
-- and is better for users
diff --git a/compiler/typecheck/TcBackpack.hs b/compiler/typecheck/TcBackpack.hs
index 7373f4287f..29f5e616df 100644
--- a/compiler/typecheck/TcBackpack.hs
+++ b/compiler/typecheck/TcBackpack.hs
@@ -687,7 +687,7 @@ mergeSignatures
-- final test of the export list.)
tcg_rdr_env = rdr_env `plusGlobalRdrEnv` tcg_rdr_env orig_tcg_env,
-- Inherit imports from the local signature, so that module
- -- rexports are picked up correctly
+ -- reexports are picked up correctly
tcg_imports = tcg_imports orig_tcg_env,
tcg_exports = exports,
tcg_dus = usesOnly (availsToNameSetWithSelectors exports),
diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs
index 3bf4defe1c..74d6802150 100644
--- a/compiler/typecheck/TcBinds.hs
+++ b/compiler/typecheck/TcBinds.hs
@@ -144,7 +144,7 @@ up with a chain of identical values all hung onto by the CAF ff.
Etc.
-NOTE: a bit of arity anaysis would push the (f a d) inside the (\ys...),
+NOTE: a bit of arity analysis would push the (f a d) inside the (\ys...),
which would make the space leak go away in this case
Solution: when typechecking the RHSs we always have in hand the
@@ -355,7 +355,7 @@ tcLocalBinds (HsIPBinds x (IPBinds _ ip_binds)) thing_inside
tc_ip_bind _ (IPBind _ (Right {}) _) = panic "tc_ip_bind"
tc_ip_bind _ (XIPBind nec) = noExtCon nec
- -- Coerces a `t` into a dictionry for `IP "x" t`.
+ -- Coerces a `t` into a dictionary for `IP "x" t`.
-- co : t -> IP "x" t
toDict ipClass x ty = mkHsWrap $ mkWpCastR $
wrapIP $ mkClassPred ipClass [x,ty]
@@ -414,7 +414,7 @@ tcBindGroups :: TopLevelFlag -> TcSigFun -> TcPragEnv
-> TcM ([(RecFlag, LHsBinds GhcTcId)], thing)
-- Typecheck a whole lot of value bindings,
-- one strongly-connected component at a time
--- Here a "strongly connected component" has the strightforward
+-- Here a "strongly connected component" has the straightforward
-- meaning of a group of bindings that mention each other,
-- ignoring type signatures (that part comes later)
@@ -1146,7 +1146,7 @@ But now consider:
f x y = [x, y]
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
+So we make a test, one per partial signature, to check that the
explicitly-quantified type variables have not been unified together.
#14449 showed this up.
@@ -1544,7 +1544,7 @@ We typecheck pattern bindings as follows. First tcLhs does this:
Success => There was a type signature, so just use it,
checking compatibility with the expected type.
- Failure => No type sigature.
+ Failure => No type signature.
Infer case: (happens only outside any constructor pattern)
use a unification variable
at the outer level pc_lvl
diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index 9d2acfc9f7..f8bd367252 100644
--- a/compiler/typecheck/TcCanonical.hs
+++ b/compiler/typecheck/TcCanonical.hs
@@ -279,7 +279,7 @@ So here's the plan:
superclasses for canonical CDictCans in solveSimpleGivens or
solveSimpleWanteds; Note [Danger of adding superclasses during solving]
- However, /do/ continue to eagerly expand superlasses for new /given/
+ However, /do/ continue to eagerly expand superclasses for new /given/
/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
@@ -605,7 +605,7 @@ we have
f :: (forall a. a~b) => stuff
Now, potentially, the superclass machinery kicks in, in
-makeSuperClasses, giving us a a second quantified constrait
+makeSuperClasses, giving us a a second quantified constraint
(forall a. a ~# b)
BUT this is an unboxed value! And nothing has prepared us for
dictionary "functions" that are unboxed. Actually it does just
@@ -687,11 +687,11 @@ We implement two main extensions to the design in the paper:
Notice the 'm' in the head of the quantified constraint, not
a class.
- 2. We suport superclasses to quantified constraints.
+ 2. We support superclasses to quantified constraints.
For example (contrived):
f :: (Ord b, forall b. Ord b => Ord (m b)) => m a -> m a -> Bool
f x y = x==y
- Here we need (Eq (m a)); but the quantifed constraint deals only
+ Here we need (Eq (m a)); but the quantified constraint deals only
with Ord. But we can make it work by using its superclass.
Here are the moving parts
@@ -2295,7 +2295,7 @@ rewriteEvidence ev@(CtWanted { ctev_dest = dest
, ctev_nosh = si
, ctev_loc = loc }) new_pred co
= do { mb_new_ev <- newWanted_SI si loc new_pred
- -- The "_SI" varant ensures that we make a new Wanted
+ -- The "_SI" variant ensures that we make a new Wanted
-- with the same shadow-info as the existing one
-- with the same shadow-info as the existing one (#16735)
; MASSERT( tcCoercionRole co == ctEvRole ev )
@@ -2347,7 +2347,7 @@ rewriteEqEvidence old_ev swapped nlhs nrhs lhs_co rhs_co
| CtWanted { ctev_dest = dest, ctev_nosh = si } <- old_ev
= do { (new_ev, hole_co) <- newWantedEq_SI si loc' (ctEvRole old_ev) nlhs nrhs
- -- The "_SI" varant ensures that we make a new Wanted
+ -- The "_SI" variant ensures that we make a new Wanted
-- with the same shadow-info as the existing one (#16735)
; let co = maybeSym swapped $
mkSymCo lhs_co
diff --git a/compiler/typecheck/TcClassDcl.hs b/compiler/typecheck/TcClassDcl.hs
index f6abd5a0c7..fe93b785c1 100644
--- a/compiler/typecheck/TcClassDcl.hs
+++ b/compiler/typecheck/TcClassDcl.hs
@@ -226,7 +226,7 @@ tcDefMeth clas tyvars this_dict binds_in hs_sig_fn prag_fn
(sel_id, Just (dm_name, dm_spec))
| Just (L bind_loc dm_bind, bndr_loc, prags) <- findMethodBind sel_name binds_in prag_fn
= do { -- First look up the default method; it should be there!
- -- It can be the orinary default method
+ -- It can be the ordinary default method
-- or the generic-default method. E.g of the latter
-- class C a where
-- op :: a -> a -> Bool
diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs
index dac2251c9a..75332ec875 100644
--- a/compiler/typecheck/TcDeriv.hs
+++ b/compiler/typecheck/TcDeriv.hs
@@ -551,7 +551,7 @@ is ill-kinded nonsense (#16923).
To address both of these problems, GHC now uses this algorithm instead:
-1. Typecheck the `via` type and bring its boudn type variables into scope.
+1. Typecheck the `via` type and bring its bound type variables into scope.
2. Take the first class in the `deriving` clause.
3. Typecheck the class.
4. Move on to the next class and repeat the process until all classes have been
diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs
index 10c58d502e..962305124f 100644
--- a/compiler/typecheck/TcDerivInfer.hs
+++ b/compiler/typecheck/TcDerivInfer.hs
@@ -948,7 +948,7 @@ 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 #14933.
-Similarly for 'baz', givng the constraint C2
+Similarly for 'baz', giving the constraint C2
forall[2]. Eq (Maybe s) => (Ord a, Show a,
Maybe s -> Maybe s -> Bool
diff --git a/compiler/typecheck/TcEnv.hs b/compiler/typecheck/TcEnv.hs
index 5198ad6b0c..8749f98484 100644
--- a/compiler/typecheck/TcEnv.hs
+++ b/compiler/typecheck/TcEnv.hs
@@ -508,7 +508,7 @@ isTypeClosedLetBndr :: Id -> Bool
isTypeClosedLetBndr = noFreeVarsOfType . idType
tcExtendRecIds :: [(Name, TcId)] -> TcM a -> TcM a
--- Used for binding the recurive uses of Ids in a binding
+-- Used for binding the recursive uses of Ids in a binding
-- both top-level value bindings and nested let/where-bindings
-- Does not extend the TcBinderStack
tcExtendRecIds pairs thing_inside
@@ -819,7 +819,7 @@ topIdLvl :: Id -> ThLevel
-- E.g. this is bad:
-- x = [| foo |]
-- $( f x )
--- By the time we are prcessing the $(f x), the binding for "x"
+-- By the time we are processing the $(f x), the binding for "x"
-- will be in the global env, not the local one.
topIdLvl id | isLocalId id = outerLevel
| otherwise = impLevel
@@ -877,7 +877,7 @@ tcGetDefaultTys
{-
Note [Extended defaults]
~~~~~~~~~~~~~~~~~~~~~
-In interative mode (or with -XExtendedDefaultRules) we add () as the first type we
+In interactive mode (or with -XExtendedDefaultRules) we add () as the first type we
try when defaulting. This has very little real impact, except in the following case.
Consider:
Text.Printf.printf "hello"
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index 31b693b7e9..d531ced95f 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -227,7 +227,7 @@ report_unsolved type_errors expr_holes
, cec_suppress = insolubleWC wanted
-- See Note [Suppressing error messages]
-- Suppress low-priority errors if there
- -- are insolule errors anywhere;
+ -- are insoluble errors anywhere;
-- See #15539 and c.f. setting ic_status
-- in TcSimplify.setImplicationStatus
, cec_warn_redundant = warn_redundant
@@ -553,7 +553,7 @@ reportWanteds ctxt tc_lvl (WC { wc_simple = simples, wc_impl = implics })
env = cec_tidy ctxt
tidy_cts = bagToList (mapBag (tidyCt env) simples)
- -- report1: ones that should *not* be suppresed by
+ -- report1: ones that should *not* be suppressed by
-- an insoluble somewhere else in the tree
-- It's crucial that anything that is considered insoluble
-- (see TcRnTypes.insolubleCt) is caught here, otherwise
diff --git a/compiler/typecheck/TcGenDeriv.hs b/compiler/typecheck/TcGenDeriv.hs
index f7fbb02aa6..ff58da474d 100644
--- a/compiler/typecheck/TcGenDeriv.hs
+++ b/compiler/typecheck/TcGenDeriv.hs
@@ -515,7 +515,7 @@ unliftedOrdOp ty op a b
b_expr = nlHsVar b
unliftedCompare :: RdrName -> RdrName
- -> LHsExpr GhcPs -> LHsExpr GhcPs -- What to cmpare
+ -> LHsExpr GhcPs -> LHsExpr GhcPs -- What to compare
-> LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
-- Three results
-> LHsExpr GhcPs
diff --git a/compiler/typecheck/TcGenFunctor.hs b/compiler/typecheck/TcGenFunctor.hs
index 19cd9d903a..2f03cd0950 100644
--- a/compiler/typecheck/TcGenFunctor.hs
+++ b/compiler/typecheck/TcGenFunctor.hs
@@ -511,7 +511,7 @@ mkSimpleConMatch2 ctxt fold extra_pats con insides = do
vars_needed = takeList insides as_RDRs
pat = nlConVarPat con_name vars_needed
-- Make sure to zip BEFORE invoking catMaybes. We want the variable
- -- indicies in each expression to match up with the argument indices
+ -- indices in each expression to match up with the argument indices
-- in con_expr (defined below).
exps = catMaybes $ zipWith (\i v -> (`nlHsApp` nlHsVar v) <$> i)
insides vars_needed
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs
index 8b5ee9c0bd..0729b81df6 100644
--- a/compiler/typecheck/TcHsSyn.hs
+++ b/compiler/typecheck/TcHsSyn.hs
@@ -226,7 +226,7 @@ data ZonkEnv -- See Note [The ZonkEnv]
binding site.
Unlike ze_tv_env, it is knot-tied: see extendIdZonkEnvRec.
- In a mutually recusive group
+ In a mutually recursive group
rec { f = ...g...; g = ...f... }
we want the occurrence of g to point to the one zonked Id for g,
and the same for f.
@@ -258,9 +258,9 @@ There are three possibilities:
* DefaultFlexi: this is the common case, in situations like
length @alpha ([] @alpha)
It really doesn't matter what type we choose for alpha. But
- we must choose a type! We can't leae mutable unification
+ we must choose a type! We can't leave mutable unification
variables floating around: after typecheck is complete, every
- type variable occurrence must have a bindign site.
+ type variable occurrence must have a binding site.
So we default it to 'Any' of the right kind.
@@ -277,7 +277,7 @@ There are three possibilities:
-}
data ZonkFlexi -- See Note [Un-unified unification variables]
- = DefaultFlexi -- Default unbound unificaiton variables to Any
+ = DefaultFlexi -- Default unbound unification variables to Any
| SkolemiseFlexi -- Skolemise unbound unification variables
-- See Note [Zonking the LHS of a RULE]
| RuntimeUnkFlexi -- Used in the GHCi debugger
@@ -1760,7 +1760,7 @@ Solution: (see #15552 for other variants)
But the code implements something a bit better
* ZonkEnv contains ze_meta_tv_env, which maps
- from a MetaTyVar (unificaion variable)
+ from a MetaTyVar (unification variable)
to a Type (not a TcType)
* In zonkTyVarOcc, we check this map to see if we have zonked
diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs
index 61980788cd..274fd3998d 100644
--- a/compiler/typecheck/TcHsType.hs
+++ b/compiler/typecheck/TcHsType.hs
@@ -265,7 +265,7 @@ tc_hs_sig_type :: SkolemInfo -> LHsSigType GhcRn
-- Kind-checks/desugars an 'LHsSigType',
-- solve equalities,
-- and then kind-generalizes.
--- This will never emit constraints, as it uses solveEqualities interally.
+-- This will never emit constraints, as it uses solveEqualities internally.
-- No validity checking or zonking
-- Returns also a Bool indicating whether the type induced an insoluble constraint;
-- True <=> constraint is insoluble
@@ -1170,7 +1170,7 @@ tcInferApps_nosat mode orig_hs_ty fun orig_hs_args
(HsTypeArg _ ki_arg : _, Nothing) -> try_again_after_substing_or $
ty_app_err ki_arg substed_fun_ki
- ---------------- HsValArg: a nomal argument (fun ty)
+ ---------------- HsValArg: a normal argument (fun ty)
(HsValArg arg : args, Just (ki_binder, inner_ki))
-- next binder is invisible; need to instantiate it
| isInvisibleBinder ki_binder -- FunTy with InvisArg on LHS;
@@ -2446,7 +2446,7 @@ This should not kind-check. Polymorphic recursion is known to
be a tough nut.
Previously, we laboriously (with help from the renamer)
-tried to give T the polymoprhic kind
+tried to give T the polymorphic kind
T :: forall ka -> ka -> kappa -> Type
where kappa is a unification variable, even in the inferInitialKinds
phase (which is what kcInferDeclHeader is all about). But
@@ -3041,7 +3041,7 @@ checkClassKindSig kind = checkTc (tcIsConstraintKind kind) err_msg
text "unobscured by type families"
tcbVisibilities :: TyCon -> [Type] -> [TyConBndrVis]
--- Result is in 1-1 correpondence with orig_args
+-- Result is in 1-1 correspondence with orig_args
tcbVisibilities tc orig_args
= go (tyConKind tc) init_subst orig_args
where
@@ -3192,7 +3192,7 @@ tcPartialContext hs_theta
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See also Note [Recipe for checking a signature]
-When we have a parital signature like
+When we have a partial signature like
f,g :: forall a. a -> _
we do the following
@@ -3204,7 +3204,7 @@ we do the following
call tchsPartialSig (defined near this Note). It kind-checks the
LHsSigWcType, creating fresh unification variables for each "_"
wildcard. It's important that the wildcards for f and g are distinct
- becase they migh get instantiated completely differently. E.g.
+ because they might get instantiated completely differently. E.g.
f,g :: forall a. a -> _
f x = a
g x = True
@@ -3247,7 +3247,7 @@ more. So I use a HACK:
TcBinds.chooseInferredQuantifiers. This is ill-kinded because
ordinary tuples can't contain constraints, but it works fine. And for
ordinary tuples we don't have the same limit as for constraint
- tuples (which need selectors and an assocated class).
+ tuples (which need selectors and an associated class).
* Because it is ill-kinded, it trips an assert in writeMetaTyVar,
so now I disable the assertion if we are writing a type of
diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs
index 822c557153..30a2816d76 100644
--- a/compiler/typecheck/TcInstDcls.hs
+++ b/compiler/typecheck/TcInstDcls.hs
@@ -922,11 +922,11 @@ except that we'll eta-reduce the axiom to
axiom AxDrep forall a b. D [(a,b]] = Drep a b
There are several fiddly subtleties lurking here
-* The representation tycon Drep is parameerised over the free
+* The representation tycon Drep is parameterised over the free
variables of the pattern, in no particular order. So there is no
guarantee that 'p' and 'q' will come last in Drep's parameters, and
in the right order. So, if the /patterns/ of the family insatance
- are eta-redcible, we re-order Drep's parameters to put the
+ are eta-reducible, we re-order Drep's parameters to put the
eta-reduced type variables last.
* Although we eta-reduce the axiom, we eta-/expand/ the representation
@@ -941,7 +941,7 @@ There are several fiddly subtleties lurking here
So in type-checking the LHS (DP Int) we need to check that it is
more polymorphic than the signature. To do that we must skolemise
- the siganture and istantiate the call of DP. So we end up with
+ the signature and instantiate the call of DP. So we end up with
data instance DP [b] @(k1,k2) (z :: (k1,k2)) where
Note that we must parameterise the representation tycon DPrep over
@@ -978,7 +978,7 @@ There are several fiddly subtleties lurking here
tricky to sort out. Consider
data family D k :: k
Then consider D (forall k2. k2 -> k2) Type Type
- The visibilty flags on an application of D may affected by the arguments
+ The visibility flags on an application of D may affected by the arguments
themselves. Heavy sigh. But not truly hard; that's what tcbVisibilities
does.
@@ -1443,7 +1443,7 @@ NB2: the silent-superclass solution introduced new problems
NB3: the silent-superclass solution also generated tons of
extra dictionaries. For example, in monad-transformer
code, when constructing a Monad dictionary you had to pass
- an Applicative dictionary; and to construct that you neede
+ an Applicative dictionary; and to construct that you need
a Functor dictionary. Yet these extra dictionaries were
often never used. Test T3064 compiled *far* faster after
silent superclasses were eliminated.
diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index a2aa82e51b..2383f22480 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -74,7 +74,7 @@ Note [Basic Simplifier Plan]
- canonicalization
- inert reactions
- spontaneous reactions
- - top-level intreactions
+ - top-level interactions
Each stage returns a StopOrContinue and may have sideffected
the inerts or worklist.
@@ -685,7 +685,7 @@ once had done). This problem can be tickled by typecheck/should_compile/holes.
interactIrred :: InertCans -> Ct -> TcS (StopOrContinue Ct)
interactIrred inerts workItem@(CIrredCan { cc_ev = ev_w, cc_insol = insoluble })
- | insoluble -- For insolubles, don't allow the constaint to be dropped
+ | insoluble -- For insolubles, don't allow the constraint to be dropped
-- which can happen with solveOneFromTheOther, so that
-- we get distinct error messages with -fdefer-type-errors
-- See Note [Do not add duplicate derived insolubles]
@@ -996,7 +996,7 @@ Note that:
* The CtEvidence is the goal to be solved
-* The MaybeT anages early failure if we find a subgoal that
+* The MaybeT manages early failure if we find a subgoal that
cannot be solved from instances.
* The (EvBindMap, DictMap CtEvidence) is an accumulating purely-functional
@@ -1448,7 +1448,7 @@ gives rise to
[W] F Int b ~ Bool
from which we can derive b. This requires looking at the defining equations of
a type family, ie. finding equation with a matching RHS (Bool in this example)
-and infering values of type variables (b in this example) from the LHS patterns
+and inferring values of type variables (b in this example) from the LHS patterns
of the matching equation. For closed type families we have to perform
additional apartness check for the selected equation to check that the selected
is guaranteed to fire for given LHS arguments.
@@ -1506,7 +1506,7 @@ Notice the orientation (xi_w ~ xi_i) NOT (xi_i ~ xi_w):
new_work :: xi_w ~ xi_i
cw := ci ; sym new_work
Why? Consider the simplest case when xi1 is a type variable. If
-we generate xi1~xi2, porcessing that constraint will kick out 'ci'.
+we generate xi1~xi2, processing that constraint will kick out 'ci'.
If we generate xi2~xi1, there is less chance of that happening.
Of course it can and should still happen if xi1=a, xi1=Int, say.
But we want to avoid it happening needlessly.
@@ -2202,7 +2202,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 (#12522). Suppse we have
+arising from injectivity improvement (#12522). Suppose we have
type family F x = t | t -> x
type instance F (a, Int) = (Int, G a)
where G is injective; and wanted constraints
@@ -2495,7 +2495,7 @@ Example, from the OutsideIn(X) paper:
g :: forall a. Q [a] => [a] -> Int
g x = wob x
-From 'g' we get the impliation constraint:
+From 'g' we get the implication constraint:
forall a. Q [a] => (Q [beta], R beta [a])
If we react (Q [beta]) with its top-level axiom, we end up with a
(P beta), which we have no way of discharging. On the other hand,
diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs
index 3bbea7404c..753a2d6642 100644
--- a/compiler/typecheck/TcMType.hs
+++ b/compiler/typecheck/TcMType.hs
@@ -1089,7 +1089,7 @@ E.g. In the type T k (a::k)
We gather these variables using a CandidatesQTvs record:
DV { dv_kvs: Variables free in the kind of a free type variable
or of a forall-bound type variable
- , dv_tvs: Variables sytactically free in the type }
+ , dv_tvs: Variables syntactically free in the type }
So: dv_kvs are the kind variables of the type
(dv_tvs - dv_kvs) are the type variable of the type
@@ -1326,11 +1326,11 @@ collect_cand_qtvs orig_ty is_dep bound dvs ty
-----------------
go_tv dv@(DV { dv_kvs = kvs, dv_tvs = tvs }) tv
| tv `elemDVarSet` kvs
- = return dv -- We have met this tyvar aleady
+ = return dv -- We have met this tyvar already
| not is_dep
, tv `elemDVarSet` tvs
- = return dv -- We have met this tyvar aleady
+ = return dv -- We have met this tyvar already
| otherwise
= do { tv_kind <- zonkTcType (tyVarKind tv)
@@ -1585,7 +1585,7 @@ quantifyTyVars dvs@(DV{ dv_kvs = dep_tkvs, dv_tvs = nondep_tkvs })
; let dep_kvs = scopedSort $ dVarSetElems dep_tkvs
-- scopedSort: put the kind variables into
-- well-scoped order.
- -- E.g. [k, (a::k)] not the other way roud
+ -- E.g. [k, (a::k)] not the other way round
nondep_tvs = dVarSetElems (nondep_tkvs `minusDVarSet` dep_tkvs)
-- See Note [Dependent type variables]
@@ -1737,7 +1737,7 @@ defaultTyVar default_kind tv
-- promote, skolemise, or zap-to-Any, to satisfy TcHsType
-- Note [Recipe for checking a signature]
-- Otherwise we get level-number assertion failures. It doesn't matter much
- -- because we are in an error siutation anyway.
+ -- because we are in an error situation anyway.
; return False
}
where
diff --git a/compiler/typecheck/TcMatches.hs b/compiler/typecheck/TcMatches.hs
index e9badf24b4..96772f5dc0 100644
--- a/compiler/typecheck/TcMatches.hs
+++ b/compiler/typecheck/TcMatches.hs
@@ -375,7 +375,7 @@ tcStmtsAndThen ctxt stmt_chk (L loc (LetStmt x (L l binds)) : stmts)
-- Don't set the error context for an ApplicativeStmt. It ought to be
-- possible to do this with a popErrCtxt in the tcStmt case for
--- ApplicativeStmt, but it did someting strange and broke a test (ado002).
+-- ApplicativeStmt, but it did something strange and broke a test (ado002).
tcStmtsAndThen ctxt stmt_chk (L loc stmt : stmts) res_ty thing_inside
| ApplicativeStmt{} <- stmt
= do { (stmt', (stmts', thing)) <-
@@ -691,7 +691,7 @@ tcMcStmt ctxt (TransStmt { trS_stmts = stmts, trS_bndrs = bindersMap
; using' <- tcPolyExpr using using_poly_ty
; let final_using = fmap (mkHsWrap (WpTyApp tup_ty)) using'
- --------------- Bulding the bindersMap ----------------
+ --------------- Building the bindersMap ----------------
; let mk_n_bndr :: Name -> TcId -> TcId
mk_n_bndr n_bndr_name bndr_id = mkLocalId n_bndr_name (n_app (idType bndr_id))
diff --git a/compiler/typecheck/TcPatSyn.hs b/compiler/typecheck/TcPatSyn.hs
index 6984d06907..06733d8f4d 100644
--- a/compiler/typecheck/TcPatSyn.hs
+++ b/compiler/typecheck/TcPatSyn.hs
@@ -171,7 +171,7 @@ tcInferPatSynDecl (PSB { psb_id = lname@(L _ name), psb_args = details
= unzip (mapMaybe mkProvEvidence filtered_prov_dicts)
req_theta = map evVarPred req_dicts
- -- Report coercions that esacpe
+ -- Report coercions that escape
-- See Note [Coercions that escape]
; args <- mapM zonkId args
; let bad_args = [ (arg, bad_cos) | arg <- args ++ prov_dicts
@@ -312,7 +312,7 @@ See also Note [Lift equality constraints when quantifying] in TcType
Note [Coercions that escape]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#14507 showed an example where the inferred type of the matcher
-for the pattern synonym was somethign like
+for the pattern synonym was something like
$mSO :: forall (r :: TYPE rep) kk (a :: k).
TypeRep k a
-> ((Bool ~ k) => TypeRep Bool (a |> co_a2sv) -> r)
@@ -1037,7 +1037,7 @@ We can't always do this:
Note [Redundant constraints for builder]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The builder can have redundant constraints, which are awkard to eliminate.
+The builder can have redundant constraints, which are awkward to eliminate.
Consider
pattern P = Just 34
To match against this pattern we need (Eq a, Num a). But to build
@@ -1074,7 +1074,7 @@ In tc{Infer/Check}PatSynDecl we will check that the pattern has the
specified type. We check the pattern *as a pattern*, so the type
signature is a pattern signature, and so brings 'a' and 'b' into
scope. But we don't have a way to bind 'a, b' in the LHS, as we do
-'x', say. Nevertheless, the sigature may be useful to constrain
+'x', say. Nevertheless, the signature may be useful to constrain
the type.
When making the binding for the *builder*, though, we don't want
diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs
index dabe3ff612..9df6b3cda4 100644
--- a/compiler/typecheck/TcRnDriver.hs
+++ b/compiler/typecheck/TcRnDriver.hs
@@ -1197,7 +1197,7 @@ checkBootTyCon is_boot tc1 tc2
-- It would have been best if this was purely a question of defaults
-- (i.e., a user could explicitly ask for one behavior or another) but
-- the current role system isn't expressive enough to do this.
- -- Having explict proj-roles would solve this problem.
+ -- Having explicit proj-roles would solve this problem.
rolesSubtypeOf [] [] = True
-- NB: this relation is the OPPOSITE of the subroling relation
@@ -2165,7 +2165,7 @@ two redundant type-error warnings, one from each plan.
#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 #14963.
+detailed discussion in #14963.
The interactively issued declarations, statements, as well as the modules
loaded into GHCi, are not affected. That means, for declaration, you could
@@ -2782,7 +2782,7 @@ ppr_types debug type_env
_ -> False
-- Data cons (workers and wrappers), pattern synonyms,
-- etc are suppressed (unless -dppr-debug),
- -- because they appear elsehwere
+ -- because they appear elsewhere
ppr_sig id = hang (ppr id <+> dcolon) 2 (ppr (tidyTopType (idType id)))
diff --git a/compiler/typecheck/TcRnMonad.hs b/compiler/typecheck/TcRnMonad.hs
index abc9c02eec..e7e7e6efc4 100644
--- a/compiler/typecheck/TcRnMonad.hs
+++ b/compiler/typecheck/TcRnMonad.hs
@@ -12,7 +12,7 @@ Functions for working with the typechecker environment (setters, getters...).
module TcRnMonad(
- -- * Initalisation
+ -- * Initialisation
initTc, initTcWithGbl, initTcInteractive, initTcRnIf,
-- * Simple accessors
@@ -1206,7 +1206,7 @@ mapAndRecoverM f xs
-- | Apply the function to all elements on the input list
-- If all succeed, return the list of results
--- Othewise fail, propagating all errors
+-- Otherwise fail, propagating all errors
mapAndReportM :: (a -> TcRn b) -> [a] -> TcRn [b]
mapAndReportM f xs
= do { mb_rs <- mapM (attemptM . f) xs
@@ -1255,7 +1255,7 @@ tryTcDiscardingErrs recover thing_inside
; case mb_res of
Just res | not (errorsFound dflags msgs)
, not (insolubleWC lie)
- -> -- 'main' succeeed with no errors
+ -> -- 'main' succeeded with no errors
do { addMessages msgs -- msgs might still have warnings
; emitConstraints lie
; return res }
@@ -1705,8 +1705,8 @@ constraints might be "variable out of scope" Hole constraints, and that
might have been the actual original cause of the exception! For
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).
+Here 'p' is out of scope, so we get an insoluble Hole constraint. But
+the visible type application fails in the monad (throws an exception).
We must not discard the out-of-scope error.
So we /retain the insoluble constraints/ if there is an exception.
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index 20f6133206..49df7a909a 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -1180,7 +1180,7 @@ Here's the invariant:
If an Id has ClosedTypeId=True (in its IdBindingInfo), then
the Id's type is /definitely/ closed (has no free type variables).
Specifically,
- a) The Id's acutal type is closed (has no free tyvars)
+ a) The Id's actual type is closed (has no free tyvars)
b) Either the Id has a (closed) user-supplied type signature
or all its free variables are Global/ClosedLet
or NonClosedLet with ClosedTypeId=True.
@@ -1519,7 +1519,7 @@ data TcIdSigInst
--
-- NB: The order of sig_inst_skols is irrelevant
-- for a CompleteSig, but for a PartialSig see
- -- Note [Quantified varaibles in partial type signatures]
+ -- Note [Quantified variables in partial type signatures]
, sig_inst_theta :: TcThetaType
-- Instantiated theta. In the case of a
@@ -1550,7 +1550,7 @@ if the original function had a signature like
But that's ok: tcMatchesFun (called by tcRhs) can deal with that
It happens, too! See Note [Polymorphic methods] in TcClassDcl.
-Note [Quantified varaibles in partial type signatures]
+Note [Quantified variables in partial type signatures]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider
f :: forall a b. _ -> a -> _ -> b
diff --git a/compiler/typecheck/TcSMonad.hs b/compiler/typecheck/TcSMonad.hs
index 48de0f7549..411a1c7e6e 100644
--- a/compiler/typecheck/TcSMonad.hs
+++ b/compiler/typecheck/TcSMonad.hs
@@ -515,7 +515,7 @@ VERY IMPORTANT INVARIANT:
constraint led to the ability to define unsafeCoerce
in #17267.
- - Exception 2: the magic built-in instace for (~) has no
+ - Exception 2: the magic built-in instance for (~) has no
such guarantee. It behaves as if we had
class (a ~# b) => (a ~ b) where {}
instance (a ~# b) => (a ~ b) where {}
@@ -707,7 +707,7 @@ data InertCans -- See Note [Detailed InertCans Invariants] for more
, inert_funeqs :: FunEqMap Ct
-- All CFunEqCans; index is the whole family head type.
- -- All Nominal (that's an invarint of all CFunEqCans)
+ -- All Nominal (that's an invariant of all CFunEqCans)
-- LHS is fully rewritten (modulo eqCanRewrite constraints)
-- wrt inert_eqs
-- Can include all flavours, [G], [W], [WD], [D]
@@ -776,7 +776,7 @@ Note [EqualCtList invariants]
From the fourth invariant it follows that the list is
- A single [G], or
- - Zero or one [D] or [WD], followd by any number of [W]
+ - Zero or one [D] or [WD], followed by any number of [W]
The Wanteds can't rewrite anything which is why we put them last
@@ -791,7 +791,7 @@ live in three places
the InertCans. They can be [G], [W], [WD], or [D].
* The inert_flat_cache. This is used when flattening, to get maximal
- sharing. Everthing in the inert_flat_cache is [G] or [WD]
+ sharing. Everything in the inert_flat_cache is [G] or [WD]
It contains lots of things that are still in the work-list.
E.g Suppose we have (w1: F (G a) ~ Int), and (w2: H (G a) ~ Int) in the
@@ -1854,7 +1854,7 @@ Givens, to give as informative an error messasge as possible
(#12468, #11325).
Hence:
- * In the main simlifier loops in TcSimplify (solveWanteds,
+ * In the main simplifier loops in TcSimplify (solveWanteds,
simpl_loop), we feed the insolubles in solveSimpleWanteds,
so that they get rewritten (albeit not solved).
@@ -2114,7 +2114,7 @@ getNoGivenEqs tclvl skol_tvs
where
eqs_given_here :: EqualCtList -> Bool
eqs_given_here [ct@(CTyEqCan { cc_tyvar = tv })]
- -- Givens are always a sigleton
+ -- Givens are always a singleton
= not (skolem_bound_here tv) && ct_given_here ct
eqs_given_here _ = False
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index 37015b30bc..ddd53145ca 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -181,7 +181,7 @@ type, with a cascade of follow-up errors.
For example polykinds/T12593, T15577, and many others.
Take care to ensure that you emit the insoluble constraints before
-failing, because they are what will ulimately lead to the error
+failing, because they are what will ultimately lead to the error
messsage!
-}
@@ -1064,7 +1064,7 @@ decideMonoTyVars :: InferMode
-- (a) Free in the environment
-- (b) Mentioned in a constraint we can't generalise
-- (c) Connected by an equality to (a) or (b)
--- Also return CoVars that appear free in the final quatified types
+-- Also return CoVars that appear free in the final quantified types
-- we can't quantify over these, and we must make sure they are in scope
decideMonoTyVars infer_mode name_taus psigs candidates
= do { (no_quant, maybe_quant) <- pick infer_mode candidates
@@ -1907,7 +1907,7 @@ generate evidence bindings for Givens. E.g.
f x y = ...
We'll have
[G] d1 :: (a~b)
-and we'll specuatively generate the evidence binding
+and we'll speculatively generate the evidence binding
[G] d2 :: (a ~# b) = sc_sel d
Now d2 is available for solving. But it may not be needed! Usually
@@ -1917,7 +1917,7 @@ code, but:
* 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
+ and we can't (in general) drop that case expression in case
d1 is bottom. So it's technically unsound to have added it
in the first place.
@@ -2057,7 +2057,7 @@ of progress. #8474 is a classic example:
via solveNestedImplications, because we'll just get the
same [D] again
- * If we *do* re-solve, we'll get an ininite loop. It is cut off by
+ * If we *do* re-solve, we'll get an infinite loop. It is cut off by
the fixed bound of 10, but solving the next takes 10*10*...*10 (ie
exponentially many) iterations!
@@ -2160,7 +2160,7 @@ to applyDefaultingRules) to extract constraints that that might be defaulted.
There is one caveat:
-1. When infering most-general types (in simplifyInfer), we do *not*
+1. When inferring most-general types (in simplifyInfer), we do *not*
float anything out if the implication binds equality constraints,
because that defeats the OutsideIn story. Consider
data T a where
diff --git a/compiler/typecheck/TcSplice.hs b/compiler/typecheck/TcSplice.hs
index 051c87da44..b23314adb0 100644
--- a/compiler/typecheck/TcSplice.hs
+++ b/compiler/typecheck/TcSplice.hs
@@ -492,7 +492,7 @@ When a variable is used, we compare
For example:
f = ...
g1 = $(map ...) is OK
- g2 = $(f ...) is not OK; because we havn't compiled f yet
+ g2 = $(f ...) is not OK; because we haven't compiled f yet
Note [Typechecking Overloaded Quotes]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -924,7 +924,7 @@ runMeta' show_code ppr_hs run_and_convert expr
-- including, say, a pattern-match exception in the code we are running
--
-- We also do the TH -> HS syntax conversion inside the same
- -- exception-cacthing thing so that if there are any lurking
+ -- exception-catching thing so that if there are any lurking
-- exceptions in the data structure returned by hval, we'll
-- encounter them inside the try
--
@@ -1033,7 +1033,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 (#8987):
+ will trigger panic (#8987):
$(fail undefined)
See also Note [Concealed TH exceptions]
diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs
index 9554ef911d..d4cc7eea71 100644
--- a/compiler/typecheck/TcTyClsDecls.hs
+++ b/compiler/typecheck/TcTyClsDecls.hs
@@ -462,7 +462,7 @@ We do the following steps:
TcTyCons, again overriding the promotion-error bindings.
But note that the data constructor promotion errors are still in place
- so that (in our example) a use of MkB will sitll be signalled as
+ so that (in our example) a use of MkB will still be signalled as
an error.
4. Typecheck the decls.
@@ -593,7 +593,7 @@ generaliseTcTyCon tc
-- Running example in Note [Inferring kinds for type declarations]
-- spec_req_prs = [ ("k1",kk1), ("a", (aa::kk1))
-- , ("k2",kk2), ("x", (xx::kk2))]
- -- where "k1" dnotes the Name k1, and kk1, aa, etc are MetaTyVars,
+ -- where "k1" denotes the Name k1, and kk1, aa, etc are MetaTyVars,
-- specifically TyVarTvs
-- Step 0: zonk and skolemise the Specified and Required binders
@@ -837,7 +837,7 @@ We do kind inference as follows:
* Step 1: inferInitialKinds, and in particular kcInferDeclHeader.
Make a unification variable for each of the Required and Specified
- type varialbes in the header.
+ type variables in the header.
Record the connection between the Names the user wrote and the
fresh unification variables in the tcTyConScopedTyVars field
@@ -862,7 +862,7 @@ We do kind inference as follows:
S :: kk3 -> * -> kk4 -> *
* Step 2: kcTyClDecl. Extend the environment with a TcTyCon for S and
- T, with these monomophic kinds. Now kind-check the declarations,
+ T, with these monomorphic kinds. Now kind-check the declarations,
and solve the resulting equalities. The goal here is to discover
constraints on all these unification variables.
@@ -1468,7 +1468,7 @@ I am a bit concerned about tycons with a declaration like
It does not have a CUSK, so kcInferDeclHeader will make a TcTyCon
with tyConResKind of Type -> forall k. k -> Type. Even that is fine:
the splitPiTys will look past the forall. But I'm bothered about
-what if the type "in the corner" metions k? This is incredibly
+what if the type "in the corner" mentions k? This is incredibly
obscure but something like this could be bad:
data T a :: Type -> foral k. k -> TYPE (F k) where ...
@@ -2304,7 +2304,7 @@ tcDataDefn err_ctxt
--
-- Note that this is only a property that data type declarations possess,
-- so one could not have, say, a data family instance in an hsig file that
- -- has kind `Bool`. Therfore, this check need only occur in the code that
+ -- has kind `Bool`. Therefore, this check need only occur in the code that
-- typechecks data type declarations.
mk_permissive_kind HsigFile [] = True
mk_permissive_kind _ _ = False
@@ -2355,7 +2355,7 @@ kcTyFamInstEqn tc_fam_tc
-- type family Bar x y where
-- Bar (x :: a) (y :: b) = Int
-- Bar (x :: c) (y :: d) = Bool
- -- During kind-checkig, a,b,c,d should be TyVarTvs and unify appropriately
+ -- During kind-checking, a,b,c,d should be TyVarTvs and unify appropriately
}
where
vis_arity = length (tyConVisibleTyVars tc_fam_tc)
@@ -2445,10 +2445,10 @@ instances are not invoked directly in Haskell source code,
so visible type application etc plays no role.
So, the simple thing is
- - gather candiates from [k, a, b] and pats
+ - gather candidates from [k, a, b] and pats
- quantify over them
-Hence the sligtly mysterious call:
+Hence the slightly mysterious call:
candidateQTyVarsOfTypes (pats ++ mkTyVarTys scoped_tvs)
Simple, neat, but a little non-obvious!
@@ -3371,7 +3371,7 @@ Some notes:
This is really bogus; now we have in scope a Class that is invalid
in some way, with unknown downstream consequences. A better
- alterantive might be to make a fake class TyCon. A job for another day.
+ alternative might be to make a fake class TyCon. A job for another day.
-}
-------------------------
@@ -3967,7 +3967,7 @@ For instance, in the Enum class declaration:
The default implementation for enum only works for types that are instances of
Generic, and for which their generic Rep type is an instance of GEnum. But
clearly enum doesn't _have_ to use this implementation, so naturally, the
-context for enum is allowed to be different to accomodate this. As a result,
+context for enum is allowed to be different to accommodate this. As a result,
when we validity-check default type signatures, we ignore contexts completely.
Note that when checking whether two type signatures match, we must take care to
diff --git a/compiler/typecheck/TcTyDecls.hs b/compiler/typecheck/TcTyDecls.hs
index c7bcfbe068..e5df9daff8 100644
--- a/compiler/typecheck/TcTyDecls.hs
+++ b/compiler/typecheck/TcTyDecls.hs
@@ -789,7 +789,7 @@ mkDefaultMethodType cls _ (GenericDM dm_ty) = mkSigmaTy tv_bndrs [pred] dm_ty
-- we need the correct visibility: these default methods are
-- 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
+ -- then typechecked. So we need the right visibility info
-- (#13998)
{-
@@ -1026,6 +1026,6 @@ The selector we want for fld looks like this:
T1 (x::b) -> x
The scrutinee of the case has type :R7T (Maybe b), which can be
-gotten by appying the eq_spec to the univ_tvs of the data con.
+gotten by applying the eq_spec to the univ_tvs of the data con.
-}
diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs
index cd2cb7c725..0ae70e8c1e 100644
--- a/compiler/typecheck/TcType.hs
+++ b/compiler/typecheck/TcType.hs
@@ -120,14 +120,14 @@ module TcType (
tcSplitIOType_maybe, -- :: Type -> Maybe Type
--------------------------------
- -- Rexported from Kind
+ -- Reexported from Kind
Kind, tcTypeKind,
liftedTypeKind,
constraintKind,
isLiftedTypeKind, isUnliftedTypeKind, classifiesTypeWithValues,
--------------------------------
- -- Rexported from Type
+ -- Reexported from Type
Type, PredType, ThetaType, TyCoBinder,
ArgFlag(..), AnonArgFlag(..), ForallVisFlag(..),
@@ -298,7 +298,7 @@ reasons:
and kinds generated by TcHsType.
- The pattern-match overlap checker calls the constraint solver,
- long afer TcTyVars have been zonked away
+ long after TcTyVars have been zonked away
It's convenient to simply treat these TyVars as skolem constants,
which of course they are. We give them a level number of "outermost",
@@ -458,7 +458,7 @@ why Var.hs shouldn't actually have the definition, but it "belongs" here.
Note [Signature skolems]
~~~~~~~~~~~~~~~~~~~~~~~~
-A TyVarTv is a specialised variant of TauTv, with the following invarints:
+A TyVarTv is a specialised variant of TauTv, with the following invariants:
* A TyVarTv can be unified only with a TyVar,
not with any other type
@@ -553,7 +553,7 @@ data MetaInfo
-- See Note [The flattening story] in TcFlatten
| FlatSkolTv -- A flatten skolem tyvar
- -- Just like FlatMetaTv, but is comletely "owned" by
+ -- Just like FlatMetaTv, but is completely "owned" by
-- its Given CFunEqCan.
-- It is filled in /only/ by unflattenGivens
-- See Note [The flattening story] in TcFlatten
diff --git a/compiler/typecheck/TcUnify.hs b/compiler/typecheck/TcUnify.hs
index 9f9e69850d..af83536f00 100644
--- a/compiler/typecheck/TcUnify.hs
+++ b/compiler/typecheck/TcUnify.hs
@@ -960,7 +960,7 @@ ir_inst = False: do not instantiate
(let { f :: forall a. a -> a; f x = x } in f) @Int
We'll call TcExpr.tcInferFun to infer the type of the (let .. in f)
- And we don't want to instantite the type of 'f' when we reach it,
+ And we don't want to instantiate the type of 'f' when we reach it,
else the outer visible type application won't work
2. :type +v. When we say
@@ -1137,7 +1137,7 @@ tcSkolemise ctxt expected_ty thing_inside
text "given" <+> ppr given,
text "inst type" <+> ppr rho' ]
- -- Generally we must check that the "forall_tvs" havn't been constrained
+ -- Generally we must check that the "forall_tvs" haven't been constrained
-- The interesting bit here is that we must include the free variables
-- of the expected_ty. Here's an example:
-- runST (newVar True)
@@ -2152,7 +2152,7 @@ This is legal; e.g. dependent/should_compile/T11635.
We don't want to reject it because of the forall in beta's kind,
but (see Note [Occurrence checking: look inside kinds]) we do
need to look in beta's kind. So we carry a flag saying if a 'forall'
-is OK, and sitch the flag on when stepping inside a kind.
+is OK, and switch the flag on when stepping inside a kind.
Why is it OK? Why does it not count as impredicative polymorphism?
The reason foralls are bad is because we reply on "seeing" foralls
diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index 8942956c67..990c86ee6f 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -130,7 +130,7 @@ unambiguous. See Note [Impedance matching] in TcBinds.
This test is very conveniently implemented by calling
tcSubType <type> <type>
-This neatly takes account of the functional dependecy stuff above,
+This neatly takes account of the functional dependency stuff above,
and implicit parameter (see Note [Implicit parameters and ambiguity]).
And this is what checkAmbiguity does.
@@ -170,7 +170,7 @@ In fact, because of the co/contra-variance implemented in tcSubType,
this *does* catch function f above. too.
Concerning (a) the ambiguity check is only used for *user* types, not
-for types coming from inteface files. The latter can legitimately
+for types coming from interface files. The latter can legitimately
have ambiguous types. Example
class S a where s :: a -> (Int,Int)
@@ -275,7 +275,7 @@ In a few places we do not want to check a user-specified type for ambiguity
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
+ TcTyVars before calling checkValidType, so we get assertion failures
from doing an ambiguity check on a type with TyVars in it. Fixing this
would not be hard, but let's wait till there's a reason.
@@ -972,7 +972,7 @@ expand S first, then T we get just
which is fine.
IMPORTANT: suppose T is a type synonym. Then we must do validity
-checking on an appliation (T ty1 ty2)
+checking on an application (T ty1 ty2)
*either* before expansion (i.e. check ty1, ty2)
*or* after expansion (i.e. expand T ty1 ty2, and then check)
@@ -1971,7 +1971,7 @@ constraintKindsMsg = text "Use ConstraintKinds to permit this"
Are these OK?
type family F a
instance F a => C (Maybe [a]) where ...
- intance C (F a) => C [[[a]]] where ...
+ instance C (F a) => C [[[a]]] where ...
No: the type family in the instance head might blow up to an
arbitrarily large type, depending on how 'a' is instantiated.
@@ -2320,7 +2320,7 @@ checkConsistentFamInst (InClsInst { ai_class = clas
tv_name = mkInternalName (mkAlphaTyVarUnique 1) (mkTyVarOcc "_") noSrcSpan
-- For check_match, bind_me, see
- -- Note [Matching in the consistent-instantation check]
+ -- Note [Matching in the consistent-instantiation check]
check_match :: [(Type,Type,ArgFlag)] -> TcM ()
check_match triples = go emptyTCvSubst emptyTCvSubst triples
@@ -2421,7 +2421,7 @@ in injective positions on the left-hand side (by way of
position, as `T` is not an injective type constructor, so we do not count that.
Similarly for the `a` in `ConstType a`.
-Note [Matching in the consistent-instantation check]
+Note [Matching in the consistent-instantiation check]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matching the class-instance header to family-instance tyvars is
tricker than it sounds. Consider (#13972)
diff --git a/compiler/types/Class.hs b/compiler/types/Class.hs
index b5619142d1..0f0e688f5b 100644
--- a/compiler/types/Class.hs
+++ b/compiler/types/Class.hs
@@ -212,7 +212,7 @@ The TyCon of an associated type should use the same variable names as its
parent class. Thus
class C a b where
type F b x a :: *
-We make F use the same Name for 'a' as C does, and similary 'b'.
+We make F use the same Name for 'a' as C does, and similarly 'b'.
The reason for this is when checking instances it's easier to match
them up, to ensure they match. Eg
diff --git a/compiler/types/FamInstEnv.hs b/compiler/types/FamInstEnv.hs
index 0cf329c4ca..275387e91b 100644
--- a/compiler/types/FamInstEnv.hs
+++ b/compiler/types/FamInstEnv.hs
@@ -685,7 +685,7 @@ mkSingleCoAxiom :: Role -> Name
-> [TyVar] -> [TyVar] -> [CoVar]
-> TyCon -> [Type] -> Type
-> CoAxiom Unbranched
--- Make a single-branch CoAxiom, incluidng making the branch itself
+-- Make a single-branch CoAxiom, including making the branch itself
-- Used for both type family (Nominal) and data family (Representational)
-- axioms, hence passing in the Role
mkSingleCoAxiom role ax_name tvs eta_tvs cvs fam_tc lhs_tys rhs_ty
@@ -1091,7 +1091,7 @@ reduceTyFamApp_maybe :: FamInstEnvs
-- but *not* newtypes
-- Works on type-synonym families always; data-families only if
-- the role we seek is representational
--- It does *not* normlise the type arguments first, so this may not
+-- It does *not* normalise the type arguments first, so this may not
-- go as far as you want. If you want normalised type arguments,
-- use normaliseTcArgs first.
--
@@ -1644,7 +1644,7 @@ There are wrinkles, of course:
they did, then looking up `F b1` would yield the same flatten var for
each.) So, even though `forall`-bound variables should really be in the
in-scope set only when they are in scope, we retain these variables even
- outside of their scope. This ensures that, if we enounter a fresh
+ outside of their scope. This ensures that, if we encounter a fresh
`forall`-bound b, we will rename it to b2, not b1. Note that keeping a
larger in-scope set than strictly necessary is always OK, as in-scope sets
are only ever used to avoid collisions.
diff --git a/compiler/types/InstEnv.hs b/compiler/types/InstEnv.hs
index e9960978d5..94cabfb724 100644
--- a/compiler/types/InstEnv.hs
+++ b/compiler/types/InstEnv.hs
@@ -490,7 +490,7 @@ identicalClsInstHead :: ClsInst -> ClsInst -> Bool
-- ^ True when when the instance heads are the same
-- e.g. both are Eq [(a,b)]
-- Used for overriding in GHCi
--- Obviously should be insenstive to alpha-renaming
+-- Obviously should be insensitive to alpha-renaming
identicalClsInstHead (ClsInst { is_cls_nm = cls_nm1, is_tcs = rough1, is_tys = tys1 })
(ClsInst { is_cls_nm = cls_nm2, is_tcs = rough2, is_tys = tys2 })
= cls_nm1 == cls_nm2
@@ -702,7 +702,7 @@ unconstrained, then we don't know yet if the more specific instance
will eventually apply. GHC keeps going, and matches on the generic `C
a'. The fix is to, at each step, check to see if there's a reverse
match, and if so, abort the search. This prevents hugs from
-prematurely chosing a generic instance when a more specific one
+prematurely choosing a generic instance when a more specific one
exists.
--Jeff
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index b1ecf74d3d..f55141d928 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -1101,7 +1101,7 @@ Invariant 1:
Coercions have the following invariant
Refl (similar for GRefl r ty MRefl) is always lifted as far as possible.
-You might think that a consequencs is:
+You might think that a consequences is:
Every identity coercions has Refl at the root
But that's not quite true because of coercion variables. Consider
@@ -1565,7 +1565,7 @@ the evidence for unboxed equalities:
holes are easier.
- Moreover, nothing is lost from the lack of let-bindings. For
- dicionaries want to achieve sharing to avoid recomoputing the
+ dictionaries want to achieve sharing to avoid recomoputing the
dictionary. But coercions are entirely erased, so there's little
benefit to sharing. Indeed, even if we had a let-binding, we
always inline types and coercions at every use site and drop the
diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs
index 23ee42fc8a..1648fc9eb7 100644
--- a/compiler/types/TyCon.hs
+++ b/compiler/types/TyCon.hs
@@ -1490,7 +1490,7 @@ primRepsCompatible dflags reps1 reps2 =
-- fields. For instance, in @data Foo = Foo Float# Float#@ the two fields will
-- take only 8 bytes, which for 64-bit arch will be equal to 1 word.
-- See also mkVirtHeapOffsetsWithPadding for details of how data fields are
--- layed out.
+-- laid out.
primRepSizeB :: DynFlags -> PrimRep -> Int
primRepSizeB dflags IntRep = wORD_SIZE dflags
primRepSizeB dflags WordRep = wORD_SIZE dflags
@@ -2526,7 +2526,7 @@ We used to pay linear cost per constructor, with each constructor looking up
its relative index in the constructor list. That was quadratic and prohibitive
for large data types with more than 10k constructors.
-The current strategy is to build a NameEnv with a mapping from costructor's
+The current strategy is to build a NameEnv with a mapping from constructor's
Name to ConTag and pass it down to buildDataCon for efficient lookup.
Relevant ticket: #14657
diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs
index 4e32824b09..c0964fd79e 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -1128,7 +1128,7 @@ piResultTys ty orig_args@(arg:args)
= -- We have not run out of arguments, but the function doesn't
-- have the right kind to apply to them; so panic.
-- Without the explicit isEmptyVarEnv test, an ill-kinded type
- -- would give an infniite loop, which is very unhelpful
+ -- would give an infinite loop, which is very unhelpful
-- c.f. #15473
pprPanic "piResultTys2" (ppr ty $$ ppr orig_args $$ ppr all_args)
@@ -1159,7 +1159,7 @@ So
T (forall b. b->b) * :: (b -> b)[ b :-> *]
:: * -> *
-In other words we must intantiate the forall!
+In other words we must instantiate the forall!
Similarly (#15428)
S :: forall k f. k -> f k
@@ -2440,7 +2440,7 @@ typeKind (CoercionTy co) = coercionType co
typeKind (AppTy fun arg)
= go fun [arg]
where
- -- Accumulate the type arugments, so we can call piResultTys,
+ -- Accumulate the type arguments, so we can call piResultTys,
-- rather than a succession of calls to piResultTy (which is
-- asymptotically costly as the number of arguments increases)
go (AppTy fun arg) args = go fun (arg:args)
@@ -2480,7 +2480,7 @@ tcTypeKind (FunTy { ft_af = af, ft_res = res })
tcTypeKind (AppTy fun arg)
= go fun [arg]
where
- -- Accumulate the type arugments, so we can call piResultTys,
+ -- Accumulate the type arguments, so we can call piResultTys,
-- rather than a succession of calls to piResultTy (which is
-- asymptotically costly as the number of arguments increases)
go (AppTy fun arg) args = go fun (arg:args)
diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs
index e8d20e3208..615e869cc4 100644
--- a/compiler/utils/Util.hs
+++ b/compiler/utils/Util.hs
@@ -701,7 +701,7 @@ count p = go 0
| otherwise = go n xs
countWhile :: (a -> Bool) -> [a] -> Int
--- Length of an /initial prefix/ of the list satsifying p
+-- Length of an /initial prefix/ of the list satisfying p
countWhile p = go 0
where go !n (x:xs) | p x = go (n+1) xs
go !n _ = n
@@ -977,7 +977,7 @@ fuzzyLookup user_entered possibilites
poss_str user_entered
, distance <= fuzzy_threshold ]
where
- -- Work out an approriate match threshold:
+ -- Work out an appropriate match threshold:
-- We report a candidate if its edit distance is <= the threshold,
-- The threshold is set to about a quarter of the # of characters the user entered
-- Length Threshold
diff --git a/configure.ac b/configure.ac
index 9100f85107..6ea9a82395 100644
--- a/configure.ac
+++ b/configure.ac
@@ -299,9 +299,9 @@ FP_DEFAULT_CHOICE_OVERRIDE_CHECK(
[tables next to code],
[tables apart from code],
[TablesNextToCode],
- [Build a tool chain with info tables layed out next to code (enabled by default when using the registerised ABI, on platforms that support it)])
+ [Build a tool chain with info tables laid out next to code (enabled by default when using the registerised ABI, on platforms that support it)])
if test x"$TablesNextToCode" = xYES; then
- AC_DEFINE([TABLES_NEXT_TO_CODE], [1], [Define to 1 if info tables are layed out next to code])
+ AC_DEFINE([TABLES_NEXT_TO_CODE], [1], [Define to 1 if info tables are laid out next to code])
fi
AC_SUBST(TablesNextToCode)
diff --git a/docs/opt-coercion/fc-normalization-rta.bib b/docs/opt-coercion/fc-normalization-rta.bib
index f98ff15970..6074e35d0b 100644
--- a/docs/opt-coercion/fc-normalization-rta.bib
+++ b/docs/opt-coercion/fc-normalization-rta.bib
@@ -3296,7 +3296,7 @@ FlashEd, the overhead due to updating is typically less than 1 percent.
booktitle = 1998 # " " # icfp,
year = 1998,
month = sep,
- addresss = "Baltimore",
+ address = "Baltimore",
pages = "51--62",
}
@@ -3976,7 +3976,7 @@ FL)},
@incollection{ morrisett97semantics,
author = "Greg Morrisett and Robert Harper",
title = "Semantics of Memory Management for Polymorphic Languages",
- booktitle = "Higer Order Operational Techniques in Semantics",
+ booktitle = "Higher Order Operational Techniques in Semantics",
publisher = "Newton Institute, Cambridge University Press",
editor = "Andrew Gordon and Andrew M. Pitts",
year = "1997",
@@ -5933,7 +5933,7 @@ January 19 - 21, 2000, Boston, MA USA},
@inproceedings{ambler+:hybrid,
author = {Simon Ambler and Roy L. Crole and Alberto Momigliano},
- title = {Combining Higer Order Abstract Syntax with Tactical Theorem Proving and (Co)Induction},
+ title = {Combining Higher Order Abstract Syntax with Tactical Theorem Proving and (Co)Induction},
booktitle = {Theorem Proving in Higher Order Logics, 15th International Conference,
TPHOLs 2002, Hampton, VA, USA, August 20-23, 2002, Proceedings},
publisher = {Springer},
diff --git a/docs/opt-coercion/prooftree.sty b/docs/opt-coercion/prooftree.sty
index abb7d44864..b5e6076531 100644
--- a/docs/opt-coercion/prooftree.sty
+++ b/docs/opt-coercion/prooftree.sty
@@ -339,7 +339,7 @@ $\displaystyle
% IDEAS
% 1. Specification of \shiftright and how to spread trees.
% 2. Spacing command \m which causes 1em+1fil spacing, over-riding
-% exisiting space on sides of trees and not affecting the
+% existing space on sides of trees and not affecting the
% detection of being on the left or right.
% 3. Hack using \@currenvir to detect LaTeX environment; have to
% use \aftergroup to pass \shortenproofleft/right out.
diff --git a/docs/rts/rts.tex b/docs/rts/rts.tex
index d5d4f6d67d..b6f40cca24 100644
--- a/docs/rts/rts.tex
+++ b/docs/rts/rts.tex
@@ -8,7 +8,7 @@
% o I (ADR) think it would be worth making the connection with CPS explicit.
% Now that we have explicit activation records (on the stack), we can
% explain the whole system in terms of CPS and tail calls --- with the
-% one requirement that we carefuly distinguish stack-allocated objects
+% one requirement that we carefully distinguish stack-allocated objects
% from heap-allocated objects.
% \documentstyle[preprint]{acmconf}
@@ -572,7 +572,7 @@ evaluation completes, the evaluators overwrite the application with an
\item[Black holes] are used to mark updateable closures which are
currently being evaluated. ``Black holing'' an object cures a
potential space leak and detects certain classes of infinite loops.
-More imporantly, black holes act as synchronisation objects between
+More importantly, black holes act as synchronisation objects between
separate threads: if a second thread tries to enter an updateable
closure which is already being evaluated, the second thread is added
to a list of blocked threads and the thread is suspended.
@@ -1488,7 +1488,7 @@ Calls to @index_<feature>@ will insert the cost centre / category
record in the @<feature>@ hash table, if not already inserted. The hash
index is memoised in the record and returned.
-CURRENTLY ONLY ONE MEMOISATION SLOT IS AVILABLE IN EACH RECORD SO
+CURRENTLY ONLY ONE MEMOISATION SLOT IS AVAILABLE IN EACH RECORD SO
HASHING CAN ONLY BE DONE ON ONE FEATURE FOR EACH RECORD. This can be
easily relaxed at the expense of extra memoisation space or continued
rehashing.
@@ -2428,7 +2428,7 @@ object is unreachable.
\end{tabular}
\end{center}
-\ToDo{Weak poitners}
+\ToDo{Weak pointers}
\subsubsection{Stable names}
\label{sec:STABLE_NAME}
@@ -4548,7 +4548,7 @@ The entry code for a BCO does the following:
\end{itemize}
BCO's for thunks and functions have the same entry conventions as
-slow entry points: they expect to find their arguments on the stac
+slow entry points: they expect to find their arguments on the stack
with unboxed arguments preceded by appropriate tags.
\subsection{A GHC thread returns to a Hugs-compiled return address}
diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst
index 35a49766b4..2e5d1ed9fa 100644
--- a/docs/users_guide/ghci.rst
+++ b/docs/users_guide/ghci.rst
@@ -2111,7 +2111,7 @@ libraries, in this order:
systems may be overridden by setting the :envvar:`LD_LIBRARY_PATH`
environment variable.
-- The linker standard library search can also be overriden on some systems using
+- The linker standard library search can also be overridden on some systems using
the :envvar:`LIBRARY_PATH` environment variable. Because of some
implementation detail on Windows, setting ``LIBRARY_PATH`` will also extend
the system loader path for any library it finds. So often setting
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index ea7bbac9cc..ddfc5a4b5c 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -8311,7 +8311,7 @@ Note the following points:
with a finite number of alternatives (unlike ``Type``).
- When :extension:`ExplicitForAll` is enabled, type and kind variables can be
- explicily bound in associated data or type family instances in the same way
+ explicitly bound in associated data or type family instances in the same way
(and with the same restrictions) as :ref:`data-instance-declarations` or
:ref:`type-instance-declarations`. For example, adapting the above, the
following is accepted: ::
@@ -10429,7 +10429,7 @@ Introducing quantified constraints offers two main benefits:
class (forall m. Monad m => Monad (t m)) => Trans t where
lift :: Monad m => m a -> (t m) a
-This idea is very old; see Seciton 7 of `Derivable type classes <https://www.microsoft.com/en-us/research/publication/derivable-type-classes/>`_.
+This idea is very old; see Section 7 of `Derivable type classes <https://www.microsoft.com/en-us/research/publication/derivable-type-classes/>`_.
Syntax changes
----------------
@@ -10606,7 +10606,7 @@ if we called ``f Nothing``, then ``f`` is ``Maybe`` and the compiler must prove
call site) that ``forall a. Eq a => Eq (Maybe a)`` holds. It can do this easily, by
appealing to the existing instance declaration for ``Eq (Maybe a)``.
-In short, quantifed constraints do not introduce incoherence.
+In short, quantified constraints do not introduce incoherence.
.. _extensions-to-type-signatures:
@@ -12129,7 +12129,7 @@ Here are some more details:
f _x = _x + 1
- does not elict any errors. Only a variable *that is not in scope*
+ does not elicit any errors. Only a variable *that is not in scope*
(whether or not it starts with an underscore) is treated as an error
(which it always was), albeit now with a more informative error
message.
diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst
index dac4be6f7d..2cfd22e664 100644
--- a/docs/users_guide/runtime_control.rst
+++ b/docs/users_guide/runtime_control.rst
@@ -862,10 +862,10 @@ performance.
By default, the flag will cause a warning to be emitted to stderr
when the sync time exceeds the specified time. This behaviour can
- be overriden, however: the ``longGCSync()`` hook is called when
+ be overridden, however: the ``longGCSync()`` hook is called when
the sync time is exceeded during the sync period, and the
``longGCSyncEnd()`` hook at the end. Both of these hooks can be
- overriden in the ``RtsConfig`` when the runtime is started with
+ overridden in the ``RtsConfig`` when the runtime is started with
``hs_init_ghc()``. The default implementations of these hooks
(``LongGcSync()`` and ``LongGCSyncEnd()`` respectively) print
warnings to stderr.
@@ -1137,7 +1137,7 @@ When the program is linked with the :ghc-flag:`-eventlog` option
logs a default set of events, suitable for use with tools like ThreadScope.
Per default the events are written to :file:`{program}.eventlog` though
- the mechanism for writing event log data can be overriden with a custom
+ the mechanism for writing event log data can be overridden with a custom
`EventLogWriter`.
For some special use cases you may want more control over which
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst
index 9812c455e6..8d4bb64330 100644
--- a/docs/users_guide/using.rst
+++ b/docs/users_guide/using.rst
@@ -99,7 +99,7 @@ to the files ``Foo.hs`` and ``Bar.hs``.
``-fno-specialise -O1``
- ``-fspecialise`` will be enabled as the ``-fno-specialise`` is overriden
+ ``-fspecialise`` will be enabled as the ``-fno-specialise`` is overridden
by the ``-O1``.
``-O1 -fno-specialise``
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 51fe3d0431..f49c1834d3 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -4027,7 +4027,7 @@ setBreakFlag toggle arr i = do
--
-- Bugfix: if the user closed stdout or stderr, the flushing will fail,
-- raising another exception. We therefore don't put the recursive
--- handler arond the flushing operation, so if stderr is closed
+-- handler around the flushing operation, so if stderr is closed
-- GHCi will just die gracefully rather than going into an infinite loop.
handler :: GhciMonad m => SomeException -> m Bool
handler exception = do
diff --git a/ghc/Main.hs b/ghc/Main.hs
index 9f6ab1e132..77d2616bd1 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -175,7 +175,7 @@ main' postLoadMode dflags0 args flagWarnings = do
}
-- turn on -fimplicit-import-qualified for GHCi now, so that it
- -- can be overriden from the command-line
+ -- can be overridden from the command-line
-- XXX: this should really be in the interactive DynFlags, but
-- we don't set that until later in interactiveUI
-- We also set -fignore-optim-changes and -fignore-hpc-changes,
@@ -890,7 +890,7 @@ options may be necessary in order to find the .hi files.
This is used by Cabal for generating the ComponentId for a
package. The ComponentId must change when the visible ABI of
-the package chagnes, so during registration Cabal calls ghc --abi-hash
+the package changes, so during registration Cabal calls ghc --abi-hash
to get a hash of the package's ABI.
-}
@@ -962,7 +962,7 @@ Unfortunately this seems to have broken somehow on OS X: as a result,
defaultHooks (in hschooks.c) is not called, which does not initialize
the GC stats. As a result, this breaks things like `:set +s` in GHCi
(#8754). As a hacky workaround, we instead call 'defaultHooks'
-directly to initalize the flags in the RTS.
+directly to initialize the flags in the RTS.
A byproduct of this, I believe, is that hooks are likely broken on OS
X when dynamically linking. But this probably doesn't affect most
diff --git a/hadrian/README.md b/hadrian/README.md
index 828761ef0f..ab343c98e8 100644
--- a/hadrian/README.md
+++ b/hadrian/README.md
@@ -106,7 +106,7 @@ simply drop the `--freeze1` flag and Hadrian will rebuild all out-of-date files.
* `--color` and `--no-color`: choose whether to use colors when printing build
progress info. By default, Hadrian tries to determine if the terminal supports
-colored ouput, and proceeds accordingly.
+colored output, and proceeds accordingly.
* `--progress-info=STYLE`: choose how build progress info is printed. There are
four settings: `none`, `brief` (one line per build command; this is the default
diff --git a/hadrian/src/Hadrian/BuildPath.hs b/hadrian/src/Hadrian/BuildPath.hs
index 499897d177..8e059ce7d4 100644
--- a/hadrian/src/Hadrian/BuildPath.hs
+++ b/hadrian/src/Hadrian/BuildPath.hs
@@ -40,7 +40,7 @@ parseBuildPath root afterBuild = do
--
-- > <build root>/stage<N>/lib/<arch>-<os>-ghc-<ghc version>/<something>
--
--- where @something@ describes a library or object file or ... to be registerd
+-- where @something@ describes a library or object file or ... to be registered
-- for the given package. These are files registered into a ghc-pkg database.
--
-- @a@, which represents that @something@, is instantiated with library-related
diff --git a/hadrian/src/Hadrian/Utilities.hs b/hadrian/src/Hadrian/Utilities.hs
index 8c9cfefe81..7419722b3f 100644
--- a/hadrian/src/Hadrian/Utilities.hs
+++ b/hadrian/src/Hadrian/Utilities.hs
@@ -441,7 +441,7 @@ newtype BuildProgressColour = BuildProgressColour String
deriving Typeable
-- | By default, Hadrian tries to figure out if the current terminal
--- supports colors using this function. The default can be overriden
+-- supports colors using this function. The default can be overridden
-- by suppling @--[no-]color@.
shouldUseColor :: IO Bool
shouldUseColor =
diff --git a/libraries/base/GHC/Float.hs b/libraries/base/GHC/Float.hs
index de6c8e3860..1e870e0c49 100644
--- a/libraries/base/GHC/Float.hs
+++ b/libraries/base/GHC/Float.hs
@@ -229,7 +229,7 @@ class (RealFrac a, Floating a) => RealFloat a where
-- to wrong results, hence we clamp the
-- scaling parameter.
-- If n + k would be larger than h,
- -- n + clamp b k must be too, simliar
+ -- n + clamp b k must be too, similar
-- for smaller than l - d.
-- Add a little extra to keep clear
-- from the boundary cases.
@@ -1258,7 +1258,7 @@ word2Float (W# w) = F# (word2Float# w)
{-
Note [realToFrac int-to-float]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Don found that the RULES for realToFrac/Int->Double and simliarly
+Don found that the RULES for realToFrac/Int->Double and similarly
Float made a huge difference to some stream-fusion programs. Here's
an example
diff --git a/libraries/base/GHC/Float/RealFracMethods.hs b/libraries/base/GHC/Float/RealFracMethods.hs
index 127d99d223..9a31425f64 100644
--- a/libraries/base/GHC/Float/RealFracMethods.hs
+++ b/libraries/base/GHC/Float/RealFracMethods.hs
@@ -305,7 +305,7 @@ int2Float (I# i) = F# (int2Float# i)
--
-- Note: Since the value is integral, the exponent can't be less than
-- (-TYP_MANT_DIG), so we need not check the validity of the shift
--- distance for the right shfts here.
+-- distance for the right shifts here.
{-# INLINE double2Integer #-}
double2Integer :: Double -> Integer
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs
index 8841f82bec..15a02ff1e1 100644
--- a/libraries/base/System/Posix/Internals.hs
+++ b/libraries/base/System/Posix/Internals.hs
@@ -593,7 +593,7 @@ foreign import capi unsafe "stdio.h value SEEK_END" sEEK_END :: CInt
Note: Windows types
Windows' _read and _write have types that differ from POSIX. They take an
-unsigned int for lengh and return a signed int where POSIX uses size_t and
+unsigned int for length and return a signed int where POSIX uses size_t and
ssize_t. Those are different on x86_64 and equivalent on x86. We import them
with the types in Microsoft's documentation which means that c_read,
c_safe_read, c_write and c_safe_write have different Haskell types depending on
diff --git a/libraries/ghc-boot/GHC/PackageDb.hs b/libraries/ghc-boot/GHC/PackageDb.hs
index 31073711d4..3382cf3025 100644
--- a/libraries/ghc-boot/GHC/PackageDb.hs
+++ b/libraries/ghc-boot/GHC/PackageDb.hs
@@ -30,12 +30,12 @@
-- the internal package format which is specialised just for GHC.
--
-- GHC the compiler only needs some of the information which is kept about
--- registerd packages, such as module names, various paths etc. On the other
+-- registered packages, such as module names, various paths etc. On the other
-- hand ghc-pkg has to keep all the information from Cabal packages and be able
-- to regurgitate it for users and other tools.
--
-- The first trick is that we duplicate some of the information in the package
--- database. We essentially keep two versions of the datbase in one file, one
+-- database. We essentially keep two versions of the database in one file, one
-- version used only by ghc-pkg which keeps the full information (using the
-- serialised form of the 'InstalledPackageInfo' type defined by the Cabal
-- library); and a second version written by ghc-pkg and read by GHC which has
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 41cd71ca1f..bad99b5155 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -14,7 +14,7 @@
# - config.mk is auto-generated from config.mk.in by configure.
# If you edit config.mk your changes will be spammed.
#
-# - Settings in this file may be overriden by giving replacement
+# - Settings in this file may be overridden by giving replacement
# definitions in build.mk. See build.mk.sample for a good
# starting point for a build.mk file.
#
diff --git a/mk/install.mk.in b/mk/install.mk.in
index f3f9ce0507..0856805285 100644
--- a/mk/install.mk.in
+++ b/mk/install.mk.in
@@ -12,7 +12,7 @@
# - install.mk is auto-generated from install.mk.in by configure.
# If you edit install.mk your changes will be spammed.
#
-# - Settings in this file may be overriden by giving replacement
+# - Settings in this file may be overridden by giving replacement
# definitions in build.mk.
# Definition of installation directories, we don't use half of these, but since
diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c
index f4ab02886d..cf57f28eae 100644
--- a/rts/LdvProfile.c
+++ b/rts/LdvProfile.c
@@ -111,7 +111,7 @@ processHeapClosureForDead( const StgClosure *c )
case BLACKHOLE:
case BLOCKING_QUEUE:
/*
- 'Ingore' cases
+ 'Ignore' cases
*/
// Why can we ignore IND closures? We assume that
// any census is preceded by a major garbage collection, which
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index b5930363a1..0486399b46 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -1313,7 +1313,7 @@ stg_atomicallyzh (P_ stm)
code = stm;
frame_result = NO_TREC;
- /* Start the memory transcation */
+ /* Start the memory transaction */
("ptr" new_trec) = ccall stmStartTransaction(MyCapability() "ptr", old_trec "ptr");
StgTSO_trec(CurrentTSO) = new_trec;
diff --git a/rts/STM.c b/rts/STM.c
index 1dde70b485..5f72c0ebfb 100644
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -828,7 +828,7 @@ static StgBool validate_and_acquire_ownership (Capability *cap,
// check_read_only : check that we've seen an atomic snapshot of the
// non-updated TVars accessed by a trec. This checks that the last TRec to
// commit an update to the TVar is unchanged since the value was stashed in
-// validate_and_acquire_ownership. If no udpate is seen to any TVar than
+// validate_and_acquire_ownership. If no update is seen to any TVar than
// all of them contained their expected values at the start of the call to
// check_read_only.
//
@@ -1252,7 +1252,7 @@ StgBool stmReWait(Capability *cap, StgTSO *tso) {
park_tso(tso);
revert_ownership(cap, trec, true);
} else {
- // The transcation has become invalid. We can now remove it from the wait
+ // The transaction has become invalid. We can now remove it from the wait
// queues.
if (trec -> state != TREC_CONDEMNED) {
remove_watch_queue_entries_for_trec (cap, trec);
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 9323915dfe..ce1a1fc060 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -226,7 +226,7 @@ schedule (Capability *initialCapability, Task *task)
// In order to cleanly shut down the runtime, we want to:
// * make sure that all main threads return to their callers
// with the state 'Interrupted'.
- // * clean up all OS threads assocated with the runtime
+ // * clean up all OS threads associated with the runtime
// * free all memory etc.
//
// So the sequence goes like this:
@@ -2906,7 +2906,7 @@ raiseExceptionHelper (StgRegTable *reg, StgTSO *tso, StgClosure *exception)
// OLD COMMENT (we don't have MIN_UPD_SIZE now):
// LDV profiling: stg_raise_info has THUNK as its closure
// type. Since a THUNK takes at least MIN_UPD_SIZE words in its
- // payload, MIN_UPD_SIZE is more approprate than 1. It seems that
+ // payload, MIN_UPD_SIZE is more appropriate than 1. It seems that
// 1 does not cause any problem unless profiling is performed.
// However, when LDV profiling goes on, we need to linearly scan
// small object pool, where raise_closure is stored, so we should
diff --git a/rts/TraverseHeap.c b/rts/TraverseHeap.c
index 62d44c1636..8bf58c11ee 100644
--- a/rts/TraverseHeap.c
+++ b/rts/TraverseHeap.c
@@ -324,7 +324,7 @@ pushStackElement(traverseState *ts, const stackElement se)
newStackBlock(ts, nbd);
}
- // adjust stackTop (acutal push)
+ // adjust stackTop (actual push)
ts->stackTop--;
// If the size of stackElement was huge, we would better replace the
// following statement by either a memcpy() call or a switch statement
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
index 3e19d3a2db..c240a97d5e 100644
--- a/rts/linker/Elf.c
+++ b/rts/linker/Elf.c
@@ -775,7 +775,7 @@ ocGetNames_ELF ( ObjectCode* oc )
alloc = SECTION_NOMEM;
}
// use the m32 allocator if either the image is not mapped
- // (i.e. we cannot map the secions separately), or if the section
+ // (i.e. we cannot map the sections separately), or if the section
// size is small.
else if (!oc->imageMapped || size < getPageSize() / 3) {
bool executable = kind == SECTIONKIND_CODE_OR_RODATA;
diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c
index 12e84578fc..6e379ffb53 100644
--- a/rts/linker/MachO.c
+++ b/rts/linker/MachO.c
@@ -52,7 +52,7 @@ int64_t signExtend(uint64_t val, uint8_t bits);
bool isVectorPp(uint32_t *p);
bool isLoadStore(uint32_t *p);
-/* aarch64 relocations may contain an addend alreay in the position
+/* aarch64 relocations may contain an addend already in the position
* where we want to write the address offset to. Thus decoding as well
* as encoding is needed.
*/
@@ -305,7 +305,7 @@ decodeAddend(ObjectCode * oc, Section * section, MachORelocationInfo * ri) {
}
case ARM64_RELOC_BRANCH26:
/* take the lower 26 bits and shift them by 2. The last two are
- * implicilty 0 (as the instructions must be aligned!) and sign
+ * implicitly 0 (as the instructions must be aligned!) and sign
* extend to 64 bits.
*/
return signExtend( (*p & 0x03FFFFFF) << 2, 28 );
@@ -543,7 +543,7 @@ relocateSectionAarch64(ObjectCode * oc, Section * section)
*
* - loaded the sections (potentially into non-contiguous memory),
* (in ocGetNames_MachO)
- * - registered exported sybmols
+ * - registered exported symbols
* (in ocGetNames_MachO)
* - and fixed the nlist[i].n_value for common storage symbols (N_UNDF,
* N_EXT and n_value != 0) so that they point into the common storage.
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index a560c2c8fd..aac8d974ae 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -596,7 +596,7 @@ GarbageCollect (uint32_t collect_gen,
/* free old memory and shift to-space into from-space for all
* the collected generations (except the allocation area). These
- * freed blocks will probaby be quickly recycled.
+ * freed blocks will probably be quickly recycled.
*/
if (gen->mark)
{
@@ -646,7 +646,7 @@ GarbageCollect (uint32_t collect_gen,
ASSERT(countBlocks(gen->blocks) == gen->n_blocks);
ASSERT(countOccupied(gen->blocks) == gen->n_words);
}
- else // not copacted
+ else // not compacted
{
freeChain(gen->old_blocks);
}
diff --git a/rts/sm/NonMovingMark.c b/rts/sm/NonMovingMark.c
index 3ebd039c43..81000566cb 100644
--- a/rts/sm/NonMovingMark.c
+++ b/rts/sm/NonMovingMark.c
@@ -1265,7 +1265,7 @@ mark_closure (MarkQueue *queue, const StgClosure *p0, StgClosure **origin)
ASSERT(!IS_FORWARDING_PTR(p->header.info));
// N.B. only the first block of a compact region is guaranteed to carry
- // BF_NONMOVING; conseqently we must separately check for BF_COMPACT.
+ // BF_NONMOVING; consequently we must separately check for BF_COMPACT.
if (bd->flags & (BF_COMPACT | BF_NONMOVING)) {
if (bd->flags & BF_COMPACT) {
@@ -1315,7 +1315,7 @@ mark_closure (MarkQueue *queue, const StgClosure *p0, StgClosure **origin)
}
// A pinned object that is still attached to a capability (because it's not
- // filled yet). No need to trace it pinned objects can't contain poiners.
+ // filled yet). No need to trace it pinned objects can't contain pointers.
else if (bd->flags & BF_PINNED) {
#if defined(DEBUG)
bool found_it = false;
diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py
index bd339adc7c..deb7c16ded 100644
--- a/testsuite/driver/perf_notes.py
+++ b/testsuite/driver/perf_notes.py
@@ -587,7 +587,7 @@ def main() -> None:
group = parser.add_argument_group(title='Filtering', description="Select which subset of performance metrics to dump")
group.add_argument("--test-env",
- help="The given test environment to be compared. Use 'local' for localy run results. If using --ci, see .gitlab-ci file for TEST_ENV settings.")
+ help="The given test environment to be compared. Use 'local' for locally run results. If using --ci, see .gitlab-ci file for TEST_ENV settings.")
group.add_argument("--test-name",
help="Filters for tests matching the given regular expression.")
group.add_argument("--metric",
diff --git a/testsuite/tests/boxy/Base1.hs b/testsuite/tests/boxy/Base1.hs
index 3f027bb93c..7e33069199 100644
--- a/testsuite/tests/boxy/Base1.hs
+++ b/testsuite/tests/boxy/Base1.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -XImpredicativeTypes -fno-warn-deprecated-flags #-}
--- Sept 16: now failing, beause I've furter reduced the scop
+-- Sept 16: now failing, because I've further reduced the scop
-- of impredicative types
module Base1 where
diff --git a/testsuite/tests/numeric/should_run/numrun014.hs b/testsuite/tests/numeric/should_run/numrun014.hs
index 34a316e789..56821f59e5 100644
--- a/testsuite/tests/numeric/should_run/numrun014.hs
+++ b/testsuite/tests/numeric/should_run/numrun014.hs
@@ -1,5 +1,5 @@
--- Test that we don't have rules (or othre optimisations) doing the
+-- Test that we don't have rules (or other optimisations) doing the
-- wrong thing for constant folding with Doubles.
module Main (main) where
diff --git a/testsuite/tests/programs/andy_cherry/andy_cherry.stdout b/testsuite/tests/programs/andy_cherry/andy_cherry.stdout
index 743174dce8..6ae5da0611 100644
--- a/testsuite/tests/programs/andy_cherry/andy_cherry.stdout
+++ b/testsuite/tests/programs/andy_cherry/andy_cherry.stdout
@@ -77,7 +77,7 @@ Taking this knight loses a pawn
\end{tabular}}|
\end{center}
|9\ldots~Bc5; 10.~f3, e*f3; 11.~g*f3, 0-0; 12.~Bd3|
-White can get presure down the `g' file, but first needs to solve the
+White can get pressure down the `g' file, but first needs to solve the
problem of the Bishop on c5 guarding g8.
\begin{center}|
{\bf\begin{tabular}{rp{50pt}p{50pt}}
@@ -1936,7 +1936,7 @@ rooks that arrive on the 7th.
24 & Rf*f7 & Rd8\\
\end{tabular}}|
\end{center}
-Silly, blocking the kings escape, athough its over anyway. I should
+Silly, blocking the kings escape, although its over anyway. I should
have tried for at least one cheapo.
|24\ldots~Re5|
\begin{center}|
diff --git a/testsuite/tests/programs/andy_cherry/mygames.pgn b/testsuite/tests/programs/andy_cherry/mygames.pgn
index 9a338cf05e..bb88aa6597 100644
--- a/testsuite/tests/programs/andy_cherry/mygames.pgn
+++ b/testsuite/tests/programs/andy_cherry/mygames.pgn
@@ -14,7 +14,7 @@
4. Bf4 {is better.}) 4... e6? (4... dxe4 5. d5 exf3 6. dxc6 Qxd1+ 7.
Nxd1 {and black is a clear pawn up.}) 5. e5 Ne4 {} 6. Nxe4? { Taking
this knight loses a pawn} 6... dxe4 7. Nd2 Qxd4 8. Nc4 Qxd1+ 9. Kxd1
-Bd7 (9... Bc5 10. f3 exf3 11. gxf3 O-O 12. Bd3 {White can get presure
+Bd7 (9... Bc5 10. f3 exf3 11. gxf3 O-O 12. Bd3 {White can get pressure
down the `g' file, but first needs to solve the problem of the Bishop on
c5 guarding g8.}) 10. Bd2 (10. Be3 {is better.}) 10... Bb4 11. c3 Bc5 12.
Ke1 O-O-O (12... b5 13. Ne3 Bxe3 14. Bxe3 Nxe5 {wins a pawn, but black
@@ -284,7 +284,7 @@ kingside, and allowing exchange of queens.} (13... Bd8) 14. Nxf6+ Qxf6
Planning an invasion of the 7th. Textbook play.} 22... Rd8 { Planing to
remove the dangerous white pawn, but missing the connected rooks that
arrive on the 7th.} 23. Rxc7 Rxd5 24. Rfxf7 Rd8 {Silly, blocking the
-kings escape, athough its over anyway. I should have tried for at least
+kings escape, although its over anyway. I should have tried for at least
one cheapo.} (24... Re5) 25. Rxh7 Rf8 {?? Again just missing the action.}
26. Rcg7# 1-0
diff --git a/testsuite/tests/programs/joao-circular/Visfun_Lazy.hs b/testsuite/tests/programs/joao-circular/Visfun_Lazy.hs
index e4055350a1..cfb04e6918 100644
--- a/testsuite/tests/programs/joao-circular/Visfun_Lazy.hs
+++ b/testsuite/tests/programs/joao-circular/Visfun_Lazy.hs
@@ -861,11 +861,11 @@ visit_PPSArgs :: PPSArgs -> [T_Frame] -> (T_Errs, T_Fmts, Integer, T_Mins)
-- This function's most general type is
-- visit_PPSArgs :: forall a. (Integral a, Show a)
-- => PPSArgs -> [T_Frame] -> (T_Errs, T_Fmts, a, T_Mins)
--- But in the same mutually recusive group is visit_PPS whose type becomes
+-- But in the same mutually recursive group is visit_PPS whose type becomes
-- visit_PPS :: forall a. (Integral a, Show a)
-- => PPS -> T_Frame -> (Bool, T_Formats, INT, INT, INT)
-- which GHC now (rightfully) rejects that as ambiguous, even though
--- acutally default resolution will allow it at call sites,
+-- actually default resolution will allow it at call sites,
-- So I've added a type signature
-- SLPJ July 2012
diff --git a/testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs b/testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs
index db981b7c1f..dd17a9fcc9 100644
--- a/testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs
+++ b/testsuite/tests/typecheck/should_compile/LoopOfTheDay2.hs
@@ -32,7 +32,7 @@ baz = foo (T1b (T1a 3))
-->(I5) C2 () T1
-->(I3) C1 () T1, C1 () Int
-->(I1,I2) C0 T1, C0 Int
--->(recusive) C0 Int
+-->(recursive) C0 Int
-->(I6) C2 () Int
-->(I4) C1 () Int
-->(recursive) {}
diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs
index 3967c3c0bd..01afc9cb42 100644
--- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs
+++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.hs
@@ -24,13 +24,13 @@ foo5 = coerce :: Void -> ()
------------------------------------
-- This next one generates an exponentally big type as it
-- tries to unwrap. See comment:15 in #11518
--- Adding asserions that force the types can make us
+-- Adding assertions that force the types can make us
-- run out of space.
newtype VoidBad a = VoidBad (VoidBad (a,a))
foo5' = coerce :: (VoidBad ()) -> ()
------------------------------------
--- This shoul fail with a context stack overflow
+-- This should fail with a context stack overflow
newtype Fix f = Fix (f (Fix f))
foo6 = coerce :: Fix (Either Int) -> Fix (Either Age)
foo7 = coerce :: Fix (Either Int) -> ()
diff --git a/utils/gen-dll/Main.hs b/utils/gen-dll/Main.hs
index 237a43016e..10abbe89db 100644
--- a/utils/gen-dll/Main.hs
+++ b/utils/gen-dll/Main.hs
@@ -453,7 +453,7 @@ execLibTool input_def output_lib =
-- This function is called always and decided internally
-- what to do.
build_delay_import_lib :: String -- ^ input def file
- -> String -- ^ ouput import delayed import lib
+ -> String -- ^ output import delayed import lib
-> String -- ^ flag to indicate if delay import
-- lib should be created
-> IO ()
@@ -471,7 +471,7 @@ build_import_lib base dll_name defFile objs
-- This split is important because for DATA entries the compiler should not generate
-- a trampoline since CONTS DATA is directly referenced and not executed. This is not very
- -- important for mingw-w64 which would generate both the trampoline and direct referecne
+ -- important for mingw-w64 which would generate both the trampoline and direct reference
-- by default, but for libtool is it and even for mingw-w64 we can trim the output.
_ <- withFile defFile WriteMode $ \hDef -> do
hPutStrLn hDef $ unlines $ ["LIBRARY " ++ show dll_name
diff --git a/utils/genprimopcode/Syntax.hs b/utils/genprimopcode/Syntax.hs
index b848863135..4dc6e7b2dc 100644
--- a/utils/genprimopcode/Syntax.hs
+++ b/utils/genprimopcode/Syntax.hs
@@ -115,7 +115,7 @@ data SourceText = SourceText String
{- Do some simple sanity checks:
* all the default field names are unique
* for each PrimOpSpec, all override field names are unique
- * for each PrimOpSpec, all overriden field names
+ * for each PrimOpSpec, all overridden field names
have a corresponding default value
* that primop types correspond in certain ways to the
Category: eg if Comparison, the type must be of the form