summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/GHC/Hs/Expr.hs2
-rw-r--r--compiler/GHC/Hs/Pat.hs2
-rw-r--r--compiler/GHC/Platform/Regs.hs2
-rw-r--r--compiler/GHC/StgToCmm/Bind.hs2
-rw-r--r--compiler/GHC/StgToCmm/ExtCode.hs2
-rw-r--r--compiler/GHC/StgToCmm/Prim.hs2
-rw-r--r--compiler/basicTypes/OccName.hs2
-rw-r--r--compiler/basicTypes/VarSet.hs2
-rw-r--r--compiler/cmm/CmmBuildInfoTables.hs2
-rw-r--r--compiler/cmm/CmmMachOp.hs2
-rw-r--r--compiler/cmm/CmmNode.hs2
-rw-r--r--compiler/cmm/CmmPipeline.hs2
-rw-r--r--compiler/cmm/SMRep.hs2
-rw-r--r--compiler/cmm/cmm-notes370
-rw-r--r--compiler/coreSyn/CoreFVs.hs2
-rw-r--r--compiler/coreSyn/CoreLint.hs2
-rw-r--r--compiler/coreSyn/CoreSubst.hs2
-rw-r--r--compiler/coreSyn/CoreTidy.hs2
-rw-r--r--compiler/coreSyn/MkCore.hs2
-rw-r--r--compiler/deSugar/DsListComp.hs2
-rw-r--r--compiler/deSugar/MatchCon.hs2
-rw-r--r--compiler/ghci/ByteCodeInstr.hs2
-rw-r--r--compiler/hieFile/HieBin.hs2
-rw-r--r--compiler/iface/IfaceType.hs2
-rw-r--r--compiler/iface/TcIface.hs2
-rw-r--r--compiler/llvmGen/LlvmCodeGen/Base.hs2
-rw-r--r--compiler/main/Ar.hs2
-rw-r--r--compiler/main/DriverMkDepend.hs2
-rw-r--r--compiler/main/GHC.hs2
-rw-r--r--compiler/main/HscTypes.hs2
-rw-r--r--compiler/main/PprTyThing.hs2
-rw-r--r--compiler/nativeGen/BlockLayout.hs2
-rw-r--r--compiler/nativeGen/NCGMonad.hs2
-rw-r--r--compiler/nativeGen/PIC.hs2
-rw-r--r--compiler/nativeGen/PPC/CodeGen.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Main.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/SpillCost.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs2
-rw-r--r--compiler/parser/RdrHsSyn.hs2
-rw-r--r--compiler/prelude/TysPrim.hs2
-rw-r--r--compiler/simplCore/CoreMonad.hs2
-rw-r--r--compiler/simplCore/FloatOut.hs2
-rw-r--r--compiler/simplCore/LiberateCase.hs2
-rw-r--r--compiler/simplCore/SimplCore.hs2
-rw-r--r--compiler/simplCore/SimplEnv.hs2
-rw-r--r--compiler/specialise/Specialise.hs2
-rw-r--r--compiler/stranal/WwLib.hs2
-rw-r--r--compiler/typecheck/FamInst.hs2
-rw-r--r--compiler/typecheck/TcExpr.hs2
-rw-r--r--compiler/typecheck/TcOrigin.hs2
-rw-r--r--compiler/typecheck/TcPatSyn.hs2
-rw-r--r--compiler/typecheck/TcRules.hs2
-rw-r--r--compiler/types/Coercion.hs2
-rw-r--r--compiler/types/OptCoercion.hs2
-rw-r--r--compiler/types/TyCoFVs.hs2
-rw-r--r--compiler/types/TyCoSubst.hs2
-rw-r--r--compiler/types/TyCoTidy.hs2
-rw-r--r--compiler/utils/Binary.hs2
-rw-r--r--compiler/utils/Digraph.hs2
-rw-r--r--compiler/utils/FastString.hs4
-rw-r--r--compiler/utils/GraphBase.hs2
-rw-r--r--compiler/utils/GraphColor.hs2
-rw-r--r--compiler/utils/GraphOps.hs2
-rw-r--r--compiler/utils/Outputable.hs2
-rw-r--r--distrib/compare/compare.hs2
-rw-r--r--docs/core-spec/core-spec.mng2
-rwxr-xr-xdocs/opt-coercion/fc-normalization-rta.tex2
-rw-r--r--docs/users_guide/editing-guide.rst2
-rw-r--r--docs/users_guide/flags.py2
-rw-r--r--docs/users_guide/glasgow_exts.rst2
-rw-r--r--docs/users_guide/profiling.rst2
-rw-r--r--docs/users_guide/runtime_control.rst2
-rw-r--r--docs/users_guide/using-optimisation.rst2
-rw-r--r--docs/users_guide/using-warnings.rst2
-rw-r--r--hadrian/doc/make.md2
-rw-r--r--hadrian/doc/user-settings.md2
-rw-r--r--hadrian/src/Hadrian/Oracles/Cabal/Rules.hs2
-rw-r--r--hadrian/src/Hadrian/Oracles/Cabal/Type.hs2
-rw-r--r--hadrian/src/Hadrian/Oracles/TextFile.hs2
-rw-r--r--hadrian/src/Hadrian/Utilities.hs2
-rw-r--r--hadrian/src/Rules/Documentation.hs2
-rw-r--r--hadrian/src/Rules/Generate.hs2
-rw-r--r--hadrian/src/Rules/Test.hs2
-rw-r--r--hadrian/src/Settings/Builders/Ghc.hs2
-rw-r--r--includes/rts/OSThreads.h2
-rw-r--r--includes/stg/SMP.h2
-rw-r--r--libraries/base/Data/Semigroup/Internal.hs2
-rw-r--r--libraries/base/GHC/ExecutionStack/Internal.hsc2
-rw-r--r--libraries/base/GHC/IO/Encoding.hs4
-rw-r--r--libraries/base/GHC/IO/Encoding/CodePage/API.hs2
-rw-r--r--libraries/base/GHC/IO/Handle/Internals.hs2
-rw-r--r--libraries/base/GHC/IO/Handle/Lock.hs2
-rw-r--r--libraries/base/GHC/IO/Handle/Types.hs2
-rw-r--r--libraries/base/GHC/List.hs2
-rw-r--r--libraries/base/GHC/StaticPtr.hs2
-rw-r--r--libraries/base/GHC/TypeNats.hs2
-rw-r--r--libraries/base/System/IO.hs2
-rw-r--r--libraries/base/changelog.md2
-rw-r--r--libraries/base/codepages/MakeTable.hs2
-rw-r--r--libraries/base/configure.ac2
-rw-r--r--libraries/base/tests/IO/all.T2
-rw-r--r--libraries/ghc-prim/cbits/ctz.c2
-rw-r--r--libraries/integer-gmp/src/GHC/Integer/Type.hs2
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Syntax.hs2
-rw-r--r--mk/warnings.mk2
-rw-r--r--rts/Capability.c2
-rw-r--r--rts/Hpc.c2
-rw-r--r--rts/Linker.c2
-rw-r--r--rts/Profiling.c2
-rw-r--r--rts/RaiseAsync.c2
-rw-r--r--rts/RtsFlags.c2
-rw-r--r--rts/STM.h2
-rw-r--r--rts/Schedule.h2
-rw-r--r--rts/Stats.c2
-rw-r--r--rts/StgCRun.c2
-rw-r--r--rts/Threads.h2
-rw-r--r--rts/linker/LoadArchive.c2
-rw-r--r--rts/linker/M32Alloc.c2
-rw-r--r--rts/posix/Select.c2
-rw-r--r--rts/win32/ThrIOManager.c2
-rw-r--r--testsuite/README.md2
-rw-r--r--testsuite/driver/testlib.py2
-rw-r--r--testsuite/driver/testutil.py2
-rw-r--r--testsuite/tests/array/should_run/arr016.hs2
-rw-r--r--testsuite/tests/callarity/unittest/CallArity1.hs2
-rw-r--r--testsuite/tests/callarity/unittest/CallArity1.stderr2
-rw-r--r--testsuite/tests/codeGen/should_run/T5785.hs2
-rw-r--r--testsuite/tests/codeGen/should_run/cgrun021.hs2
-rw-r--r--testsuite/tests/codeGen/should_run/cgrun069_cmm.cmm2
-rw-r--r--testsuite/tests/concurrent/prog001/Trit.hs2
-rw-r--r--testsuite/tests/deSugar/should_compile/T5252.hs2
-rw-r--r--testsuite/tests/deSugar/should_compile/all.T2
-rw-r--r--testsuite/tests/deriving/should_fail/T11509_1.hs2
-rw-r--r--testsuite/tests/ffi/should_fail/ccfail003.hs2
-rw-r--r--testsuite/tests/gadt/gadt7.hs2
-rw-r--r--testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs2
-rw-r--r--testsuite/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs2
-rw-r--r--testsuite/tests/indexed-types/should_compile/Simple14.hs2
-rw-r--r--testsuite/tests/indexed-types/should_fail/Makefile2
-rw-r--r--testsuite/tests/numeric/should_run/T12136.hs2
-rw-r--r--testsuite/tests/numeric/should_run/arith018.hs2
-rw-r--r--testsuite/tests/numeric/should_run/numrun014.hs4
-rw-r--r--testsuite/tests/numeric/should_run/numrun014.stdout4
-rw-r--r--testsuite/tests/pmcheck/should_compile/T17357.hs2
-rw-r--r--testsuite/tests/programs/andy_cherry/Main.hs10
-rw-r--r--testsuite/tests/rename/should_compile/mc09.hs2
-rw-r--r--testsuite/tests/rename/should_compile/mc10.hs2
-rw-r--r--testsuite/tests/rename/should_fail/T12686.hs2
-rw-r--r--testsuite/tests/rename/should_fail/mc14.hs2
-rw-r--r--testsuite/tests/safeHaskell/check/all.T2
-rw-r--r--testsuite/tests/safeHaskell/ghci/p2.script2
-rw-r--r--testsuite/tests/safeHaskell/safeInfered/all.T2
-rw-r--r--testsuite/tests/safeHaskell/safeLanguage/all.T2
-rw-r--r--testsuite/tests/simplCore/prog003/OneShot1.hs2
-rw-r--r--testsuite/tests/simplCore/should_compile/dfun-loop.hs2
-rw-r--r--testsuite/tests/th/T11809.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/TcCustomSolverSuper.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc109.hs2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc199.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail105.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail129.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail138.hs2
-rw-r--r--testsuite/tests/warnings/should_compile/all.T2
-rw-r--r--testsuite/tests/warnings/should_compile/sel_werror.hs3
-rw-r--r--testsuite/timeout/timeout.cabal2
-rw-r--r--utils/hp2ps/hp2ps.12
-rw-r--r--utils/iserv-proxy/iserv-proxy.cabal.in2
-rw-r--r--utils/remote-iserv/remote-iserv.cabal.in2
168 files changed, 359 insertions, 362 deletions
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index 9955efaeb1..13ca6b0eff 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -2572,7 +2572,7 @@ data ArithSeqInfo id
| FromThenTo (LHsExpr id)
(LHsExpr id)
(LHsExpr id)
--- AZ: Sould ArithSeqInfo have a TTG extension?
+-- AZ: Should ArithSeqInfo have a TTG extension?
instance OutputableBndrId p
=> Outputable (ArithSeqInfo (GhcPass p)) where
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs
index d8ae451ee9..bb319181d3 100644
--- a/compiler/GHC/Hs/Pat.hs
+++ b/compiler/GHC/Hs/Pat.hs
@@ -686,7 +686,7 @@ isIrrefutableHsPat :: (OutputableBndrId p) => LPat (GhcPass p) -> Bool
-- Specifically on a ConPatIn, which is what it sees for a
-- (LPat Name) in the renamer, it doesn't know the size of the
-- constructor family, so it returns False. Result: only
--- tuple patterns are considered irrefuable at the renamer stage.
+-- tuple patterns are considered irrefutable at the renamer stage.
--
-- But if it returns True, the pattern is definitely irrefutable
isIrrefutableHsPat
diff --git a/compiler/GHC/Platform/Regs.hs b/compiler/GHC/Platform/Regs.hs
index fe6588d067..c304d4f5ad 100644
--- a/compiler/GHC/Platform/Regs.hs
+++ b/compiler/GHC/Platform/Regs.hs
@@ -42,7 +42,7 @@ callerSaves platform
-- The order matters (for the llvm backend anyway)! We must make sure to
-- maintain the order here with the order used in the LLVM calling conventions.
-- Note that also, this isn't all registers, just the ones that are currently
--- possbily mapped to real registers.
+-- possibly mapped to real registers.
activeStgRegs :: Platform -> [GlobalReg]
activeStgRegs platform
| platformUnregisterised platform = NoRegs.activeStgRegs
diff --git a/compiler/GHC/StgToCmm/Bind.hs b/compiler/GHC/StgToCmm/Bind.hs
index 3eeb575da7..b1cb34ace7 100644
--- a/compiler/GHC/StgToCmm/Bind.hs
+++ b/compiler/GHC/StgToCmm/Bind.hs
@@ -198,7 +198,7 @@ cgRhs :: Id
CgIdInfo -- The info for this binding
, FCode CmmAGraph -- A computation which will generate the
-- code for the binding, and return an
- -- assignent of the form "x = Hp - n"
+ -- assignment of the form "x = Hp - n"
-- (see above)
)
diff --git a/compiler/GHC/StgToCmm/ExtCode.hs b/compiler/GHC/StgToCmm/ExtCode.hs
index be2592edd3..4a5225eec6 100644
--- a/compiler/GHC/StgToCmm/ExtCode.hs
+++ b/compiler/GHC/StgToCmm/ExtCode.hs
@@ -102,7 +102,7 @@ instance HasDynFlags CmmParse where
return (d, dflags))
--- | Takes the variable decarations and imports from the monad
+-- | Takes the variable declarations and imports from the monad
-- and makes an environment, which is looped back into the computation.
-- In this way, we can have embedded declarations that scope over the whole
-- procedure, and imports that scope over the entire module.
diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs
index 85924d984e..51efe44a42 100644
--- a/compiler/GHC/StgToCmm/Prim.hs
+++ b/compiler/GHC/StgToCmm/Prim.hs
@@ -2159,7 +2159,7 @@ vecElemProjectCast _ _ _ = Nothing
-- values!
-- The current design with respect to register mapping of scalars could
-- very well be the best,but exploring the design space and doing careful
--- measurments is the only only way to validate that.
+-- measurements is the only only way to validate that.
-- In some next generation CPU ISAs, notably RISC V, the SIMD extension
-- includes support for a sort of run time CPU dependent vectorization parameter,
-- where a loop may act upon a single scalar each iteration OR some 2,4,8 ...
diff --git a/compiler/basicTypes/OccName.hs b/compiler/basicTypes/OccName.hs
index fa259725cf..1b25f08c2b 100644
--- a/compiler/basicTypes/OccName.hs
+++ b/compiler/basicTypes/OccName.hs
@@ -582,7 +582,7 @@ mk_deriv occ_sp sys_prefix str =
mkOccNameFS occ_sp (concatFS $ sys_prefix : str)
isDerivedOccName :: OccName -> Bool
--- ^ Test for definitions internally generated by GHC. This predicte
+-- ^ Test for definitions internally generated by GHC. This predicate
-- is used to suppress printing of internal definitions in some debug prints
isDerivedOccName occ =
case occNameString occ of
diff --git a/compiler/basicTypes/VarSet.hs b/compiler/basicTypes/VarSet.hs
index 2cf15eb3e5..c3b25970f2 100644
--- a/compiler/basicTypes/VarSet.hs
+++ b/compiler/basicTypes/VarSet.hs
@@ -319,7 +319,7 @@ seqDVarSet s = sizeDVarSet s `seq` ()
extendDVarSetList :: DVarSet -> [Var] -> DVarSet
extendDVarSetList = addListToUniqDSet
--- | Convert a DVarSet to a VarSet by forgeting the order of insertion
+-- | Convert a DVarSet to a VarSet by forgetting the order of insertion
dVarSetToVarSet :: DVarSet -> VarSet
dVarSetToVarSet = unsafeUFMToUniqSet . udfmToUfm . getUniqDSet
diff --git a/compiler/cmm/CmmBuildInfoTables.hs b/compiler/cmm/CmmBuildInfoTables.hs
index 9dc66a44e1..81c86fdad5 100644
--- a/compiler/cmm/CmmBuildInfoTables.hs
+++ b/compiler/cmm/CmmBuildInfoTables.hs
@@ -227,7 +227,7 @@ implemented.
case, if the closure is not locally defined then we can't point to
it directly from the info table, because this is the text section
which cannot contain runtime relocations. In this case we skip this
- optimisation and generate the singleton SRT, becase SRTs are in the
+ optimisation and generate the singleton SRT, because SRTs are in the
data section and *can* have relocatable references.
2. [FUN] A static function closure can also be an SRT, we simply put
diff --git a/compiler/cmm/CmmMachOp.hs b/compiler/cmm/CmmMachOp.hs
index f8b7d4fb74..418ebec13f 100644
--- a/compiler/cmm/CmmMachOp.hs
+++ b/compiler/cmm/CmmMachOp.hs
@@ -135,7 +135,7 @@ data MachOp
| MO_VU_Quot Length Width
| MO_VU_Rem Length Width
- -- Floting point vector element insertion and extraction operations
+ -- Floating point vector element insertion and extraction operations
| MO_VF_Insert Length Width -- Insert scalar into vector
| MO_VF_Extract Length Width -- Extract scalar from vector
diff --git a/compiler/cmm/CmmNode.hs b/compiler/cmm/CmmNode.hs
index 1b387020f5..f9bad961e6 100644
--- a/compiler/cmm/CmmNode.hs
+++ b/compiler/cmm/CmmNode.hs
@@ -715,7 +715,7 @@ isTickSubScope = cmp
cmp (SubScope u s) s'@(SubScope u' _) = u == u' || cmp s s'
-- | Combine two tick scopes. The new scope should be sub-scope of
--- both parameters. We simplfy automatically if one tick scope is a
+-- both parameters. We simplify automatically if one tick scope is a
-- sub-scope of the other already.
combineTickScopes :: CmmTickScope -> CmmTickScope -> CmmTickScope
combineTickScopes s1 s2
diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs
index fbabea8f66..e7689a6bfe 100644
--- a/compiler/cmm/CmmPipeline.hs
+++ b/compiler/cmm/CmmPipeline.hs
@@ -297,7 +297,7 @@ cpsTop hsc_env proc =
-- Sp = Sp + 16
-- ...y...y...
--
--- But since we don't see any benefits from running sinking befroe stack
+-- But since we don't see any benefits from running sinking before stack
-- layout, this situation probably doesn't arise too often in practice.
--
diff --git a/compiler/cmm/SMRep.hs b/compiler/cmm/SMRep.hs
index 49137eff25..fe4ed58bfe 100644
--- a/compiler/cmm/SMRep.hs
+++ b/compiler/cmm/SMRep.hs
@@ -15,7 +15,7 @@ module SMRep (
StgHalfWord, fromStgHalfWord, toStgHalfWord,
halfWordSize, halfWordSizeInBits,
- -- * Closure repesentation
+ -- * Closure representation
SMRep(..), -- CmmInfo sees the rep; no one else does
IsStatic,
ClosureTypeInfo(..), ArgDescr(..), Liveness,
diff --git a/compiler/cmm/cmm-notes b/compiler/cmm/cmm-notes
index 82d9673162..c1907f5908 100644
--- a/compiler/cmm/cmm-notes
+++ b/compiler/cmm/cmm-notes
@@ -1,185 +1,185 @@
-More notes (Aug 11)
-~~~~~~~~~~~~~~~~~~
-* CmmInfo.cmmToRawCmm expands info tables to their representations
- (needed for .cmm files as well as the code generators)
-
-* Why is FCode a lazy monad? That makes it inefficient.
- We want laziness to get code out one procedure at a time,
- but not at the instruction level.
- UPDATE (31/5/2016): FCode is strict since 09afcc9b.
-
-Things we did
- * Remove CmmCvt.graphToZgraph (Conversion from old to new Cmm reps)
- * Remove HscMain.optionallyConvertAndOrCPS (converted old Cmm to
- new, ran pipeline, and converted back)
- * Remove CmmDecl. Put its types in Cmm. Import Cmm into OldCmm
- so it can get those types.
-
-
-More notes (June 11)
-~~~~~~~~~~~~~~~~~~~~
-
-* In CmmContFlowOpts.branchChainElim, can a single block be the
- successor of two calls?
-
-* Check in ClosureInfo:
- -- NB: Results here should line up with the results of SMRep.rtsClosureType
-
-More notes (May 11)
-~~~~~~~~~~~~~~~~~~~
-In CmmNode, consider spliting CmmCall into two: call and jump
-
-Notes on new codegen (Aug 10)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Things to do:
- - Proc points pass all arguments on the stack, adding more code and
- slowing down things a lot. We either need to fix this or even better
- would be to get rid of proc points.
-
- - Sort out Label, LabelMap, LabelSet versus BlockId, BlockEnv, BlockSet
- dichotomy. Mostly this means global replace, but we also need to make
- Label an instance of Outputable (probably in the Outputable module).
-
- EZY: We should use Label, since that's the terminology Hoopl uses.
-
- - AsmCodeGen has a generic Cmm optimiser; move this into new pipeline
- EZY (2011-04-16): The mini-inliner has been generalized and ported,
- but the constant folding and other optimizations need to still be
- ported.
-
- - AsmCodeGen has post-native-cg branch eliminator (shortCutBranches);
- we ultimately want to share this with the Cmm branch eliminator.
-
- - At the moment, references to global registers like Hp are "lowered"
- late (in CgUtils.fixStgRegisters). We should do this early, in the
- new native codegen, much in the way that we lower calling conventions.
- Might need to be a bit sophisticated about aliasing.
-
- - Move to new Cmm rep:
- * Make native CG consume New Cmm;
- * Convert Old Cmm->New Cmm to keep old path alive
- * Produce New Cmm when reading in .cmm files
-
- - Top-level SRT threading is a bit ugly
-
- - See "CAFs" below; we want to totally refactor the way SRTs are calculated
-
- - Garbage-collect https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/cps
- moving good stuff into
- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/new-code-gen-pipeline
-
- - Currently AsmCodeGen top level calls AsmCodeGen.cmmToCmm, which is a small
- C-- optimiser. It has quite a lot of boilerplate folding code in AsmCodeGen
- (cmmBlockConFold, cmmStmtConFold, cmmExprConFold), before calling out to
- CmmOpt. ToDo: see what optimisations are being done; and do them before
- AsmCodeGen.
-
- - If we stick CAF and stack liveness info on a LastCall node (not LastRet/Jump)
- then all CAF and stack liveness stuff be completed before we split
- into separate C procedures.
-
- Short term:
- compute and attach liveness into LastCall
- right at end, split, cvt to old rep
- [must split before cvt, because old rep is not expressive enough]
-
- Longer term:
- when old rep disappears,
- move the whole splitting game into the C back end *only*
- (guided by the procpoint set)
-
-----------------------------------------------------
- Proc-points
-----------------------------------------------------
-
-Consider this program, which has a diamond control flow,
-with a call on one branch
- fn(p,x) {
- h()
- if b then { ... f(x) ...; q=5; goto J }
- else { ...; q=7; goto J }
- J: ..p...q...
- }
-then the join point J is a "proc-point". So, is 'p' passed to J
-as a parameter? Or, if 'p' was saved on the stack anyway, perhaps
-to keep it alive across the call to h(), maybe 'p' gets communicated
-to J that way. This is an awkward choice. (We think that we currently
-never pass variables to join points via arguments.)
-
-Furthermore, there is *no way* to pass q to J in a register (other
-than a parameter register).
-
-What we want is to do register allocation across the whole caboodle.
-Then we could drop all the code that deals with the above awkward
-decisions about spilling variables across proc-points.
-
-Note that J doesn't need an info table.
-
-What we really want is for each LastCall (not LastJump/Ret)
-to have an info table. Note that ProcPoints that are not successors
-of calls don't need an info table.
-
-Figuring out proc-points
-~~~~~~~~~~~~~~~~~~~~~~~~
-Proc-points are identified by
-CmmProcPoint.minimalProcPointSet/extendPPSet Although there isn't
-that much code, JD thinks that it could be done much more nicely using
-a dominator analysis, using the Dataflow Engine.
-
-----------------------------------------------------
- CAFs
-----------------------------------------------------
-
-* The code for a procedure f may refer to either the *closure*
- or the *entry point* of another top-level procedure g.
- If f is live, then so is g. f's SRT must include g's closure.
-
-* The CLabel for the entry-point/closure reveals whether g is
- a CAF (or refers to CAFs). See the IdLabel constructor of CLabel.
-
-* The CAF-ness of the original top-level definitions is figured out
- (by TidyPgm) before we generate C--. This CafInfo is only set for
- top-level Ids; nested bindings stay with MayHaveCafRefs.
-
-* Currently an SRT contains (only) pointers to (top-level) closures.
-
-* Consider this Core code
- f = \x -> let g = \y -> ...x...y...h1...
- in ...h2...g...
- and suppose that h1, h2 have IdInfo of MayHaveCafRefs.
- Therefore, so will f, But g will not (since it's nested).
-
- This generates C-- roughly like this:
- f_closure: .word f_entry
- f_entry() [info-tbl-for-f] { ...jump g_entry...jump h2... }
- g_entry() [info-tbl-for-g] { ...jump h1... }
-
- Note that there is no top-level closure for g (only an info table).
- This fact (whether or not there is a top-level closure) is recorded
- in the InfoTable attached to the CmmProc for f, g
- INVARIANT:
- Any out-of-Group references to an IdLabel goes to
- a Proc whose InfoTable says "I have a top-level closure".
- Equivalently:
- A CmmProc whose InfoTable says "I do not have a top-level
- closure" is referred to only from its own Group.
-
-* So: info-tbl-for-f must have an SRT that keeps h1,h2 alive
- info-tbl-for-g must have an SRT that keeps h1 (only) alive
-
- But if we just look for the free CAF refs, we get:
- f h2 (only)
- g h1
-
- So we need to do a transitive closure thing to flesh out
- f's keep-alive refs to include h1.
-
-* The SRT info is the C_SRT field of Cmm.ClosureTypeInfo in a
- CmmInfoTable attached to each CmmProc. CmmPipeline.toTops actually does
- the attaching, right at the end of the pipeline. The C_SRT part
- gives offsets within a single, shared table of closure pointers.
-
-* DECIDED: we can generate SRTs based on the final Cmm program
- without knowledge of how it is generated.
-
+More notes (Aug 11)
+~~~~~~~~~~~~~~~~~~
+* CmmInfo.cmmToRawCmm expands info tables to their representations
+ (needed for .cmm files as well as the code generators)
+
+* Why is FCode a lazy monad? That makes it inefficient.
+ We want laziness to get code out one procedure at a time,
+ but not at the instruction level.
+ UPDATE (31/5/2016): FCode is strict since 09afcc9b.
+
+Things we did
+ * Remove CmmCvt.graphToZgraph (Conversion from old to new Cmm reps)
+ * Remove HscMain.optionallyConvertAndOrCPS (converted old Cmm to
+ new, ran pipeline, and converted back)
+ * Remove CmmDecl. Put its types in Cmm. Import Cmm into OldCmm
+ so it can get those types.
+
+
+More notes (June 11)
+~~~~~~~~~~~~~~~~~~~~
+
+* In CmmContFlowOpts.branchChainElim, can a single block be the
+ successor of two calls?
+
+* Check in ClosureInfo:
+ -- NB: Results here should line up with the results of SMRep.rtsClosureType
+
+More notes (May 11)
+~~~~~~~~~~~~~~~~~~~
+In CmmNode, consider splitting CmmCall into two: call and jump
+
+Notes on new codegen (Aug 10)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Things to do:
+ - Proc points pass all arguments on the stack, adding more code and
+ slowing down things a lot. We either need to fix this or even better
+ would be to get rid of proc points.
+
+ - Sort out Label, LabelMap, LabelSet versus BlockId, BlockEnv, BlockSet
+ dichotomy. Mostly this means global replace, but we also need to make
+ Label an instance of Outputable (probably in the Outputable module).
+
+ EZY: We should use Label, since that's the terminology Hoopl uses.
+
+ - AsmCodeGen has a generic Cmm optimiser; move this into new pipeline
+ EZY (2011-04-16): The mini-inliner has been generalized and ported,
+ but the constant folding and other optimizations need to still be
+ ported.
+
+ - AsmCodeGen has post-native-cg branch eliminator (shortCutBranches);
+ we ultimately want to share this with the Cmm branch eliminator.
+
+ - At the moment, references to global registers like Hp are "lowered"
+ late (in CgUtils.fixStgRegisters). We should do this early, in the
+ new native codegen, much in the way that we lower calling conventions.
+ Might need to be a bit sophisticated about aliasing.
+
+ - Move to new Cmm rep:
+ * Make native CG consume New Cmm;
+ * Convert Old Cmm->New Cmm to keep old path alive
+ * Produce New Cmm when reading in .cmm files
+
+ - Top-level SRT threading is a bit ugly
+
+ - See "CAFs" below; we want to totally refactor the way SRTs are calculated
+
+ - Garbage-collect https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/cps
+ moving good stuff into
+ https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/new-code-gen-pipeline
+
+ - Currently AsmCodeGen top level calls AsmCodeGen.cmmToCmm, which is a small
+ C-- optimiser. It has quite a lot of boilerplate folding code in AsmCodeGen
+ (cmmBlockConFold, cmmStmtConFold, cmmExprConFold), before calling out to
+ CmmOpt. ToDo: see what optimisations are being done; and do them before
+ AsmCodeGen.
+
+ - If we stick CAF and stack liveness info on a LastCall node (not LastRet/Jump)
+ then all CAF and stack liveness stuff be completed before we split
+ into separate C procedures.
+
+ Short term:
+ compute and attach liveness into LastCall
+ right at end, split, cvt to old rep
+ [must split before cvt, because old rep is not expressive enough]
+
+ Longer term:
+ when old rep disappears,
+ move the whole splitting game into the C back end *only*
+ (guided by the procpoint set)
+
+----------------------------------------------------
+ Proc-points
+----------------------------------------------------
+
+Consider this program, which has a diamond control flow,
+with a call on one branch
+ fn(p,x) {
+ h()
+ if b then { ... f(x) ...; q=5; goto J }
+ else { ...; q=7; goto J }
+ J: ..p...q...
+ }
+then the join point J is a "proc-point". So, is 'p' passed to J
+as a parameter? Or, if 'p' was saved on the stack anyway, perhaps
+to keep it alive across the call to h(), maybe 'p' gets communicated
+to J that way. This is an awkward choice. (We think that we currently
+never pass variables to join points via arguments.)
+
+Furthermore, there is *no way* to pass q to J in a register (other
+than a parameter register).
+
+What we want is to do register allocation across the whole caboodle.
+Then we could drop all the code that deals with the above awkward
+decisions about spilling variables across proc-points.
+
+Note that J doesn't need an info table.
+
+What we really want is for each LastCall (not LastJump/Ret)
+to have an info table. Note that ProcPoints that are not successors
+of calls don't need an info table.
+
+Figuring out proc-points
+~~~~~~~~~~~~~~~~~~~~~~~~
+Proc-points are identified by
+CmmProcPoint.minimalProcPointSet/extendPPSet Although there isn't
+that much code, JD thinks that it could be done much more nicely using
+a dominator analysis, using the Dataflow Engine.
+
+----------------------------------------------------
+ CAFs
+----------------------------------------------------
+
+* The code for a procedure f may refer to either the *closure*
+ or the *entry point* of another top-level procedure g.
+ If f is live, then so is g. f's SRT must include g's closure.
+
+* The CLabel for the entry-point/closure reveals whether g is
+ a CAF (or refers to CAFs). See the IdLabel constructor of CLabel.
+
+* The CAF-ness of the original top-level definitions is figured out
+ (by TidyPgm) before we generate C--. This CafInfo is only set for
+ top-level Ids; nested bindings stay with MayHaveCafRefs.
+
+* Currently an SRT contains (only) pointers to (top-level) closures.
+
+* Consider this Core code
+ f = \x -> let g = \y -> ...x...y...h1...
+ in ...h2...g...
+ and suppose that h1, h2 have IdInfo of MayHaveCafRefs.
+ Therefore, so will f, But g will not (since it's nested).
+
+ This generates C-- roughly like this:
+ f_closure: .word f_entry
+ f_entry() [info-tbl-for-f] { ...jump g_entry...jump h2... }
+ g_entry() [info-tbl-for-g] { ...jump h1... }
+
+ Note that there is no top-level closure for g (only an info table).
+ This fact (whether or not there is a top-level closure) is recorded
+ in the InfoTable attached to the CmmProc for f, g
+ INVARIANT:
+ Any out-of-Group references to an IdLabel goes to
+ a Proc whose InfoTable says "I have a top-level closure".
+ Equivalently:
+ A CmmProc whose InfoTable says "I do not have a top-level
+ closure" is referred to only from its own Group.
+
+* So: info-tbl-for-f must have an SRT that keeps h1,h2 alive
+ info-tbl-for-g must have an SRT that keeps h1 (only) alive
+
+ But if we just look for the free CAF refs, we get:
+ f h2 (only)
+ g h1
+
+ So we need to do a transitive closure thing to flesh out
+ f's keep-alive refs to include h1.
+
+* The SRT info is the C_SRT field of Cmm.ClosureTypeInfo in a
+ CmmInfoTable attached to each CmmProc. CmmPipeline.toTops actually does
+ the attaching, right at the end of the pipeline. The C_SRT part
+ gives offsets within a single, shared table of closure pointers.
+
+* DECIDED: we can generate SRTs based on the final Cmm program
+ without knowledge of how it is generated.
+
diff --git a/compiler/coreSyn/CoreFVs.hs b/compiler/coreSyn/CoreFVs.hs
index fef3915c51..82b6805af5 100644
--- a/compiler/coreSyn/CoreFVs.hs
+++ b/compiler/coreSyn/CoreFVs.hs
@@ -496,7 +496,7 @@ ruleLhsFreeIds = fvVarSet . ruleLhsFVIds
ruleLhsFreeIdsList :: CoreRule -> [Var]
-- ^ This finds all locally-defined free Ids on the left hand side of a rule
--- and returns them as a determinisitcally ordered list
+-- and returns them as a deterministically ordered list
ruleLhsFreeIdsList = fvVarList . ruleLhsFVIds
ruleLhsFVIds :: CoreRule -> FV
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 4aeb2cf698..7c4137e9b5 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -166,7 +166,7 @@ That is, use a type let. See Note [Type let] in CoreSyn.
However, when linting <body> we need to remember that a=Int, else we might
reject a correct program. So we carry a type substitution (in this example
-[a -> Int]) and apply this substitution before comparing types. The functin
+[a -> Int]) and apply this substitution before comparing types. The function
lintInTy :: Type -> LintM (Type, Kind)
returns a substituted type.
diff --git a/compiler/coreSyn/CoreSubst.hs b/compiler/coreSyn/CoreSubst.hs
index afb8946426..904e9eec04 100644
--- a/compiler/coreSyn/CoreSubst.hs
+++ b/compiler/coreSyn/CoreSubst.hs
@@ -745,7 +745,7 @@ Breakpoints can't handle free variables with unlifted types anyway.
{-
Note [Worker inlining]
~~~~~~~~~~~~~~~~~~~~~~
-A worker can get sustituted away entirely.
+A worker can get substituted away entirely.
- it might be trivial
- it might simply be very small
We do not treat an InlWrapper as an 'occurrence' in the occurrence
diff --git a/compiler/coreSyn/CoreTidy.hs b/compiler/coreSyn/CoreTidy.hs
index 3c924663f5..7642606813 100644
--- a/compiler/coreSyn/CoreTidy.hs
+++ b/compiler/coreSyn/CoreTidy.hs
@@ -196,7 +196,7 @@ tidyLetBndr rec_tidy_env env@(tidy_env, var_env) id
-- Don't attempt to recompute arity here; this is just tidying!
-- Trying to do so led to #17294
--
- -- Set inline-prag info so that we preseve it across
+ -- Set inline-prag info so that we preserve it across
-- separate compilation boundaries
old_info = idInfo id
new_info = vanillaIdInfo
diff --git a/compiler/coreSyn/MkCore.hs b/compiler/coreSyn/MkCore.hs
index 73f371edd0..7e5bbe548c 100644
--- a/compiler/coreSyn/MkCore.hs
+++ b/compiler/coreSyn/MkCore.hs
@@ -886,7 +886,7 @@ After doing case-of-known-constructor, and expanding $WMkT we get
Yikes! That bogusly appears to evaluate the absentError!
This is extremely tiresome. Another way to think of this is that, in
-Core, it is an invariant that a strict data contructor, like MkT, must
+Core, it is an invariant that a strict data constructor, like MkT, must
be applied only to an argument in HNF. So (absentError "blah") had
better be non-bottom.
diff --git a/compiler/deSugar/DsListComp.hs b/compiler/deSugar/DsListComp.hs
index 74fffacc73..35a71ce8e4 100644
--- a/compiler/deSugar/DsListComp.hs
+++ b/compiler/deSugar/DsListComp.hs
@@ -380,7 +380,7 @@ dfBindComp c_id n_id (pat, core_list1) quals = do
b <- newSysLocalDs b_ty
x <- newSysLocalDs x_ty
- -- build rest of the comprehesion
+ -- build rest of the comprehension
core_rest <- dfListComp c_id b quals
-- build the pattern match
diff --git a/compiler/deSugar/MatchCon.hs b/compiler/deSugar/MatchCon.hs
index 43d71acfdf..d1a0390da1 100644
--- a/compiler/deSugar/MatchCon.hs
+++ b/compiler/deSugar/MatchCon.hs
@@ -253,7 +253,7 @@ Now consider:
In the first we must test y first; in the second we must test x
first. So we must divide even the equations for a single constructor
-T into sub-goups, based on whether they match the same field in the
+T into sub-groups, based on whether they match the same field in the
same order. That's what the (groupBy compatible_pats) grouping.
All non-record patterns are "compatible" in this sense, because the
diff --git a/compiler/ghci/ByteCodeInstr.hs b/compiler/ghci/ByteCodeInstr.hs
index c386ece52a..b0db198037 100644
--- a/compiler/ghci/ByteCodeInstr.hs
+++ b/compiler/ghci/ByteCodeInstr.hs
@@ -68,7 +68,7 @@ data BCInstr
| PUSH32 !Word16
-- Push the specifiec local as a 8, 16, 32 bit value onto the stack, but the
- -- value will take the whole word on the stack (i.e., the stack will gorw by
+ -- value will take the whole word on the stack (i.e., the stack will grow by
-- a word)
-- This is useful when extracting a packed constructor field for further use.
-- Currently we expect all values on the stack to take full words, except for
diff --git a/compiler/hieFile/HieBin.hs b/compiler/hieFile/HieBin.hs
index 0a5d60df92..866c0f007f 100644
--- a/compiler/hieFile/HieBin.hs
+++ b/compiler/hieFile/HieBin.hs
@@ -48,7 +48,7 @@ instance Ord HieName where
compare (ExternalName a b c) (ExternalName d e f) = compare (a,b,c) (d,e,f)
compare (LocalName a b) (LocalName c d) = compare (a,b) (c,d)
compare (KnownKeyName a) (KnownKeyName b) = nonDetCmpUnique a b
- -- Not actually non determinstic as it is a KnownKey
+ -- Not actually non deterministic as it is a KnownKey
compare ExternalName{} _ = LT
compare LocalName{} ExternalName{} = GT
compare LocalName{} _ = LT
diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs
index d649be701b..7a8c617bb7 100644
--- a/compiler/iface/IfaceType.hs
+++ b/compiler/iface/IfaceType.hs
@@ -1320,7 +1320,7 @@ pprTyTcApp' ctxt_prec tc tys dflags style
| otherwise
= getPprDebug $ \dbg ->
if | not dbg && tc `ifaceTyConHasKey` errorMessageTypeErrorFamKey
- -- Suppress detail unles you _really_ want to see
+ -- Suppress detail unless you _really_ want to see
-> text "(TypeError ...)"
| Just doc <- ppr_equality ctxt_prec tc (appArgsIfaceTypes tys)
diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs
index 818745775a..34cf2c247e 100644
--- a/compiler/iface/TcIface.hs
+++ b/compiler/iface/TcIface.hs
@@ -495,7 +495,7 @@ tcHiBootIface hsc_src mod
-- In --make and interactive mode, if this module has an hs-boot file
-- we'll have compiled it already, and it'll be in the HPT
--
- -- We check wheher the interface is a *boot* interface.
+ -- We check whether the interface is a *boot* interface.
-- It can happen (when using GHC from Visual Studio) that we
-- compile a module in TypecheckOnly mode, with a stable,
-- fully-populated HPT. In that case the boot interface isn't there
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs
index f43c3dcf75..9ddb23aade 100644
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs
@@ -582,7 +582,7 @@ aliasify (LMGlobal var val) = do
-- point of definition instead of the point of usage, as was previously
-- done. See #9142 for details.
--
--- Finally, case (1) is trival. As we already have a definition for
+-- Finally, case (1) is trivial. As we already have a definition for
-- and therefore know the type of the referenced symbol, we can do
-- away with casting the alias to the desired type in @getSymbolPtr@
-- and instead just emit a reference to the definition symbol directly.
diff --git a/compiler/main/Ar.hs b/compiler/main/Ar.hs
index 73292d0ae3..1a1862a6fe 100644
--- a/compiler/main/Ar.hs
+++ b/compiler/main/Ar.hs
@@ -13,7 +13,7 @@ the same name.)
As Archives are rather simple structurally, we can just build the archives
with Haskell directly and use ranlib on the final result to get the symbol
index. This should allow us to work around with the differences/abailability
-of libtool across differet platforms.
+of libtool across different platforms.
-}
module Ar
(ArchiveEntry(..)
diff --git a/compiler/main/DriverMkDepend.hs b/compiler/main/DriverMkDepend.hs
index 6368d8c785..04b438c018 100644
--- a/compiler/main/DriverMkDepend.hs
+++ b/compiler/main/DriverMkDepend.hs
@@ -383,7 +383,7 @@ pprCycle summaries = pp_group (CyclicSCC summaries)
pp_group (CyclicSCC mss)
= ASSERT( not (null boot_only) )
-- The boot-only list must be non-empty, else there would
- -- be an infinite chain of non-boot imoprts, and we've
+ -- be an infinite chain of non-boot imports, and we've
-- already checked for that in processModDeps
pp_ms loop_breaker $$ vcat (map pp_group groups)
where
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index def7065ab6..140c8904e2 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -638,7 +638,7 @@ setProgramDynFlags_ invalidate_needed dflags = do
-- that the next downsweep will think that all the files have changed
-- and preprocess them again. This won't necessarily cause everything
-- to be recompiled, because by the time we check whether we need to
--- recopmile a module, we'll have re-summarised the module and have a
+-- recompile a module, we'll have re-summarised the module and have a
-- correct ModSummary.
--
invalidateModSummaryCache :: GhcMonad m => m ()
diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs
index d1e0603088..4a848864f8 100644
--- a/compiler/main/HscTypes.hs
+++ b/compiler/main/HscTypes.hs
@@ -1651,7 +1651,7 @@ It's exactly the same for type-family instances. See #7102
data InteractiveContext
= InteractiveContext {
ic_dflags :: DynFlags,
- -- ^ The 'DynFlags' used to evaluate interative expressions
+ -- ^ The 'DynFlags' used to evaluate interactive expressions
-- and statements.
ic_mod_index :: Int,
diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs
index 4e49b6c661..b918943c8e 100644
--- a/compiler/main/PprTyThing.hs
+++ b/compiler/main/PprTyThing.hs
@@ -38,7 +38,7 @@ import Outputable
{- Note [Pretty printing via IfaceSyn]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Our general plan for prett-printing
+Our general plan for pretty-printing
- Types
- TyCons
- Classes
diff --git a/compiler/nativeGen/BlockLayout.hs b/compiler/nativeGen/BlockLayout.hs
index ba15e0063f..9b5f2eda8f 100644
--- a/compiler/nativeGen/BlockLayout.hs
+++ b/compiler/nativeGen/BlockLayout.hs
@@ -374,7 +374,7 @@ combineNeighbourhood :: [CfgEdge] -- ^ Edges to consider
-- were used to fuse chains and as such no longer need to be
-- considered.
combineNeighbourhood edges chains
- = -- pprTraceIt "Neigbours" $
+ = -- pprTraceIt "Neighbours" $
-- pprTrace "combineNeighbours" (ppr edges) $
applyEdges edges endFrontier startFrontier (Set.empty)
where
diff --git a/compiler/nativeGen/NCGMonad.hs b/compiler/nativeGen/NCGMonad.hs
index 71503aa653..e1bb927d0b 100644
--- a/compiler/nativeGen/NCGMonad.hs
+++ b/compiler/nativeGen/NCGMonad.hs
@@ -226,7 +226,7 @@ addNodeBetweenNat from between to
addWeightEdge between old weight .
delEdge from old $ m
| otherwise
- = pprPanic "Faild to update cfg: Untracked edge" (ppr (from,to))
+ = pprPanic "Failed to update cfg: Untracked edge" (ppr (from,to))
-- | Place `succ` after `block` and change any edges
diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
index a38f3fa18f..760ba7925d 100644
--- a/compiler/nativeGen/PIC.hs
+++ b/compiler/nativeGen/PIC.hs
@@ -217,7 +217,7 @@ howToAccessLabel
-- Windows
-- In Windows speak, a "module" is a set of objects linked into the
--- same Portable Exectuable (PE) file. (both .exe and .dll files are PEs).
+-- same Portable Executable (PE) file. (both .exe and .dll files are PEs).
--
-- If we're compiling a multi-module program then symbols from other modules
-- are accessed by a symbol pointer named __imp_SYMBOL. At runtime we have the
diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
index 05883d0e5a..e669630956 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -425,7 +425,7 @@ getRegister' dflags (CmmReg reg)
getRegister' dflags tree@(CmmRegOff _ _)
= getRegister' dflags (mangleIndexTree dflags tree)
- -- for 32-bit architectuers, support some 64 -> 32 bit conversions:
+ -- for 32-bit architectures, support some 64 -> 32 bit conversions:
-- TO_W_(x), TO_W_(x >> 32)
getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32)
diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs
index e756068ca1..1171689e66 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Main.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs
@@ -83,7 +83,7 @@ regAlloc dflags regsFree slotsFree slotsCount code cfg
-- | Perform solver iterations for the graph coloring allocator.
--
--- We extract a register confict graph from the provided cmm code,
+-- We extract a register conflict graph from the provided cmm code,
-- and try to colour it. If that works then we use the solution rewrite
-- the code with real hregs. If coloring doesn't work we add spill code
-- and try to colour it again. After `maxSpinCount` iterations we give up.
diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
index 4be25a71ba..42de5503ba 100644
--- a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
@@ -38,7 +38,7 @@ import Data.Maybe
import Control.Monad (join)
--- | Records the expected cost to spill some regster.
+-- | Records the expected cost to spill some register.
type SpillCostRecord
= ( VirtualReg -- register name
, Int -- number of writes to this reg
diff --git a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
index 773db33293..cc2ad7d594 100644
--- a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
@@ -26,7 +26,7 @@ import Panic
-- This gets hammered by scanGraph during register allocation,
-- so needs to be fairly efficient.
--
--- NOTE: This only works for arcitectures with just RcInteger and RcDouble
+-- NOTE: This only works for architectures with just RcInteger and RcDouble
-- (which are disjoint) ie. x86, x86_64 and ppc
--
-- The number of allocatable regs is hard coded in here so we can do
diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs
index 75ce613353..b2e8806caa 100644
--- a/compiler/parser/RdrHsSyn.hs
+++ b/compiler/parser/RdrHsSyn.hs
@@ -1042,7 +1042,7 @@ checkImportDecl mPre mPost = do
importQualifiedPostEnabled <- getBit ImportQualifiedPostBit
- -- Error if 'qualified' found in postpostive position and
+ -- Error if 'qualified' found in postpositive position and
-- 'ImportQualifiedPost' is not in effect.
whenJust mPost $ \post ->
when (not importQualifiedPostEnabled) $
diff --git a/compiler/prelude/TysPrim.hs b/compiler/prelude/TysPrim.hs
index a023c430fe..a25540290a 100644
--- a/compiler/prelude/TysPrim.hs
+++ b/compiler/prelude/TysPrim.hs
@@ -442,7 +442,7 @@ So for example:
We abbreviate '*' specially:
type * = TYPE 'LiftedRep
-The 'rr' parameter tells us how the value is represented at runime.
+The 'rr' parameter tells us how the value is represented at runtime.
Generally speaking, you can't be polymorphic in 'rr'. E.g
f :: forall (rr:RuntimeRep) (a:TYPE rr). a -> [a]
diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs
index 04898921de..9832445b09 100644
--- a/compiler/simplCore/CoreMonad.hs
+++ b/compiler/simplCore/CoreMonad.hs
@@ -415,7 +415,7 @@ pprTickCounts :: Map Tick Int -> SDoc
pprTickCounts counts
= vcat (map pprTickGroup groups)
where
- groups :: [[(Tick,Int)]] -- Each group shares a comon tag
+ groups :: [[(Tick,Int)]] -- Each group shares a common tag
-- toList returns common tags adjacent
groups = groupBy same_tag (Map.toList counts)
same_tag (tick1,_) (tick2,_) = tickToTag tick1 == tickToTag tick2
diff --git a/compiler/simplCore/FloatOut.hs b/compiler/simplCore/FloatOut.hs
index c0110fa1d9..a49d043e8f 100644
--- a/compiler/simplCore/FloatOut.hs
+++ b/compiler/simplCore/FloatOut.hs
@@ -529,7 +529,7 @@ from the body of the let that depend on the staying-put bindings.
We used instead to do the partitionByMajorLevel on the RHS of an '=',
in floatRhs. But that was quite tiresome. We needed to test for
-values or trival rhss, because (in particular) we don't want to insert
+values or trivial rhss, because (in particular) we don't want to insert
new bindings between the "=" and the "\". E.g.
f = \x -> let <bind> in <body>
We do not want
diff --git a/compiler/simplCore/LiberateCase.hs b/compiler/simplCore/LiberateCase.hs
index b484de3bc3..9cd21e0e18 100644
--- a/compiler/simplCore/LiberateCase.hs
+++ b/compiler/simplCore/LiberateCase.hs
@@ -164,7 +164,7 @@ libCaseBind env (Rec pairs)
{- Note [Not bottoming Ids]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not specialise error-functions (this is unusual, but I once saw it,
-(acually in Data.Typable.Internal)
+(actually in Data.Typable.Internal)
Note [Only functions!]
~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/simplCore/SimplCore.hs b/compiler/simplCore/SimplCore.hs
index 19465082dc..1d55c17d36 100644
--- a/compiler/simplCore/SimplCore.hs
+++ b/compiler/simplCore/SimplCore.hs
@@ -881,7 +881,7 @@ Hence,there's a possibility of leaving unchanged something like this:
By the time we've thrown away the types in STG land this
could be eliminated. But I don't think it's very common
and it's dangerous to do this fiddling in STG land
-because we might elminate a binding that's mentioned in the
+because we might eliminate a binding that's mentioned in the
unfolding for something.
Note [Indirection zapping and ticks]
diff --git a/compiler/simplCore/SimplEnv.hs b/compiler/simplCore/SimplEnv.hs
index a17d6b4bda..0c440efc69 100644
--- a/compiler/simplCore/SimplEnv.hs
+++ b/compiler/simplCore/SimplEnv.hs
@@ -372,7 +372,7 @@ where the let shadows the lambda. Really this means something like
- Then that continuation gets pushed under the let
- Finally we simplify 'arg'. We want
- - the static, lexical environment bindig x :-> x1
+ - the static, lexical environment binding x :-> x1
- the in-scopeset from "here", under the 'let' which includes
both x1 and x2
diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs
index 3eabb191d7..642071129e 100644
--- a/compiler/specialise/Specialise.hs
+++ b/compiler/specialise/Specialise.hs
@@ -199,7 +199,7 @@ the two instances of +.sel weren't originally at the same type.
Further notes on (b)
* There are quite a few variations here. For example, the defn of
- +.sel could be floated ouside the \y, to attempt to gain laziness.
+ +.sel could be floated outside the \y, to attempt to gain laziness.
It certainly mustn't be floated outside the \d because the d has to
be in scope too.
diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs
index 6feb1ff065..d235d3c649 100644
--- a/compiler/stranal/WwLib.hs
+++ b/compiler/stranal/WwLib.hs
@@ -209,7 +209,7 @@ Note [Always do CPR w/w]
~~~~~~~~~~~~~~~~~~~~~~~~
At one time we refrained from doing CPR w/w for thunks, on the grounds that
we might duplicate work. But that is already handled by the demand analyser,
-which doesn't give the CPR proprety if w/w might waste work: see
+which doesn't give the CPR property if w/w might waste work: see
Note [CPR for thunks] in DmdAnal.
And if something *has* been given the CPR property and we don't w/w, it's
diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs
index 36c613c186..ee9a148eaa 100644
--- a/compiler/typecheck/FamInst.hs
+++ b/compiler/typecheck/FamInst.hs
@@ -1042,7 +1042,7 @@ reportConflictInstErr fam_inst (match1 : _)
, let ax = famInstAxiom fi ])
where
getSpan = getSrcLoc . famInstAxiom
- -- 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/TcExpr.hs b/compiler/typecheck/TcExpr.hs
index 5560b219ba..bfbb4d260c 100644
--- a/compiler/typecheck/TcExpr.hs
+++ b/compiler/typecheck/TcExpr.hs
@@ -1339,7 +1339,7 @@ users complain bitterly (#13834, #17150.)
The right error is the CHoleCan, which reports 'wurble' as out of
scope, and tries to give its type.
-Fortunately in tcArgs we still have acces to the function, so
+Fortunately in tcArgs we still have access to the function, so
we can check if it is a HsUnboundVar. If so, we simply fail
immediately. We've already inferred the type of the function,
so we'll /already/ have emitted a CHoleCan constraint; failing
diff --git a/compiler/typecheck/TcOrigin.hs b/compiler/typecheck/TcOrigin.hs
index e1cf64f731..c3af30e615 100644
--- a/compiler/typecheck/TcOrigin.hs
+++ b/compiler/typecheck/TcOrigin.hs
@@ -639,7 +639,7 @@ pprCtO IfOrigin = text "an if expression"
pprCtO (LiteralOrigin lit) = hsep [text "the literal", quotes (ppr lit)]
pprCtO (ArithSeqOrigin seq) = hsep [text "the arithmetic sequence", quotes (ppr seq)]
pprCtO SectionOrigin = text "an operator section"
-pprCtO AssocFamPatOrigin = text "the LHS of a famly instance"
+pprCtO AssocFamPatOrigin = text "the LHS of a family instance"
pprCtO TupleOrigin = text "a tuple"
pprCtO NegateOrigin = text "a use of syntactic negation"
pprCtO (ScOrigin n) = text "the superclasses of an instance declaration"
diff --git a/compiler/typecheck/TcPatSyn.hs b/compiler/typecheck/TcPatSyn.hs
index 1c39801f2f..1a6d3ea1e4 100644
--- a/compiler/typecheck/TcPatSyn.hs
+++ b/compiler/typecheck/TcPatSyn.hs
@@ -283,7 +283,7 @@ Similarly consider
pattern Bam x y <- (MkS (x::a), MkS (y::a)))
The pattern (Bam x y) binds two (Ord a) dictionaries, but we only
-need one. Agian mkMimimalWithSCs removes the redundant one.
+need one. Again mkMimimalWithSCs removes the redundant one.
Note [Equality evidence in pattern synonyms]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/typecheck/TcRules.hs b/compiler/typecheck/TcRules.hs
index 192a82c56a..e63e670e03 100644
--- a/compiler/typecheck/TcRules.hs
+++ b/compiler/typecheck/TcRules.hs
@@ -108,7 +108,7 @@ tcRule (HsRule { rd_ext = ext
-- RULE: forall v. fst (ss v) = fst v
-- The type of the rhs of the rule is just a, but v::(a,(b,c))
--
- -- We also need to get the completely-uconstrained tyvars of
+ -- We also need to get the completely-unconstrained tyvars of
-- the LHS, lest they otherwise get defaulted to Any; but we do that
-- during zonking (see TcHsSyn.zonkRule)
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index b338bfbf9e..16db7c5f6c 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -1943,7 +1943,7 @@ liftCoSubstTyVar (LC subst env) r v
callback:
We want 'liftCoSubstVarBndrUsing' to be general enough to be reused in
- FamInstEnv, therefore the input arg 'fun' returns a pair with polymophic type
+ FamInstEnv, therefore the input arg 'fun' returns a pair with polymorphic type
in snd.
However in 'liftCoSubstVarBndr', we don't need the snd, so we use unit and
ignore the fourth component of the return value.
diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs
index 55771f6dd0..b8f9f6ce8f 100644
--- a/compiler/types/OptCoercion.hs
+++ b/compiler/types/OptCoercion.hs
@@ -1166,7 +1166,7 @@ etaTyConAppCo_maybe tc co
, tc1 == tc2
, isInjectiveTyCon tc r -- See Note [NthCo and newtypes] in TyCoRep
, let n = length tys1
- , tys2 `lengthIs` n -- This can fail in an erroneous progam
+ , tys2 `lengthIs` n -- This can fail in an erroneous program
-- E.g. T a ~# T a b
-- #14607
= ASSERT( tc == tc1 )
diff --git a/compiler/types/TyCoFVs.hs b/compiler/types/TyCoFVs.hs
index eefd68f145..10dc6453b0 100644
--- a/compiler/types/TyCoFVs.hs
+++ b/compiler/types/TyCoFVs.hs
@@ -84,7 +84,7 @@ so we profiled several versions, exploring different implementation strategies.
This looks deceptively similar, but while FV internally builds a list- and
set-generating function, the VarSet functions manipulate sets directly, and
- the latter peforms a lot worse than the naive FV version.
+ the latter performs a lot worse than the naive FV version.
3. Accumulator-style VarSet version: this is what we use now. We do use VarSet
as our data structure, but delegate the actual work to a new
diff --git a/compiler/types/TyCoSubst.hs b/compiler/types/TyCoSubst.hs
index db7563914f..7c1a811ae3 100644
--- a/compiler/types/TyCoSubst.hs
+++ b/compiler/types/TyCoSubst.hs
@@ -527,7 +527,7 @@ hole will remain. Then, when we're checking x's definition, we skolemise
x's type (in order to, e.g., bring the scoped type variable `a` into scope).
This requires performing a substitution for the fresh skolem variables.
-This subsitution needs to affect the kind of the coercion hole, too --
+This substitution needs to affect the kind of the coercion hole, too --
otherwise, the kind will have an out-of-scope variable in it. More problematically
in practice (we won't actually notice the out-of-scope variable ever), skolems
in the kind might have too high a level, triggering a failure to uphold the
diff --git a/compiler/types/TyCoTidy.hs b/compiler/types/TyCoTidy.hs
index 5c0825a6fa..f4639ca303 100644
--- a/compiler/types/TyCoTidy.hs
+++ b/compiler/types/TyCoTidy.hs
@@ -144,7 +144,7 @@ tidyType env (CoercionTy co) = CoercionTy $! (tidyCo env co)
-- The following two functions differ from mkForAllTys and splitForAllTys in that
--- they expect/preserve the ArgFlag argument. Thes belong to types/Type.hs, but
+-- they expect/preserve the ArgFlag argument. These belong to types/Type.hs, but
-- how should they be named?
mkForAllTys' :: [(TyCoVar, ArgFlag)] -> Type -> Type
mkForAllTys' tvvs ty = foldr strictMkForAllTy ty tvvs
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index 94a09288b5..f363976626 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -670,7 +670,7 @@ Consider a valie like `2724268014499746065`, some sort of hash
actually generated by GHC.
In the old scheme this was encoded as a list of 19 chars. This
gave a size of 77 Bytes, one for the length of the list and 76
-since we encod chars as Word32 as well.
+since we encode chars as Word32 as well.
We can easily do better. The new plan is:
diff --git a/compiler/utils/Digraph.hs b/compiler/utils/Digraph.hs
index c205c45d8d..49ded1b23f 100644
--- a/compiler/utils/Digraph.hs
+++ b/compiler/utils/Digraph.hs
@@ -464,7 +464,7 @@ instance Outputable EdgeType where
newtype Time = Time Int deriving (Eq,Ord,Num,Outputable)
---Allow for specialzation
+--Allow for specialization
{-# INLINEABLE classifyEdges #-}
-- | Given a start vertex, a way to get successors from a node
diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs
index 62a81aa10d..f11c4ebbb8 100644
--- a/compiler/utils/FastString.hs
+++ b/compiler/utils/FastString.hs
@@ -20,7 +20,7 @@
--
-- * Pointer and size of a Latin-1 encoded string.
-- * Practically no operations.
--- * Outputing them is fast.
+-- * Outputting them is fast.
-- * Generated by 'sLit'.
-- * Turn into 'Outputable.SDoc' with 'Outputable.ptext'
-- * Requires manual memory management.
@@ -73,7 +73,7 @@ module FastString
nilFS,
isUnderscoreFS,
- -- ** Outputing
+ -- ** Outputting
hPutFS,
-- ** Internal
diff --git a/compiler/utils/GraphBase.hs b/compiler/utils/GraphBase.hs
index b66599356e..a165b003ba 100644
--- a/compiler/utils/GraphBase.hs
+++ b/compiler/utils/GraphBase.hs
@@ -87,7 +87,7 @@ data Node k cls color
-- | Colors that cannot be used by this node.
, nodeExclusions :: UniqSet color
- -- | Colors that this node would prefer to be, in decending order.
+ -- | Colors that this node would prefer to be, in descending order.
, nodePreference :: [color]
-- | Neighbors that this node would like to be colored the same as.
diff --git a/compiler/utils/GraphColor.hs b/compiler/utils/GraphColor.hs
index 4c1388e91d..82ec522357 100644
--- a/compiler/utils/GraphColor.hs
+++ b/compiler/utils/GraphColor.hs
@@ -76,7 +76,7 @@ colorGraph iterative spinCount colors triv spill graph0
-- We need to apply all the coalescences found by the scanner to the original
-- graph before doing assignColors.
--
- -- Because we've got the whole, non-pruned graph here we turn on aggressive coalecing
+ -- Because we've got the whole, non-pruned graph here we turn on aggressive coalescing
-- to force all the (conservative) coalescences found during scanning.
--
(graph_scan_coalesced, _)
diff --git a/compiler/utils/GraphOps.hs b/compiler/utils/GraphOps.hs
index 0a7981b0c8..cc8668ea45 100644
--- a/compiler/utils/GraphOps.hs
+++ b/compiler/utils/GraphOps.hs
@@ -233,7 +233,7 @@ addExclusions u getClass colors graph
= foldr (addExclusion u getClass) graph colors
--- | Add a coalescence edge to the graph, creating nodes if requried.
+-- | Add a coalescence edge to the graph, creating nodes if required.
-- It is considered adventageous to assign the same color to nodes in a coalesence.
addCoalesce
:: Uniquable k
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index b200bd79db..6717430a58 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -39,7 +39,7 @@ module Outputable (
coloured, keyword,
- -- * Converting 'SDoc' into strings and outputing it
+ -- * Converting 'SDoc' into strings and outputting it
printSDoc, printSDocLn, printForUser, printForUserPartWay,
printForC, bufLeftRenderSDoc,
pprCode, mkCodeStyle,
diff --git a/distrib/compare/compare.hs b/distrib/compare/compare.hs
index 8653e3f6aa..b2508015ec 100644
--- a/distrib/compare/compare.hs
+++ b/distrib/compare/compare.hs
@@ -17,7 +17,7 @@ import Tar
-- * Check installed trees too
-- * Check hashbangs
-sizeChangeThresholds :: [(Integer, -- Theshold only applies if one of
+sizeChangeThresholds :: [(Integer, -- Threshold only applies if one of
-- the files is at least this big
Integer)] -- Size changed if the larger file's
-- size is at least this %age of the
diff --git a/docs/core-spec/core-spec.mng b/docs/core-spec/core-spec.mng
index 3afec2bbb7..167ca85644 100644
--- a/docs/core-spec/core-spec.mng
+++ b/docs/core-spec/core-spec.mng
@@ -240,7 +240,7 @@ for more background.
\gram{\ottR}
-The \texttt{GRefl} constructor taks an $[[mg]]$. It wraps a kind coercion, which
+The \texttt{GRefl} constructor takes an $[[mg]]$. It wraps a kind coercion, which
might be reflexive or any coercion:
\gram{\ottmg}
diff --git a/docs/opt-coercion/fc-normalization-rta.tex b/docs/opt-coercion/fc-normalization-rta.tex
index 0600427e98..942dcefbf4 100755
--- a/docs/opt-coercion/fc-normalization-rta.tex
+++ b/docs/opt-coercion/fc-normalization-rta.tex
@@ -1184,7 +1184,7 @@ impressive simplifications from Section~\ref{ssect:large}. Consider that example
Notably, rules \rulename{AxSuckL/R} and \rulename{SymAxSuckL/R} generate
axiom applications of the form $C\;\gammas$ (with a coercion as argument).
In our previous papers, the syntax of axiom applications was $C\;\taus$, with \emph{types}
-as arugments. But we need the additional generality to allow coercions rewriting to
+as arguments. But we need the additional generality to allow coercions rewriting to
proceed without getting stuck.
%% which we now give in mathematical notation. The
diff --git a/docs/users_guide/editing-guide.rst b/docs/users_guide/editing-guide.rst
index d7888b494b..4d6c22dcc8 100644
--- a/docs/users_guide/editing-guide.rst
+++ b/docs/users_guide/editing-guide.rst
@@ -12,7 +12,7 @@ a rich but light-weight mark-up language aimed at producing documentation. The
`Sphinx <http://sphinx-doc.org/>`__ tool is used to produce the final PDF and
HTML documentation.
-This document (also written in ReST) serves as a brief introducion to ReST and to
+This document (also written in ReST) serves as a brief introduction to ReST and to
document the conventions used in the User's Guide. This document is *not* intended
to be a thorough guide to ReST. For this see the resources referenced
`below <#references>`__.
diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py
index dcc6743d18..fb4592a2b2 100644
--- a/docs/users_guide/flags.py
+++ b/docs/users_guide/flags.py
@@ -33,7 +33,7 @@
#
# :extension:`extension`
#
-# Language exensions can be listed:
+# Language extensions can be listed:
#
# .. extension-print::
# :type: table/list/summary (REQUIRED)
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 5034d012a1..dcc43f9623 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -1325,7 +1325,7 @@ like this ::
pure = return
x <*> y = do f <- x; a <- y; return (f a)
-will result in an infinte loop when ``<*>`` is called.
+will result in an infinite loop when ``<*>`` is called.
Just as you wouldn't define a ``Monad`` instance using the do-notation, you
shouldn't define ``Functor`` or ``Applicative`` instance using do-notation (when
diff --git a/docs/users_guide/profiling.rst b/docs/users_guide/profiling.rst
index c1d4d7d442..127944eb09 100644
--- a/docs/users_guide/profiling.rst
+++ b/docs/users_guide/profiling.rst
@@ -536,7 +536,7 @@ has the following properties,
The profile tree itself
Each entry in ``cost_centres`` is an object describing a cost-centre of the
-program having the following properies,
+program having the following properties,
``id`` (integral number)
A unique identifier used to refer to the cost-centre
diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst
index 0b9cdfbfbc..dac4be6f7d 100644
--- a/docs/users_guide/runtime_control.rst
+++ b/docs/users_guide/runtime_control.rst
@@ -247,7 +247,7 @@ Miscellaneous RTS options
catch unhandled exceptions using the Windows exception handling mechanism.
This option is primarily useful for when you are using the Haskell code as a
DLL, and don't want the RTS to ungracefully terminate your application on
- erros such as segfaults.
+ errors such as segfaults.
.. rts-flag:: --generate-crash-dumps
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 758bae39e0..4ca47524a7 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -383,7 +383,7 @@ by saying ``-fno-wombat``.
a shared-memory
multiprocessor <http://community.haskell.org/~simonmar/papers/multiproc.pdf>`__.
- See :ref:`parallel-compile-options` for a dicussion on its use.
+ See :ref:`parallel-compile-options` for a discussion on its use.
.. ghc-flag:: -fexcess-precision
:shortdesc: Enable excess intermediate precision
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 4649f86de0..137ca9c637 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -1733,7 +1733,7 @@ of ``-W(no-)*``.
The option :ghc-flag:`-Wunused-packages` warns about packages, specified on
command line via :ghc-flag:`-package ⟨pkg⟩` or
- :ghc-flag:`-package-id ⟨unit-id⟩`, but were not loaded during compication.
+ :ghc-flag:`-package-id ⟨unit-id⟩`, but were not loaded during compilation.
Usually it means that you have an unused dependency.
You may want to enable this warning on a clean build or enable :ghc-flag:`-fforce-recomp`
diff --git a/hadrian/doc/make.md b/hadrian/doc/make.md
index ff51f6d7ba..b0e19e4721 100644
--- a/hadrian/doc/make.md
+++ b/hadrian/doc/make.md
@@ -56,7 +56,7 @@ time you fire up a build. This is not possible with the Make build system.
build -j8
```
-- Bulding a stage 1 or 2 GHC executable
+- Building a stage 1 or 2 GHC executable
``` sh
# Make
diff --git a/hadrian/doc/user-settings.md b/hadrian/doc/user-settings.md
index 2f8397a303..04a526605d 100644
--- a/hadrian/doc/user-settings.md
+++ b/hadrian/doc/user-settings.md
@@ -166,7 +166,7 @@ userPackage = library "user-package"
You will also need to add `userPackage` to a specific build stage by modifying
the `packages` setting of the user flavour as otherwise it will not be built.
-You can choose which integer library to use when builing GHC using the
+You can choose which integer library to use when building GHC using the
`integerLibrary` setting of the build flavour. Possible values are: `integerGmp`
(default) and `integerSimple`.
```haskell
diff --git a/hadrian/src/Hadrian/Oracles/Cabal/Rules.hs b/hadrian/src/Hadrian/Oracles/Cabal/Rules.hs
index b7f0f93526..a8fe8c773a 100644
--- a/hadrian/src/Hadrian/Oracles/Cabal/Rules.hs
+++ b/hadrian/src/Hadrian/Oracles/Cabal/Rules.hs
@@ -6,7 +6,7 @@
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
--
--- This module defines Shake rules corresponing to the /Cabal oracle/; see
+-- This module defines Shake rules corresponding to the /Cabal oracle/; see
-- the module "Hadrian.Oracles.Cabal" for various supported queries.
-----------------------------------------------------------------------------
module Hadrian.Oracles.Cabal.Rules where
diff --git a/hadrian/src/Hadrian/Oracles/Cabal/Type.hs b/hadrian/src/Hadrian/Oracles/Cabal/Type.hs
index d1b09472ed..c1a3b21b1a 100644
--- a/hadrian/src/Hadrian/Oracles/Cabal/Type.hs
+++ b/hadrian/src/Hadrian/Oracles/Cabal/Type.hs
@@ -9,7 +9,7 @@
--
-- This module defines the types of keys used by the /Cabal oracles/. See the
-- module "Hadrian.Oracles.Cabal" for supported Cabal oracle queries, and the
--- module "Hadrian.Oracles.Cabal.Rules" for the corresponing Shake rules.
+-- module "Hadrian.Oracles.Cabal.Rules" for the corresponding Shake rules.
-----------------------------------------------------------------------------
module Hadrian.Oracles.Cabal.Type where
diff --git a/hadrian/src/Hadrian/Oracles/TextFile.hs b/hadrian/src/Hadrian/Oracles/TextFile.hs
index aef553f70d..d6fb78cc2f 100644
--- a/hadrian/src/Hadrian/Oracles/TextFile.hs
+++ b/hadrian/src/Hadrian/Oracles/TextFile.hs
@@ -82,7 +82,7 @@ type instance RuleResult KeyValues = Maybe [String]
-- 'lookupValueOrEmpty', 'lookupValueOrError', 'lookupValues',
-- 'lookupValuesOrEmpty' and 'lookupValuesOrError'.
--
--- 2) Parsing Makefile dependecy files generated by commands like @gcc -MM@:
+-- 2) Parsing Makefile dependency files generated by commands like @gcc -MM@:
-- see 'lookupDependencies'.
textFileOracle :: Rules ()
textFileOracle = do
diff --git a/hadrian/src/Hadrian/Utilities.hs b/hadrian/src/Hadrian/Utilities.hs
index d726e74141..8c9cfefe81 100644
--- a/hadrian/src/Hadrian/Utilities.hs
+++ b/hadrian/src/Hadrian/Utilities.hs
@@ -214,7 +214,7 @@ makeRelativeNoSysLink a b
-- | Like Shake's '%>' but gives higher priority to longer patterns. Useful
-- in situations when a family of build rules, e.g. @"**/*.a"@ and @"**/*_p.a"@
-- can be matched by the same file, such as @library_p.a@. We break the tie
--- by preferring longer matches, which correpond to longer patterns.
+-- by preferring longer matches, which correspond to longer patterns.
(%%>) :: FilePattern -> (FilePath -> Action ()) -> Rules ()
p %%> a = priority (fromIntegral (length p) + 1) $ p %> a
diff --git a/hadrian/src/Rules/Documentation.hs b/hadrian/src/Rules/Documentation.hs
index 567f71b996..84d008e39b 100644
--- a/hadrian/src/Rules/Documentation.hs
+++ b/hadrian/src/Rules/Documentation.hs
@@ -97,7 +97,7 @@ documentationRules = do
-- include manpage unless --docs=no-sphinx[-man] is given.
++ [ manPageBuildPath | SphinxMan `Set.member` doctargets ]
- -- include toplevel html target uness we neither want
+ -- include toplevel html target unless we neither want
-- haddocks nor html pages produced by sphinx.
++ [ html | Set.size (doctargets `Set.intersection`
Set.fromList [Haddocks, SphinxHTML]
diff --git a/hadrian/src/Rules/Generate.hs b/hadrian/src/Rules/Generate.hs
index d0b7f1015a..74759be20e 100644
--- a/hadrian/src/Rules/Generate.hs
+++ b/hadrian/src/Rules/Generate.hs
@@ -215,7 +215,7 @@ ghcWrapper stage = do
++ [ "-package-db " ++ dbPath | stage == Stage1 ]
++ [ "$@" ]
--- | Given a 'String' replace charaters '.' and '-' by underscores ('_') so that
+-- | Given a 'String' replace characters '.' and '-' by underscores ('_') so that
-- the resulting 'String' is a valid C preprocessor identifier.
cppify :: String -> String
cppify = replaceEq '-' '_' . replaceEq '.' '_'
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index 9151188883..71e2f48271 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -80,7 +80,7 @@ testRules = do
"test" ~> do
needTestBuilders
- -- TODO : Should we remove the previosly generated config file?
+ -- TODO : Should we remove the previously generated config file?
-- Prepare Ghc configuration file for input compiler.
need [root -/- ghcConfigPath, root -/- timeoutPath]
diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs
index 60fd8fa726..2549a63e39 100644
--- a/hadrian/src/Settings/Builders/Ghc.hs
+++ b/hadrian/src/Settings/Builders/Ghc.hs
@@ -176,7 +176,7 @@ commonGhcArgs = do
, packageGhcArgs
, includeGhcArgs
-- When compiling RTS for Stage1 or Stage2 we do not have it (yet)
- -- in the package database. We therefore explicity supply the path
+ -- in the package database. We therefore explicitly supply the path
-- to the @ghc-version@ file, to prevent GHC from trying to open the
-- RTS package in the package database and failing.
, package rts ? notStage0 ? arg ("-ghcversion-file=" ++ ghcVersion)
diff --git a/includes/rts/OSThreads.h b/includes/rts/OSThreads.h
index 322624e8ad..ada2a9a787 100644
--- a/includes/rts/OSThreads.h
+++ b/includes/rts/OSThreads.h
@@ -245,7 +245,7 @@ uint32_t getNumberOfProcessors (void);
// type from the OSThreadId.
//
// If the feature cannot be supported on an OS, it is OK to always return 0.
-// In particular it would almost certaily be meaningless on systems not using
+// In particular it would almost certainly be meaningless on systems not using
// a 1:1 threading model.
// We use a common serialisable representation on all OSs
diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
index 60f084be9a..a3507bbe1c 100644
--- a/includes/stg/SMP.h
+++ b/includes/stg/SMP.h
@@ -154,7 +154,7 @@ EXTERN_INLINE void load_load_barrier(void);
* closure are visible *before* the write exposing the new closure is made visible:
*
* - Allocate memory for the closure
- * - Write the closure's info pointer and fields (ordering betweeen this doesn't
+ * - Write the closure's info pointer and fields (ordering between this doesn't
* matter since the closure isn't yet visible to anyone else).
* - Write barrier
* - Make closure visible to other cores
diff --git a/libraries/base/Data/Semigroup/Internal.hs b/libraries/base/Data/Semigroup/Internal.hs
index 4f75afccb5..4ce73d0c05 100644
--- a/libraries/base/Data/Semigroup/Internal.hs
+++ b/libraries/base/Data/Semigroup/Internal.hs
@@ -4,7 +4,7 @@
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
--- | Auxilary definitions for 'Semigroup'
+-- | Auxiliary definitions for 'Semigroup'
--
-- This module provides some @newtype@ wrappers and helpers which are
-- reexported from the "Data.Semigroup" module or imported directly
diff --git a/libraries/base/GHC/ExecutionStack/Internal.hsc b/libraries/base/GHC/ExecutionStack/Internal.hsc
index 9f9e979af9..7db1e86ff7 100644
--- a/libraries/base/GHC/ExecutionStack/Internal.hsc
+++ b/libraries/base/GHC/ExecutionStack/Internal.hsc
@@ -150,7 +150,7 @@ stackFrames st@(StackTrace fptr) = unsafePerformIO $ withSession $ \sess -> do
unknown symbols). I think this is a reasonable price to pay, however, as
module loading/unloading is a rather rare event.
- Morover, we stand to gain a great deal by lazy lookups as the stack frames
+ Moreover, we stand to gain a great deal by lazy lookups as the stack frames
may never even be requested, meaning the only effort wasted is the
collection of the stack frames themselves.
diff --git a/libraries/base/GHC/IO/Encoding.hs b/libraries/base/GHC/IO/Encoding.hs
index 735c1b0a37..d607b7e7b5 100644
--- a/libraries/base/GHC/IO/Encoding.hs
+++ b/libraries/base/GHC/IO/Encoding.hs
@@ -82,7 +82,7 @@ utf8_bom = UTF8.utf8_bom
utf16 :: TextEncoding
utf16 = UTF16.utf16
--- | The UTF-16 Unicode encoding (litte-endian)
+-- | The UTF-16 Unicode encoding (little-endian)
utf16le :: TextEncoding
utf16le = UTF16.utf16le
@@ -95,7 +95,7 @@ utf16be = UTF16.utf16be
utf32 :: TextEncoding
utf32 = UTF32.utf32
--- | The UTF-32 Unicode encoding (litte-endian)
+-- | The UTF-32 Unicode encoding (little-endian)
utf32le :: TextEncoding
utf32le = UTF32.utf32le
diff --git a/libraries/base/GHC/IO/Encoding/CodePage/API.hs b/libraries/base/GHC/IO/Encoding/CodePage/API.hs
index 65a1b377db..9c2dc0e85c 100644
--- a/libraries/base/GHC/IO/Encoding/CodePage/API.hs
+++ b/libraries/base/GHC/IO/Encoding/CodePage/API.hs
@@ -317,7 +317,7 @@ cpEncode cp _max_char_size = \ibuf obuf -> do
| ocnt == 0 = return (Left True)
| otherwise = alloca $ \defaulted_ptr -> do
poke defaulted_ptr False
- err <- c_WideCharToMultiByte (fromIntegral cp) 0 -- NB: the WC_ERR_INVALID_CHARS flag is uselses: only has an effect with the UTF-8 code page
+ err <- c_WideCharToMultiByte (fromIntegral cp) 0 -- NB: the WC_ERR_INVALID_CHARS flag is useless: only has an effect with the UTF-8 code page
iptr (fromIntegral icnt) optr (fromIntegral ocnt)
nullPtr defaulted_ptr
defaulted <- peek defaulted_ptr
diff --git a/libraries/base/GHC/IO/Handle/Internals.hs b/libraries/base/GHC/IO/Handle/Internals.hs
index 5f767348ee..21284a776c 100644
--- a/libraries/base/GHC/IO/Handle/Internals.hs
+++ b/libraries/base/GHC/IO/Handle/Internals.hs
@@ -358,7 +358,7 @@ ioe_bufsiz n = ioException
-- Wrapper for Handle encoding/decoding.
-- The interface for TextEncoding changed so that a TextEncoding doesn't raise
--- an exception if it encounters an invalid sequnce. Furthermore, encoding
+-- an exception if it encounters an invalid sequence. Furthermore, encoding
-- returns a reason as to why encoding stopped, letting us know if it was due
-- to input/output underflow or an invalid sequence.
--
diff --git a/libraries/base/GHC/IO/Handle/Lock.hs b/libraries/base/GHC/IO/Handle/Lock.hs
index 09df4a24ae..6d8938c35d 100644
--- a/libraries/base/GHC/IO/Handle/Lock.hs
+++ b/libraries/base/GHC/IO/Handle/Lock.hs
@@ -44,7 +44,7 @@ import GHC.IO.Handle.Lock.NoOp
-- 2) The implementation uses 'LockFileEx' on Windows and 'flock' otherwise,
-- hence all of their caveats also apply here.
--
--- 3) On non-Windows plaftorms that don't support 'flock' (e.g. Solaris) this
+-- 3) On non-Windows platforms that don't support 'flock' (e.g. Solaris) this
-- function throws 'FileLockingNotImplemented'. We deliberately choose to not
-- provide fcntl based locking instead because of its broken semantics.
--
diff --git a/libraries/base/GHC/IO/Handle/Types.hs b/libraries/base/GHC/IO/Handle/Types.hs
index aeb72af847..6923d252b9 100644
--- a/libraries/base/GHC/IO/Handle/Types.hs
+++ b/libraries/base/GHC/IO/Handle/Types.hs
@@ -386,7 +386,7 @@ nativeNewline = LF
#endif
-- | Map @\'\\r\\n\'@ into @\'\\n\'@ on input, and @\'\\n\'@ to the native newline
--- represetnation on output. This mode can be used on any platform, and
+-- representation on output. This mode can be used on any platform, and
-- works with text files using any newline convention. The downside is
-- that @readFile >>= writeFile@ might yield a different file.
--
diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs
index 65fa4f54a5..ba5229f9cb 100644
--- a/libraries/base/GHC/List.hs
+++ b/libraries/base/GHC/List.hs
@@ -425,7 +425,7 @@ The type of (g :: (a -> b -> b) -> b -> b) allows us to apply parametricity:
Either the tuple is returned (trivial), or scanrFB is called:
g (scanrFB f c) (q0,n) = scanrFB ... (g' (scanrFB f c) (q0,n))
Notice that thanks to the strictness of scanrFB, the expression
-g' (scanrFB f c) (q0,n) gets evaluated aswell. In particular, if g' is a
+g' (scanrFB f c) (q0,n) gets evaluated as well. In particular, if g' is a
recursive case of g, parametricity applies again and we will again have a
possible call to scanrFB. In short, g (scanrFB f c) (q0,n) will end up being
completely evaluated. This is resource consuming for large lists and if the
diff --git a/libraries/base/GHC/StaticPtr.hs b/libraries/base/GHC/StaticPtr.hs
index b8d5c116d1..dcffbad701 100644
--- a/libraries/base/GHC/StaticPtr.hs
+++ b/libraries/base/GHC/StaticPtr.hs
@@ -103,7 +103,7 @@ class IsStatic p where
instance IsStatic StaticPtr where
fromStaticPtr = id
--- | Miscelaneous information available for debugging purposes.
+-- | Miscellaneous information available for debugging purposes.
data StaticPtrInfo = StaticPtrInfo
{ -- | Package key of the package where the static pointer is defined
spInfoUnitId :: String
diff --git a/libraries/base/GHC/TypeNats.hs b/libraries/base/GHC/TypeNats.hs
index da06627118..aba47b0b96 100644
--- a/libraries/base/GHC/TypeNats.hs
+++ b/libraries/base/GHC/TypeNats.hs
@@ -113,7 +113,7 @@ After inlining and simplification, this ends up looking something like this:
`KnownNat` is the constructor for dictionaries for the class `KnownNat`.
See Note [magicDictId magic] in "basicType/MkId.hs" for details on how
-we actually construct the dictionry.
+we actually construct the dictionary.
Note that using `Any Nat` is not really correct, as multilple calls to
`someNatVal` would violate coherence:
diff --git a/libraries/base/System/IO.hs b/libraries/base/System/IO.hs
index 4549c8f12e..2ae0e1e6da 100644
--- a/libraries/base/System/IO.hs
+++ b/libraries/base/System/IO.hs
@@ -202,7 +202,7 @@ module System.IO (
-- as @\'\\r\\n\'@.
--
-- A text-mode 'Handle' has an associated 'NewlineMode' that
- -- specifies how to transate newline characters. The
+ -- specifies how to translate newline characters. The
-- 'NewlineMode' specifies the input and output translation
-- separately, so that for instance you can translate @\'\\r\\n\'@
-- to @\'\\n\'@ on input, but leave newlines as @\'\\n\'@ on output.
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index fa0d2d4e95..026de1df82 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -295,7 +295,7 @@
in constant space when applied to lists. (#10830)
* `mkFunTy`, `mkAppTy`, and `mkTyConApp` from `Data.Typeable` no longer exist.
- This functionality is superceded by the interfaces provided by
+ This functionality is superseded by the interfaces provided by
`Type.Reflection`.
* `mkTyCon3` is no longer exported by `Data.Typeable`. This function is
diff --git a/libraries/base/codepages/MakeTable.hs b/libraries/base/codepages/MakeTable.hs
index b276e4b1a0..0806e268eb 100644
--- a/libraries/base/codepages/MakeTable.hs
+++ b/libraries/base/codepages/MakeTable.hs
@@ -138,7 +138,7 @@ mkConvArray xs = "ConvArray \"" ++ concatMap mkHex xs ++ "\"#"
--
-- Fix a block size S which is a power of two. We compress an array of N
-- entries (where N>>S) as follows. First, split the array into blocks of size
--- S, then remove all repeate blocks to form the "value" array. Then construct
+-- S, then remove all repeated blocks to form the "value" array. Then construct
-- a separate "index" array which maps the position of blocks in the old array
-- to a position in the value array.
--
diff --git a/libraries/base/configure.ac b/libraries/base/configure.ac
index d34224acc7..eff986fb96 100644
--- a/libraries/base/configure.ac
+++ b/libraries/base/configure.ac
@@ -37,7 +37,7 @@ AC_CHECK_HEADERS([ctype.h errno.h fcntl.h inttypes.h limits.h signal.h sys/file.
AC_SYS_LARGEFILE
dnl ** check for wide-char classifications
-dnl FreeBSD has an emtpy wctype.h, so test one of the affected
+dnl FreeBSD has an empty wctype.h, so test one of the affected
dnl functions if it's really there.
AC_CHECK_HEADERS([wctype.h], [AC_CHECK_FUNCS(iswspace)])
diff --git a/libraries/base/tests/IO/all.T b/libraries/base/tests/IO/all.T
index 189fbebb88..818ce67267 100644
--- a/libraries/base/tests/IO/all.T
+++ b/libraries/base/tests/IO/all.T
@@ -138,7 +138,7 @@ test('T17414',
when(opsys('mingw32'), fragile(17453)),
# It is common for tmpfs to be mounted to a small tmpfs on modern Linux
# distributions. This test needs to create a large file which will exceed the
- # size of this filesystem onsequently we must skip it (see #17459).
+ # size of this filesystem consequently we must skip it (see #17459).
when(opsys('linux'), skip),
high_memory_usage],
compile_and_run, [''])
diff --git a/libraries/ghc-prim/cbits/ctz.c b/libraries/ghc-prim/cbits/ctz.c
index fc98716968..755ad6e0b3 100644
--- a/libraries/ghc-prim/cbits/ctz.c
+++ b/libraries/ghc-prim/cbits/ctz.c
@@ -32,7 +32,7 @@ StgWord
hs_ctz64(StgWord64 x)
{
#if defined(__GNUC__) && (defined(i386_HOST_ARCH) || defined(powerpc_HOST_ARCH))
- /* On Linux/i386, the 64bit `__builtin_ctzll()` instrinsic doesn't
+ /* On Linux/i386, the 64bit `__builtin_ctzll()` intrinsic doesn't
get inlined by GCC but rather a short `__ctzdi2` runtime function
is inserted when needed into compiled object files.
diff --git a/libraries/integer-gmp/src/GHC/Integer/Type.hs b/libraries/integer-gmp/src/GHC/Integer/Type.hs
index 1b7d6cafba..44a2964895 100644
--- a/libraries/integer-gmp/src/GHC/Integer/Type.hs
+++ b/libraries/integer-gmp/src/GHC/Integer/Type.hs
@@ -1852,7 +1852,7 @@ unsafeSnocFreezeBigNat# mbn0@(MBN# mba0#) limb# s = go s'
_ <- svoid (writeWordArray# mba# n# limb#)
unsafeFreezeBigNat# (MBN# mba#)
--- | May shrink underlyng 'ByteArray#' if needed to satisfy BigNat invariant
+-- | May shrink underlying 'ByteArray#' if needed to satisfy BigNat invariant
unsafeRenormFreezeBigNat# :: MutBigNat s -> S s BigNat
unsafeRenormFreezeBigNat# mbn s
| isTrue# (n0# ==# 0#) = (# s'', nullBigNat #)
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index 81cd588ec8..fb9556db54 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -1724,7 +1724,7 @@ type Arity = Int
-- | In 'PrimTyConI', is the type constructor unlifted?
type Unlifted = Bool
--- | 'InstanceDec' desribes a single instance of a class or type function.
+-- | 'InstanceDec' describes a single instance of a class or type function.
-- It is just a 'Dec', but guaranteed to be one of the following:
--
-- * 'InstanceD' (with empty @['Dec']@)
diff --git a/mk/warnings.mk b/mk/warnings.mk
index e2116a332a..5b51d7d97d 100644
--- a/mk/warnings.mk
+++ b/mk/warnings.mk
@@ -69,7 +69,7 @@ ifeq "$(HostOS_CPP)" "mingw32"
libraries/time_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports -Wno-identities
endif
-# On Windows, the pattern for CallConv is already exaustive. Ignore the warning
+# On Windows, the pattern for CallConv is already exhaustive. Ignore the warning
ifeq "$(HostOS_CPP)" "mingw32"
libraries/ghci_dist-install_EXTRA_HC_OPTS += -Wno-overlapping-patterns
endif
diff --git a/rts/Capability.c b/rts/Capability.c
index c112349925..aedce0dd8e 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -796,7 +796,7 @@ void waitForCapability (Capability **pCap, Task *task)
}
}
- // record the Capability as the one this Task is now assocated with.
+ // record the Capability as the one this Task is now associated with.
task->cap = cap;
} else {
diff --git a/rts/Hpc.c b/rts/Hpc.c
index 37df56b6af..6f9727560a 100644
--- a/rts/Hpc.c
+++ b/rts/Hpc.c
@@ -385,7 +385,7 @@ exitHpc(void) {
// Only write the tix file if you are the original process.
// Any sub-process from use of fork from inside Haskell will
- // not clober the .tix file.
+ // not clobber the .tix file.
if (hpc_pid == getpid()) {
FILE *f = __rts_fopen(tixFilename,"w+");
diff --git a/rts/Linker.c b/rts/Linker.c
index 3539f90584..1437009aed 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -814,7 +814,7 @@ HsBool removeLibrarySearchPath(HsPtr dll_path_index)
/* -----------------------------------------------------------------------------
* insert a symbol in the hash table
*
- * Returns: 0 on failure, nozero on success
+ * Returns: 0 on failure, nonzero on success
*/
HsInt insertSymbol(pathchar* obj_name, SymbolName* key, SymbolAddr* data)
{
diff --git a/rts/Profiling.c b/rts/Profiling.c
index a4247c7809..04f00da157 100644
--- a/rts/Profiling.c
+++ b/rts/Profiling.c
@@ -740,7 +740,7 @@ reportCCSProfiling( void )
}
/* -----------------------------------------------------------------------------
- * Accumulating total allocatinos and tick count
+ * Accumulating total allocations and tick count
-------------------------------------------------------------------------- */
/* Helper */
diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
index 50cddff051..e8a6a81747 100644
--- a/rts/RaiseAsync.c
+++ b/rts/RaiseAsync.c
@@ -187,7 +187,7 @@ throwToSelf (Capability *cap, StgTSO *tso, StgClosure *exception)
MessageThrowTo * exception was not raised; the source TSO
should now put itself in the state
BlockedOnMsgThrowTo, and when it is ready
- it should unlock the mssage using
+ it should unlock the message using
unlockClosure(msg, &stg_MSG_THROWTO_info);
If it decides not to raise the exception after
all, it can revoke it safely with
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 4d40810bc6..911cf32969 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -535,7 +535,7 @@ char** getUTF8Args(int* argc)
// We create two argument arrays, one which is later permutated by the RTS
// instead of the main argv.
- // The other one is used to free the allocted memory later.
+ // The other one is used to free the allocated memory later.
char** argv = (char**) stgMallocBytes(sizeof(char*) * (*argc + 1),
"getUTF8Args 1");
win32_full_utf8_argv = (char**) stgMallocBytes(sizeof(char*) * (*argc + 1),
diff --git a/rts/STM.h b/rts/STM.h
index 3d32daace2..69cee7b531 100644
--- a/rts/STM.h
+++ b/rts/STM.h
@@ -63,7 +63,7 @@ StgTRecHeader *stmStartNestedTransaction(Capability *cap, StgTRecHeader *outer
);
/*
- * Roll back the current transatcion context. NB: if this is a nested tx
+ * Roll back the current transaction context. NB: if this is a nested tx
* then we merge its read set into its parents. This is because a change
* to that read set could change whether or not the tx should abort.
*/
diff --git a/rts/Schedule.h b/rts/Schedule.h
index 6434515604..2d8d813464 100644
--- a/rts/Schedule.h
+++ b/rts/Schedule.h
@@ -95,7 +95,7 @@ extern volatile StgWord sched_state;
/* Recent activity flag.
* Locks required : Transition from MAYBE_NO to INACTIVE
- * happens in the timer signal, so it is atomic. Trnasition from
+ * happens in the timer signal, so it is atomic. Transition from
* INACTIVE to DONE_GC happens under sched_mutex. No lock required
* to set it to ACTIVITY_YES.
*/
diff --git a/rts/Stats.c b/rts/Stats.c
index 41427d0430..889f6d92f3 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -617,7 +617,7 @@ There are currently three reporting functions:
* report_machine_readable:
Responsible for producing '+RTS -t --machine-readable' output.
* report_one_line:
- Responsible for productin '+RTS -t' output
+ Responsible for producing '+RTS -t' output
Stats are accumulated into the global variable 'stats' as the program runs, then
in 'stat_exit' we do the following:
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index a6ef7054a4..2600f1e569 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -140,7 +140,7 @@ STG_NO_OPTIMIZE StgWord8 *win32AllocStack(void)
* alignment for these jumps.
*
* This gives us binary compatibility with LLVM and GCC as well as dealing
- * with the FFI. Previously we just maintianed a 16n byte alignment for
+ * with the FFI. Previously we just maintained a 16n byte alignment for
* procedure entry and calls, which led to bugs (see #4211 and #5250).
*
* To change this convention you need to change the code here, and in
diff --git a/rts/Threads.h b/rts/Threads.h
index 600d4eaff0..c0a9f1cf1c 100644
--- a/rts/Threads.h
+++ b/rts/Threads.h
@@ -36,7 +36,7 @@ bool removeThreadFromDeQueue (Capability *cap, StgTSO **head, StgTSO **tail, S
StgBool isThreadBound (StgTSO* tso);
-// Overfow/underflow
+// Overflow/underflow
void threadStackOverflow (Capability *cap, StgTSO *tso);
W_ threadStackUnderflow (Capability *cap, StgTSO *tso);
diff --git a/rts/linker/LoadArchive.c b/rts/linker/LoadArchive.c
index 936c0e5261..3d74b4d3df 100644
--- a/rts/linker/LoadArchive.c
+++ b/rts/linker/LoadArchive.c
@@ -440,7 +440,7 @@ static HsInt loadArchive_ (pathchar *path)
break;
}
}
- /* If we didn't find a '/', then a space teminates the
+ /* If we didn't find a '/', then a space terminates the
filename. Note that if we don't find one, then
thisFileNameSize ends up as 16, and we already have the
'\0' at the end. */
diff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.c
index 148a5043cf..6f61a5c447 100644
--- a/rts/linker/M32Alloc.c
+++ b/rts/linker/M32Alloc.c
@@ -36,7 +36,7 @@ known at compile time, code like:
m32_allocator_init();
will be compiled to call to `m32_allocator_init` if `RTS_LINKER_USE_MMAP` is
-true and will be optimised awat to nothing if `RTS_LINKER_USE_MMAP` is false.
+true and will be optimised away to nothing if `RTS_LINKER_USE_MMAP` is false.
However, regardless of the value of `RTS_LINKER_USE_MMAP` the compiler will
still check the call for syntax and correct function parameter types.
diff --git a/rts/posix/Select.c b/rts/posix/Select.c
index 5b143e1bf7..9cd8e4e010 100644
--- a/rts/posix/Select.c
+++ b/rts/posix/Select.c
@@ -3,7 +3,7 @@
* (c) The GHC Team 1995-2002
*
* Support for concurrent non-blocking I/O and thread waiting in the
- * non-threaded RTS. In the threded RTS, this file is not used at
+ * non-threaded RTS. In the threaded RTS, this file is not used at
* all, instead we use the IO manager thread implemented in Haskell in
* the base package.
*
diff --git a/rts/win32/ThrIOManager.c b/rts/win32/ThrIOManager.c
index 86133b6000..44414b92c3 100644
--- a/rts/win32/ThrIOManager.c
+++ b/rts/win32/ThrIOManager.c
@@ -18,7 +18,7 @@ static HANDLE io_manager_event = INVALID_HANDLE_VALUE;
// must agree with values in GHC.Conc:
#define IO_MANAGER_WAKEUP 0xffffffff
#define IO_MANAGER_DIE 0xfffffffe
-// spurios wakeups are returned as zero.
+// spurious wakeups are returned as zero.
// console events are ((event<<1) | 1)
#if defined(THREADED_RTS)
diff --git a/testsuite/README.md b/testsuite/README.md
index 3032c73979..3f113439f9 100644
--- a/testsuite/README.md
+++ b/testsuite/README.md
@@ -14,7 +14,7 @@ Commands to run testsuite:
* Test a specific 'way': `make WAY=optllvm`
* Keeping the run directory after test run: `make CLEANUP=0`. You will find a
directory `{test_name}.run` in the test's source directory.
- * Test a specifc stage of GHC: `make stage=1`
+ * Test a specific stage of GHC: `make stage=1`
* Skip performance tests: `make SKIP_PERF_TESTS=YES`
* Set verbosity: `make VERBOSE=n`
where n=0: No per-test output, n=1: Only failures,
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 6929f7144c..228a82b942 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1185,7 +1185,7 @@ def ghci_script( name, way, script):
# script can invoke the correct compiler by using ':! $HC $HC_OPTS'
cmd = ('HC={{compiler}} HC_OPTS="{flags}" {{compiler}} {way_flags} {flags}'
).format(flags=flags, way_flags=way_flags)
- # NB: put way_flags before flags so that flags in all.T can overrie others
+ # NB: put way_flags before flags so that flags in all.T can override others
getTestOpts().stdin = script
return simple_run( name, way, cmd, getTestOpts().extra_run_opts )
diff --git a/testsuite/driver/testutil.py b/testsuite/driver/testutil.py
index 19cdbf3625..e33b6a16ab 100644
--- a/testsuite/driver/testutil.py
+++ b/testsuite/driver/testutil.py
@@ -82,7 +82,7 @@ def testing_metrics():
# are forced to just copy instead.
#
# We define the following function to make this magic more
-# explicit/discoverable. You are enouraged to use it instead of os.symlink.
+# explicit/discoverable. You are encouraged to use it instead of os.symlink.
if platform.system() == 'Windows' and os.getenv('FORCE_SYMLINKS') == None:
def link_or_copy_file(src: Path, dst: Path):
shutil.copyfile(str(src), str(dst))
diff --git a/testsuite/tests/array/should_run/arr016.hs b/testsuite/tests/array/should_run/arr016.hs
index 792db470b7..72a29c4f09 100644
--- a/testsuite/tests/array/should_run/arr016.hs
+++ b/testsuite/tests/array/should_run/arr016.hs
@@ -122,7 +122,7 @@ rift n xs = comb (drop n xs) (take n xs)
comb [] [] = []
--- suffle makes n random rifts. Typically after
+-- shuffle makes n random rifts. Typically after
-- log n rifts, the list is in a pretty random order.
-- (where n is the number of elements in the list)
diff --git a/testsuite/tests/callarity/unittest/CallArity1.hs b/testsuite/tests/callarity/unittest/CallArity1.hs
index 00583d0209..3b74aeaa7e 100644
--- a/testsuite/tests/callarity/unittest/CallArity1.hs
+++ b/testsuite/tests/callarity/unittest/CallArity1.hs
@@ -121,7 +121,7 @@ exprs =
mkRLet go (mkLams [x] (mkACase (mkLams [y] $ mkLit 0) (Var go `mkVarApps` [x]))) $
mkRLet go2 (mkLams [x] (mkACase (mkLams [y] $ mkLit 0) (Var go2 `mkVarApps` [x]))) $
Var go `mkApps` [go2 `mkLApps` [0,1], mkLit 0]
- , ("mutual recursion (thunks), called mutiple times (both arity 1 would be bad!)",) $
+ , ("mutual recursion (thunks), called multiple times (both arity 1 would be bad!)",) $
Let (Rec [ (n, mkACase (mkLams [y] $ mkLit 0) (Var d))
, (d, mkACase (mkLams [y] $ mkLit 0) (Var n))]) $
Var n `mkApps` [Var d `mkApps` [Var d `mkApps` [mkLit 0]]]
diff --git a/testsuite/tests/callarity/unittest/CallArity1.stderr b/testsuite/tests/callarity/unittest/CallArity1.stderr
index 82cbc2ba01..754ac777a4 100644
--- a/testsuite/tests/callarity/unittest/CallArity1.stderr
+++ b/testsuite/tests/callarity/unittest/CallArity1.stderr
@@ -44,7 +44,7 @@ a function, one called multiple times via a forking recursion:
two functions (recursive):
go 2
go2 2
-mutual recursion (thunks), called mutiple times (both arity 1 would be bad!):
+mutual recursion (thunks), called multiple times (both arity 1 would be bad!):
d 0
n 0
mutual recursion (functions), but no thunks:
diff --git a/testsuite/tests/codeGen/should_run/T5785.hs b/testsuite/tests/codeGen/should_run/T5785.hs
index 1b27f10a15..e8dda7e9b6 100644
--- a/testsuite/tests/codeGen/should_run/T5785.hs
+++ b/testsuite/tests/codeGen/should_run/T5785.hs
@@ -28,7 +28,7 @@ main = do
print (2316287658 :: Int32)
print (2316287658 :: Int64)
- -- this requries a 64 (unsigned) bit word to store correctly
+ -- this requires a 64 (unsigned) bit word to store correctly
print (32342316287658 :: Word8)
print (32342316287658 :: Word16)
print (32342316287658 :: Word32)
diff --git a/testsuite/tests/codeGen/should_run/cgrun021.hs b/testsuite/tests/codeGen/should_run/cgrun021.hs
index bf7b404652..4f750aec08 100644
--- a/testsuite/tests/codeGen/should_run/cgrun021.hs
+++ b/testsuite/tests/codeGen/should_run/cgrun021.hs
@@ -5,7 +5,7 @@
The mutual recursion between munch and f causes lots of
closures to be built, of the form (munch n s), for some n and s.
Now, all of these closures are entered and each has as its value
- the result delivere by the next; so the result is that there is
+ the result delivered by the next; so the result is that there is
a massive chain of identical updates.
As it turns out, they are mostly garbage, so the GC could eliminate
diff --git a/testsuite/tests/codeGen/should_run/cgrun069_cmm.cmm b/testsuite/tests/codeGen/should_run/cgrun069_cmm.cmm
index 13a26aa012..006595e319 100644
--- a/testsuite/tests/codeGen/should_run/cgrun069_cmm.cmm
+++ b/testsuite/tests/codeGen/should_run/cgrun069_cmm.cmm
@@ -7,7 +7,7 @@ section "rodata" { memsetErr : bits8[] "Memset Error - align: %d size: %d\n"; }
section "rodata" { memcpyErr : bits8[] "Memcpy Error - align: %d size: %d\n"; }
// You have to call printf with the same number of args for every call.
// This is as the LLVM backend doesn't support vararg functions.
-section "rodata" { memmoveErr : bits8[] "Memmove Error Occured\n"; }
+section "rodata" { memmoveErr : bits8[] "Memmove Error Occurred\n"; }
memintrinTest (W_ dummy)
{
diff --git a/testsuite/tests/concurrent/prog001/Trit.hs b/testsuite/tests/concurrent/prog001/Trit.hs
index c42fe6d4cf..8674d6510b 100644
--- a/testsuite/tests/concurrent/prog001/Trit.hs
+++ b/testsuite/tests/concurrent/prog001/Trit.hs
@@ -55,7 +55,7 @@ addTrits (m1, (x1:x2:xs)) (m2, (y1:y2:ys)) = (u,addStream (x1:x2:xs) (y1:y2:ys))
--- Substraction of 2 Trits
+-- Subtraction of 2 Trits
subTrits :: Trit -> Trit -> Trit
subTrits x y = addTrits x (neg y)
diff --git a/testsuite/tests/deSugar/should_compile/T5252.hs b/testsuite/tests/deSugar/should_compile/T5252.hs
index ec7399d3cf..dc4c8fed45 100644
--- a/testsuite/tests/deSugar/should_compile/T5252.hs
+++ b/testsuite/tests/deSugar/should_compile/T5252.hs
@@ -1,5 +1,5 @@
-- #5252
--- Killed 7.03 when compiled witout -O,
+-- Killed 7.03 when compiled without -O,
-- because it could not see that x had a product type
-- but MkS still unpacked it
diff --git a/testsuite/tests/deSugar/should_compile/all.T b/testsuite/tests/deSugar/should_compile/all.T
index 21cf1b058d..f72a854045 100644
--- a/testsuite/tests/deSugar/should_compile/all.T
+++ b/testsuite/tests/deSugar/should_compile/all.T
@@ -81,7 +81,7 @@ test('T5252', [], makefile_test, [])
test('T5455', normal, compile, [''])
test('T5001', [only_ways(['optasm'])], multimod_compile, ['T5001', '-v0'])
-# T5252Take2 failed when compiled *wihtout* optimisation
+# T5252Take2 failed when compiled *without* optimisation
test('T5252Take2', [], makefile_test, [])
test('T2431', normal, compile, ['-ddump-simpl -dsuppress-uniques'])
test('T7669', normal, compile, [''])
diff --git a/testsuite/tests/deriving/should_fail/T11509_1.hs b/testsuite/tests/deriving/should_fail/T11509_1.hs
index d684e64fc9..ee088c3876 100644
--- a/testsuite/tests/deriving/should_fail/T11509_1.hs
+++ b/testsuite/tests/deriving/should_fail/T11509_1.hs
@@ -17,7 +17,7 @@ import GHC.StaticPtr
{-------------------------------------------------------------------------------
Standard Cloud-Haskell-like infrastructure
- See <https://gitlab.haskell.org/ghc/ghc/wikis/typeable-t> for a dicussion of 'SC'.
+ See <https://gitlab.haskell.org/ghc/ghc/wikis/typeable-t> for a discussion of 'SC'.
-------------------------------------------------------------------------------}
class Serializable a -- empty class, just for demonstration purposes
diff --git a/testsuite/tests/ffi/should_fail/ccfail003.hs b/testsuite/tests/ffi/should_fail/ccfail003.hs
index 339d629dd9..36ccf968b5 100644
--- a/testsuite/tests/ffi/should_fail/ccfail003.hs
+++ b/testsuite/tests/ffi/should_fail/ccfail003.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE UnliftedFFITypes, MagicHash #-}
--- !!! illegal types in foreign export delarations
+-- !!! illegal types in foreign export declarations
module ShouldFail where
import GHC.Exts
diff --git a/testsuite/tests/gadt/gadt7.hs b/testsuite/tests/gadt/gadt7.hs
index 105b60c807..5559cb82d3 100644
--- a/testsuite/tests/gadt/gadt7.hs
+++ b/testsuite/tests/gadt/gadt7.hs
@@ -12,7 +12,7 @@ i1 :: T a -> a -> Int
i1 t y = (\t1 y1 -> case t1 of K -> y1) t y
-- No type signature; should not type-check,
--- because we can't unify under the equalty constraint for K
+-- because we can't unify under the equality constraint for K
i1b t y = (\t1 y1 -> case t1 of K -> y1) t y
i2 :: T a -> a -> Int
diff --git a/testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs b/testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
index 335963be4e..754236a540 100644
--- a/testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
+++ b/testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE ScopedTypeVariables, ViewPatterns #-}
--- | This test checks if 'downsweep can return partial results when vaious
+-- | This test checks if 'downsweep can return partial results when various
-- kinds of parse errors occur in modules.
import GHC
diff --git a/testsuite/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs b/testsuite/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs
index 0e6e871215..cdd2bdce74 100644
--- a/testsuite/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs
+++ b/testsuite/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.hs
@@ -32,7 +32,7 @@ postInlineUnconditionally
-- 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
diff --git a/testsuite/tests/indexed-types/should_compile/Simple14.hs b/testsuite/tests/indexed-types/should_compile/Simple14.hs
index b8e002bdcd..0a47a649a5 100644
--- a/testsuite/tests/indexed-types/should_compile/Simple14.hs
+++ b/testsuite/tests/indexed-types/should_compile/Simple14.hs
@@ -21,5 +21,5 @@ foo = ntI (`eqE` (eqI :: EQ_ m n))
-- eq :: EQ_ (Maybe m) (Maybe n)
-- Need (Maybe m ~ Maybe n) => EQ_ m n ~ EQ_ zeta zeta
--- which redues to (m~n) => m ~ zeta
+-- which reduces to (m~n) => m ~ zeta
-- but then we are stuck \ No newline at end of file
diff --git a/testsuite/tests/indexed-types/should_fail/Makefile b/testsuite/tests/indexed-types/should_fail/Makefile
index 432003c9df..78a7c219a9 100644
--- a/testsuite/tests/indexed-types/should_fail/Makefile
+++ b/testsuite/tests/indexed-types/should_fail/Makefile
@@ -11,7 +11,7 @@ T8227:
-'$(TEST_HC)' $(TEST_HC_OPTS) -c T8227.hs
# T8129 is trying to ensure that we don't get an
-# an asertion failure with -ddump-tc-trace
+# an assertion failure with -ddump-tc-trace
T8129:
-'$(TEST_HC)' $(TEST_HC_OPTS) -c -ddump-tc-trace T8129.hs 2> T8129.trace > T8129.trace
grep -a deduce T8129.trace
diff --git a/testsuite/tests/numeric/should_run/T12136.hs b/testsuite/tests/numeric/should_run/T12136.hs
index 1f967a84bd..999ffa02bf 100644
--- a/testsuite/tests/numeric/should_run/T12136.hs
+++ b/testsuite/tests/numeric/should_run/T12136.hs
@@ -15,5 +15,5 @@ negativeBigInteger :: Integer
negativeBigInteger = 1 - (1 `shiftL` (64 * 2))
main = do
- -- rigt shift by GMP_LIMB_BITS
+ -- right shift by GMP_LIMB_BITS
print $ negativeBigInteger `shiftR` 64
diff --git a/testsuite/tests/numeric/should_run/arith018.hs b/testsuite/tests/numeric/should_run/arith018.hs
index b73fd5a685..83c822ef3a 100644
--- a/testsuite/tests/numeric/should_run/arith018.hs
+++ b/testsuite/tests/numeric/should_run/arith018.hs
@@ -1,5 +1,5 @@
-- exposes a bug in the native code generator in GHC 6.4.1. Division by
--- a power of 2 was being mis-optimsed to a direct shift.
+-- a power of 2 was being mis-optimised to a direct shift.
main = do
print (map f4 [(-20) .. (-1)])
diff --git a/testsuite/tests/numeric/should_run/numrun014.hs b/testsuite/tests/numeric/should_run/numrun014.hs
index 207e7663c0..34a316e789 100644
--- a/testsuite/tests/numeric/should_run/numrun014.hs
+++ b/testsuite/tests/numeric/should_run/numrun014.hs
@@ -69,7 +69,7 @@ main = do putStrLn "=== Subtraction ==="
print (neginf + nan)
print (neginf + inf)
print (neginf + neginf)
- putStrLn "=== Mutiplication ==="
+ putStrLn "=== Multiplication ==="
print (zero * zero)
print (zero * one)
print (zero * nan)
@@ -156,7 +156,7 @@ main = do putStrLn "=== Subtraction ==="
print (fneginf + fnan)
print (fneginf + finf)
print (fneginf + fneginf)
- putStrLn "=== Mutiplication ==="
+ putStrLn "=== Multiplication ==="
print (fzero * fzero)
print (fzero * fone)
print (fzero * fnan)
diff --git a/testsuite/tests/numeric/should_run/numrun014.stdout b/testsuite/tests/numeric/should_run/numrun014.stdout
index 3bcfad620d..82df93f5b0 100644
--- a/testsuite/tests/numeric/should_run/numrun014.stdout
+++ b/testsuite/tests/numeric/should_run/numrun014.stdout
@@ -32,7 +32,7 @@ NaN
NaN
NaN
-Infinity
-=== Mutiplication ===
+=== Multiplication ===
0.0
0.0
NaN
@@ -118,7 +118,7 @@ NaN
NaN
NaN
-Infinity
-=== Mutiplication ===
+=== Multiplication ===
0.0
0.0
NaN
diff --git a/testsuite/tests/pmcheck/should_compile/T17357.hs b/testsuite/tests/pmcheck/should_compile/T17357.hs
index db1b0ab4fd..a27f52c31f 100644
--- a/testsuite/tests/pmcheck/should_compile/T17357.hs
+++ b/testsuite/tests/pmcheck/should_compile/T17357.hs
@@ -35,7 +35,7 @@ pattern T <- (const True -> True)
{-# COMPLETE T, F :: Void #-}
-- | But we consider COMPLETE signatures to cover bottom. Hence the last clause
--- here should be redunant, not inaccessible RHS.
+-- here should be redundant, not inaccessible RHS.
f3 :: Void -> ()
f3 T = ()
f3 F = ()
diff --git a/testsuite/tests/programs/andy_cherry/Main.hs b/testsuite/tests/programs/andy_cherry/Main.hs
index f4b2ed827e..1fbe347faf 100644
--- a/testsuite/tests/programs/andy_cherry/Main.hs
+++ b/testsuite/tests/programs/andy_cherry/Main.hs
@@ -105,19 +105,19 @@
-> String -- result
prog OutputPGN _
= pgnPrinter True -- print out game(s)
- . map runInterp -- interprete all games
+ . map runInterp -- interpret all games
prog OutputRawPGN _
= pgnPrinter False -- print out game(s)
- . map runInterp -- interprete all games
+ . map runInterp -- interpret all games
prog OutputHeader _
= pgnHeadPrinter -- print out game(s) headers
- . map runInterp -- interprete all games
+ . map runInterp -- interpret all games
prog OutputTEX _
= texPrinter -- print out game(s)
- . map runInterp -- interprete all games
+ . map runInterp -- interpret all games
prog ViewGame std_in
= interactViewer std_in -- print out game(s)
- . runInterp -- interprete the game
+ . runInterp -- interpret the game
. head -- should check for only *one* object
prog OutputParser _
= userFormat
diff --git a/testsuite/tests/rename/should_compile/mc09.hs b/testsuite/tests/rename/should_compile/mc09.hs
index f4a62fa617..1e1f2819b5 100644
--- a/testsuite/tests/rename/should_compile/mc09.hs
+++ b/testsuite/tests/rename/should_compile/mc09.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE MonadComprehensions, TransformListComp #-}
--- Test performed for TransformListComp and should work for monad comp aswell:
+-- Test performed for TransformListComp and should work for monad comp as well:
-- GHC 7.0.1 failed because the renamer didn't attach
-- all the used variables to the TransformListComp constructor
diff --git a/testsuite/tests/rename/should_compile/mc10.hs b/testsuite/tests/rename/should_compile/mc10.hs
index fa9774fdfb..e1a4f81e25 100644
--- a/testsuite/tests/rename/should_compile/mc10.hs
+++ b/testsuite/tests/rename/should_compile/mc10.hs
@@ -1,6 +1,6 @@
{-# OPTIONS_GHC -fwarn-unused-matches #-}
{-# LANGUAGE MonadComprehensions, ParallelListComp #-}
--- Test for parallel list comp should work for monad comp aswell:
+-- Test for parallel list comp should work for monad comp as well:
--
-- GHC 6.4 erroneously reported that the
-- bindings for q and z were unused
diff --git a/testsuite/tests/rename/should_fail/T12686.hs b/testsuite/tests/rename/should_fail/T12686.hs
index 5d652f9c57..a9d0da9aa1 100644
--- a/testsuite/tests/rename/should_fail/T12686.hs
+++ b/testsuite/tests/rename/should_fail/T12686.hs
@@ -5,7 +5,7 @@ import Data.Proxy
x = True
data Bad = Bad 'x
--- The 'x should be rejeted in a civilised way
+-- The 'x should be rejected in a civilised way
data AlsoBad = AlsoBad {
a :: Int,
diff --git a/testsuite/tests/rename/should_fail/mc14.hs b/testsuite/tests/rename/should_fail/mc14.hs
index 47d903b922..80bea39e7e 100644
--- a/testsuite/tests/rename/should_fail/mc14.hs
+++ b/testsuite/tests/rename/should_fail/mc14.hs
@@ -1,4 +1,4 @@
--- Test for transform list comp which should work for monad comp aswell:
+-- Test for transform list comp which should work for monad comp as well:
--
-- Test trying to use a function bound in the list comprehension as the group function
diff --git a/testsuite/tests/safeHaskell/check/all.T b/testsuite/tests/safeHaskell/check/all.T
index 8cf37d3b43..ae836fba31 100644
--- a/testsuite/tests/safeHaskell/check/all.T
+++ b/testsuite/tests/safeHaskell/check/all.T
@@ -31,7 +31,7 @@ test('Check03', normal, multi_compile, ['Check03', [
], '-fpackage-trust'])
# Check a slightly larger transitive program. Check01 isn't imported
-# safely by Check03 so we don't require base trused at end.
+# safely by Check03 so we don't require base trusted at end.
test('Check04', normal, multi_compile, ['Check04', [
('Check04_A.hs', ''),
('Check04_B.hs', '-trust base'),
diff --git a/testsuite/tests/safeHaskell/ghci/p2.script b/testsuite/tests/safeHaskell/ghci/p2.script
index 19133c7b13..188915579e 100644
--- a/testsuite/tests/safeHaskell/ghci/p2.script
+++ b/testsuite/tests/safeHaskell/ghci/p2.script
@@ -3,7 +3,7 @@
:unset +s
:set -XSafe
--- we actually allow this for now but may want to revist this decision
+-- we actually allow this for now but may want to revisit this decision
-- (as in, given we are in -XSafe, we may not want to allow package trust
-- flags to be changed...)
:set -trust base
diff --git a/testsuite/tests/safeHaskell/safeInfered/all.T b/testsuite/tests/safeHaskell/safeInfered/all.T
index e9b03b5458..87fe5778a5 100644
--- a/testsuite/tests/safeHaskell/safeInfered/all.T
+++ b/testsuite/tests/safeHaskell/safeInfered/all.T
@@ -61,7 +61,7 @@ test('UnsafeWarn05', normal, compile, [''])
test('UnsafeWarn06', normal, compile, [''])
test('UnsafeWarn07', normal, compile, [''])
-# Chck -fwa-safe works
+# Check -fwa-safe works
test('SafeWarn01', normal, compile, [''])
test('T16689', normal, compile, ['-Wsafe'])
diff --git a/testsuite/tests/safeHaskell/safeLanguage/all.T b/testsuite/tests/safeHaskell/safeLanguage/all.T
index dc38031b28..de4a9b6908 100644
--- a/testsuite/tests/safeHaskell/safeLanguage/all.T
+++ b/testsuite/tests/safeHaskell/safeLanguage/all.T
@@ -1,7 +1,7 @@
# safeLanguage tests are all about making sure the correct
# unsafe language extensions are disabled or restricted
# in the -XSafe language. Basically testing that -XSafe
-# works correctly (incluidng testing safe imports a little).
+# works correctly (including testing safe imports a little).
# Just do the normal way, SafeHaskell is all in the frontend
def f( name, opts ):
diff --git a/testsuite/tests/simplCore/prog003/OneShot1.hs b/testsuite/tests/simplCore/prog003/OneShot1.hs
index 3f6589acd1..f24a830858 100644
--- a/testsuite/tests/simplCore/prog003/OneShot1.hs
+++ b/testsuite/tests/simplCore/prog003/OneShot1.hs
@@ -5,7 +5,7 @@ import GHC.Base
-- This oneShot is a lie, and together with unsafePerformIO (in the form of
-- trace) in OneShot2, we can observe the difference.
--- Two modules to ensure that oneShot annotations surive interface files, both
+-- Two modules to ensure that oneShot annotations survive interface files, both
-- in explicits unfoldings (foo) and in unannotated functions (baz)
foo :: Int -> Int -> Int
diff --git a/testsuite/tests/simplCore/should_compile/dfun-loop.hs b/testsuite/tests/simplCore/should_compile/dfun-loop.hs
index 4ad23f3401..20f338bd1b 100644
--- a/testsuite/tests/simplCore/should_compile/dfun-loop.hs
+++ b/testsuite/tests/simplCore/should_compile/dfun-loop.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
-- This one sent an earlier version of GHC into a
--- loop in the simplfier, because we allowed a RULE
+-- loop in the simplifier, because we allowed a RULE
-- to fire on a loop-breaker
--
-- Discovered by Roman L, Nov 09
diff --git a/testsuite/tests/th/T11809.hs b/testsuite/tests/th/T11809.hs
index bbb65fa83b..94b6368b7b 100644
--- a/testsuite/tests/th/T11809.hs
+++ b/testsuite/tests/th/T11809.hs
@@ -10,4 +10,4 @@ module T11809 where
getD = unD someD -- unD should resolve to the record selector above!
|]
-getD' = unD someD -- dito here outside of the splice!
+getD' = unD someD -- ditto here outside of the splice!
diff --git a/testsuite/tests/typecheck/should_compile/TcCustomSolverSuper.hs b/testsuite/tests/typecheck/should_compile/TcCustomSolverSuper.hs
index b5e20be448..6b243bda96 100644
--- a/testsuite/tests/typecheck/should_compile/TcCustomSolverSuper.hs
+++ b/testsuite/tests/typecheck/should_compile/TcCustomSolverSuper.hs
@@ -17,7 +17,7 @@ we got this right.
PS: this test used to have Typeable in the context too, but
that's a redundant constraint, so I removed it
-PPS: the whole structre of tcSuperClasses has changed,
+PPS: the whole structure of tcSuperClasses has changed,
so I'm no longer sure what is being tested here
-}
diff --git a/testsuite/tests/typecheck/should_compile/tc109.hs b/testsuite/tests/typecheck/should_compile/tc109.hs
index 2a08caea08..7aa66cf02c 100644
--- a/testsuite/tests/typecheck/should_compile/tc109.hs
+++ b/testsuite/tests/typecheck/should_compile/tc109.hs
@@ -15,6 +15,6 @@ instance (P a,R a b) => P [b]
{- GHC 4.08.1 doesn't seem to allow variables in the context that
don't appear after the =>, but which are still ok since they are
-determined by the functional dependenices. -}
+determined by the functional dependencies. -}
diff --git a/testsuite/tests/typecheck/should_compile/tc199.hs b/testsuite/tests/typecheck/should_compile/tc199.hs
index 4e65358aa0..73df16f68c 100644
--- a/testsuite/tests/typecheck/should_compile/tc199.hs
+++ b/testsuite/tests/typecheck/should_compile/tc199.hs
@@ -5,7 +5,7 @@
-- Hence needing AllowAmbiguousTypes
--
-- However, arguably the instance declaration should be accepted,
--- beause it's equivalent to
+-- because it's equivalent to
-- instance Baz Int Int where { foo x = x }
-- which *does* typecheck
diff --git a/testsuite/tests/typecheck/should_fail/tcfail105.hs b/testsuite/tests/typecheck/should_fail/tcfail105.hs
index b0efc5b424..68d88b8961 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail105.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail105.hs
@@ -2,7 +2,7 @@
-- Existential context should quantify over some new type variables
--
--- Jan07: this is now fine, because we've lifted the restrction
+-- Jan07: this is now fine, because we've lifted the restriction
-- that the context on a constructor should mention
-- existential type variables
diff --git a/testsuite/tests/typecheck/should_fail/tcfail129.hs b/testsuite/tests/typecheck/should_fail/tcfail129.hs
index 1a74749f56..271bd52715 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail129.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail129.hs
@@ -1,6 +1,6 @@
-- Both blocks are illegal Haskell 98, because of the un-saturated
-- type synonym, but (rather obscurely) at one point (GHC 6.3), we
--- acceped 'blah', but rejected 'blah1'
+-- accepted 'blah', but rejected 'blah1'
module ShouldFail where
diff --git a/testsuite/tests/typecheck/should_fail/tcfail138.hs b/testsuite/tests/typecheck/should_fail/tcfail138.hs
index 1c628a1b5b..be21d5f84c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail138.hs
+++ b/testsuite/tests/typecheck/should_fail/tcfail138.hs
@@ -3,7 +3,7 @@
FlexibleInstances, UndecidableInstances #-}
-- UndecidableInstances because (L a b) is no smaller than (C a b)
--- This one shows up another rather subtle functional-dependecy
+-- This one shows up another rather subtle functional-dependency
-- case. The error is:
--
-- Could not deduce (C a b') from the context (C a b)
diff --git a/testsuite/tests/warnings/should_compile/all.T b/testsuite/tests/warnings/should_compile/all.T
index 914f4514d3..03c4fcb7b8 100644
--- a/testsuite/tests/warnings/should_compile/all.T
+++ b/testsuite/tests/warnings/should_compile/all.T
@@ -2,7 +2,7 @@
test('T2526', normal, compile, ['-fwarn-missing-signatures -fwarn-missing-exported-signatures'])
test('T9178', [], multimod_compile, ['T9178', '-Wall'])
-# T9230.hs contains a tab charater. Test that -Wtabs is enabled by default.
+# T9230.hs contains a tab character. Test that -Wtabs is enabled by default.
test('T9230', normal, compile, [''])
test('T10908', normal, compile, [''])
diff --git a/testsuite/tests/warnings/should_compile/sel_werror.hs b/testsuite/tests/warnings/should_compile/sel_werror.hs
deleted file mode 100644
index 65702539ad..0000000000
--- a/testsuite/tests/warnings/should_compile/sel_werror.hs
+++ /dev/null
@@ -1,3 +0,0 @@
-{-# OPTIONS_GHC -Wwarn-missing-signatues -Werror=incomplete-patterns #-}
-
-foo () = ()
diff --git a/testsuite/timeout/timeout.cabal b/testsuite/timeout/timeout.cabal
index c44eadf02d..0ada69b43f 100644
--- a/testsuite/timeout/timeout.cabal
+++ b/testsuite/timeout/timeout.cabal
@@ -4,7 +4,7 @@ Copyright: GHC Team
License: BSD3
Author: GHC Team <cvs-ghc@haskell.org>
Maintainer: GHC Team <cvs-ghc@haskell.org>
-Synopsis: timout utility
+Synopsis: timeout utility
Description: timeout utility
Category: Development
build-type: Simple
diff --git a/utils/hp2ps/hp2ps.1 b/utils/hp2ps/hp2ps.1
index 11d9949e43..bfe35ff76d 100644
--- a/utils/hp2ps/hp2ps.1
+++ b/utils/hp2ps/hp2ps.1
@@ -84,7 +84,7 @@ mode without scaling. The output is unsuitable for a laser printer.
.IP "\fB\-p\fP"
Use previous parameters. By default, the \*(PS graph is automatically
scaled both horizontally and vertically so that it fills the page.
-However, when preparing a seires of graphs for use in a presentation,
+However, when preparing a series of graphs for use in a presentation,
it is often useful to draw a new graph using the same scale, shading and
ordering as a previous one. The
.B \-p
diff --git a/utils/iserv-proxy/iserv-proxy.cabal.in b/utils/iserv-proxy/iserv-proxy.cabal.in
index cd36426f81..7cfdd9ad7f 100644
--- a/utils/iserv-proxy/iserv-proxy.cabal.in
+++ b/utils/iserv-proxy/iserv-proxy.cabal.in
@@ -9,7 +9,7 @@ License: BSD3
-- XXX License-File: LICENSE
Author: XXX
Maintainer: XXX
-Synopsis: iserv allows GHC to delegate Tempalte Haskell computations
+Synopsis: iserv allows GHC to delegate Template Haskell computations
Description:
GHC can be provided with a path to the iserv binary with
@-pgmi=/path/to/iserv-bin@, and will in combination with
diff --git a/utils/remote-iserv/remote-iserv.cabal.in b/utils/remote-iserv/remote-iserv.cabal.in
index a1cba01301..7ecf099eac 100644
--- a/utils/remote-iserv/remote-iserv.cabal.in
+++ b/utils/remote-iserv/remote-iserv.cabal.in
@@ -9,7 +9,7 @@ License: BSD3
-- XXX License-File: LICENSE
Author: Moritz Angermann <moritz.angermann@gmail.com>
Maintainer: Moritz Angermann <moritz.angermann@gmail.com>
-Synopsis: iserv allows GHC to delegate Tempalte Haskell computations
+Synopsis: iserv allows GHC to delegate Template Haskell computations
Description:
This is a very simple remote runner for iserv, to be used together
with iserv-proxy. The foundamental idea is that this this wrapper