summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorJan Hrček <honza.hrk@gmail.com>2020-06-24 15:55:39 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-28 09:20:22 -0400
commit68530b1cd45629e5a353a37df80195ac54d26ade (patch)
treea6aa929d32d9c1caff4ca57c5ffde238d7c9717a /compiler
parent42f797b0ad034a92389e7081aa50ef4ab3434d01 (diff)
downloadhaskell-68530b1cd45629e5a353a37df80195ac54d26ade.tar.gz
Fix duplicated words and typos in comments and user guide
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Builtin/PrimOps.hs2
-rw-r--r--compiler/GHC/Builtin/Types.hs2
-rw-r--r--compiler/GHC/Builtin/Types/Prim.hs2
-rw-r--r--compiler/GHC/Builtin/primops.txt.pp2
-rw-r--r--compiler/GHC/Cmm/Info/Build.hs2
-rw-r--r--compiler/GHC/Cmm/Monad.hs2
-rw-r--r--compiler/GHC/CmmToAsm/BlockLayout.hs2
-rw-r--r--compiler/GHC/CmmToAsm/SPARC/Regs.hs2
-rw-r--r--compiler/GHC/CmmToAsm/X86/Ppr.hs2
-rw-r--r--compiler/GHC/Core.hs2
-rw-r--r--compiler/GHC/Core/Lint.hs2
-rw-r--r--compiler/GHC/Core/Multiplicity.hs2
-rw-r--r--compiler/GHC/Core/Opt/Driver.hs2
-rw-r--r--compiler/GHC/Core/Opt/Simplify.hs2
-rw-r--r--compiler/GHC/Core/Opt/Simplify/Env.hs2
-rw-r--r--compiler/GHC/Core/Opt/Simplify/Utils.hs2
-rw-r--r--compiler/GHC/Core/Opt/SpecConstr.hs2
-rw-r--r--compiler/GHC/Core/SimpleOpt.hs2
-rw-r--r--compiler/GHC/Core/Subst.hs4
-rw-r--r--compiler/GHC/Core/TyCon.hs2
-rw-r--r--compiler/GHC/Core/Type.hs2
-rw-r--r--compiler/GHC/Data/Bitmap.hs2
-rw-r--r--compiler/GHC/Driver/CodeOutput.hs2
-rw-r--r--compiler/GHC/Driver/Main.hs2
-rw-r--r--compiler/GHC/Driver/Make.hs2
-rw-r--r--compiler/GHC/Driver/MakeFile.hs4
-rw-r--r--compiler/GHC/Hs/Decls.hs2
-rw-r--r--compiler/GHC/HsToCore/Docs.hs2
-rw-r--r--compiler/GHC/HsToCore/PmCheck/Oracle.hs4
-rw-r--r--compiler/GHC/HsToCore/Utils.hs2
-rw-r--r--compiler/GHC/Iface/Env.hs2
-rw-r--r--compiler/GHC/Iface/Load.hs2
-rw-r--r--compiler/GHC/Iface/Recomp.hs2
-rw-r--r--compiler/GHC/Iface/Rename.hs4
-rw-r--r--compiler/GHC/Iface/Type.hs2
-rw-r--r--compiler/GHC/Rename/Splice.hs2
-rw-r--r--compiler/GHC/Stg/Unarise.hs2
-rw-r--r--compiler/GHC/StgToCmm/DataCon.hs2
-rw-r--r--compiler/GHC/StgToCmm/Expr.hs2
-rw-r--r--compiler/GHC/StgToCmm/ExtCode.hs2
-rw-r--r--compiler/GHC/StgToCmm/Prim.hs2
-rw-r--r--compiler/GHC/StgToCmm/Types.hs2
-rw-r--r--compiler/GHC/Tc/Deriv/Utils.hs2
-rw-r--r--compiler/GHC/Tc/Errors/Hole.hs8
-rw-r--r--compiler/GHC/Tc/Gen/Bind.hs4
-rw-r--r--compiler/GHC/Tc/Gen/Expr.hs2
-rw-r--r--compiler/GHC/Tc/Gen/HsType.hs2
-rw-r--r--compiler/GHC/Tc/Solver.hs4
-rw-r--r--compiler/GHC/Tc/Solver/Monad.hs2
-rw-r--r--compiler/GHC/Tc/TyCl.hs6
-rw-r--r--compiler/GHC/Tc/Types.hs2
-rw-r--r--compiler/GHC/Tc/Utils/Env.hs2
-rw-r--r--compiler/GHC/Tc/Validity.hs2
-rw-r--r--compiler/GHC/Types/Basic.hs4
-rw-r--r--compiler/GHC/Types/Id/Info.hs2
-rw-r--r--compiler/GHC/Types/Literal.hs2
-rw-r--r--compiler/GHC/Types/RepType.hs4
-rw-r--r--compiler/GHC/Unit/State.hs2
58 files changed, 71 insertions, 71 deletions
diff --git a/compiler/GHC/Builtin/PrimOps.hs b/compiler/GHC/Builtin/PrimOps.hs
index a4bd412c37..9ee4834bf6 100644
--- a/compiler/GHC/Builtin/PrimOps.hs
+++ b/compiler/GHC/Builtin/PrimOps.hs
@@ -467,7 +467,7 @@ Duplicate YES NO
Note [Implementation: how can_fail/has_side_effects affect transformations]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-How do we ensure that that floating/duplication/discarding are done right
+How do we ensure that floating/duplication/discarding are done right
in the simplifier?
Two main predicates on primpops test these flags:
diff --git a/compiler/GHC/Builtin/Types.hs b/compiler/GHC/Builtin/Types.hs
index e5fbbcc9a3..86b8879c60 100644
--- a/compiler/GHC/Builtin/Types.hs
+++ b/compiler/GHC/Builtin/Types.hs
@@ -301,7 +301,7 @@ syntax. This has a few consequences:
* Writing (a ~ b) does not require enabling -XTypeOperators. It does, however,
require -XGADTs or -XTypeFamilies.
-* The (~) type operator is always in scope. It doesn't need to be be imported,
+* The (~) type operator is always in scope. It doesn't need to be imported,
and it cannot be hidden.
* We have a bunch of special cases in the compiler to arrange all of the above.
diff --git a/compiler/GHC/Builtin/Types/Prim.hs b/compiler/GHC/Builtin/Types/Prim.hs
index 559ad3e083..88ef943a64 100644
--- a/compiler/GHC/Builtin/Types/Prim.hs
+++ b/compiler/GHC/Builtin/Types/Prim.hs
@@ -472,7 +472,7 @@ 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]
f = /\(rr:RuntimeRep) (a:rr) \(a:rr). ...
-This is no good: we could not generate code code for 'f', because the
+This is no good: we could not generate code for 'f', because the
calling convention for 'f' varies depending on whether the argument is
a a Int, Int#, or Float#. (You could imagine generating specialised
code, one for each instantiation of 'rr', but we don't do that.)
diff --git a/compiler/GHC/Builtin/primops.txt.pp b/compiler/GHC/Builtin/primops.txt.pp
index 62391da8f8..a12ac1f29c 100644
--- a/compiler/GHC/Builtin/primops.txt.pp
+++ b/compiler/GHC/Builtin/primops.txt.pp
@@ -3430,7 +3430,7 @@ primop TraceEventBinaryOp "traceBinaryEvent#" GenPrimOp
Addr# -> Int# -> State# s -> State# s
{ Emits an event via the RTS tracing framework. The contents
of the event is the binary object passed as the first argument with
- the the given length passed as the second argument. The event will be
+ the given length passed as the second argument. The event will be
emitted to the {\tt .eventlog} file. }
with
has_side_effects = True
diff --git a/compiler/GHC/Cmm/Info/Build.hs b/compiler/GHC/Cmm/Info/Build.hs
index fc3d21e2ca..92e2f671fb 100644
--- a/compiler/GHC/Cmm/Info/Build.hs
+++ b/compiler/GHC/Cmm/Info/Build.hs
@@ -1027,7 +1027,7 @@ oneSRT dflags staticFuns lbls caf_lbls isCAF cafs static_data = do
-- "Referring to an SRT from the info table" of Note [SRTs]). However,
-- when dynamic linking is used we cannot guarantee that the offset
-- between the SRT and the info table will fit in the offset field.
- -- Consequently we build a singleton SRT in in this case.
+ -- Consequently we build a singleton SRT in this case.
not (labelDynamic config this_mod lbl)
-- MachO relocations can't express offsets between compilation units at
diff --git a/compiler/GHC/Cmm/Monad.hs b/compiler/GHC/Cmm/Monad.hs
index 27cf51af4f..310b316e02 100644
--- a/compiler/GHC/Cmm/Monad.hs
+++ b/compiler/GHC/Cmm/Monad.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- A Parser monad with access to the 'DynFlags'.
--
--- The 'P' monad only has access to the subset of of 'DynFlags'
+-- The 'P' monad only has access to the subset of 'DynFlags'
-- required for parsing Haskell.
-- The parser for C-- requires access to a lot more of the 'DynFlags',
diff --git a/compiler/GHC/CmmToAsm/BlockLayout.hs b/compiler/GHC/CmmToAsm/BlockLayout.hs
index 817efef4ad..08af8e9f9f 100644
--- a/compiler/GHC/CmmToAsm/BlockLayout.hs
+++ b/compiler/GHC/CmmToAsm/BlockLayout.hs
@@ -545,7 +545,7 @@ buildChains edges blocks
-- buildNext builds up chains from edges one at a time.
-- We keep a map from the ends of chains to the chains.
- -- This we we can easily check if an block should be appended to an
+ -- This way we can easily check if an block should be appended to an
-- existing chain!
-- We store them using STRefs so we don't have to rebuild the spine of both
-- maps every time we update a chain.
diff --git a/compiler/GHC/CmmToAsm/SPARC/Regs.hs b/compiler/GHC/CmmToAsm/SPARC/Regs.hs
index 9ee68baee2..fe2de7f544 100644
--- a/compiler/GHC/CmmToAsm/SPARC/Regs.hs
+++ b/compiler/GHC/CmmToAsm/SPARC/Regs.hs
@@ -218,7 +218,7 @@ argRegs r
_ -> panic "MachRegs.argRegs(sparc): don't know about >6 arguments!"
--- | All all the regs that could possibly be returned by argRegs
+-- | All the regs that could possibly be returned by argRegs
--
allArgRegs :: [Reg]
allArgRegs
diff --git a/compiler/GHC/CmmToAsm/X86/Ppr.hs b/compiler/GHC/CmmToAsm/X86/Ppr.hs
index 1accde5a5d..49e4de8ad5 100644
--- a/compiler/GHC/CmmToAsm/X86/Ppr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Ppr.hs
@@ -58,7 +58,7 @@ import Data.Bits
-- If we are using the .subsections_via_symbols directive
-- (available on recent versions of Darwin),
-- we have to make sure that there is some kind of reference
--- from the entry code to a label on the _top_ of of the info table,
+-- from the entry code to a label on the _top_ of the info table,
-- so that the linker will not think it is unreferenced and dead-strip
-- it. That's why the label is called a DeadStripPreventer (_dsp).
--
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs
index 613aef8f95..bc61929ed4 100644
--- a/compiler/GHC/Core.hs
+++ b/compiler/GHC/Core.hs
@@ -538,7 +538,7 @@ substitutions until the next run of the simplifier.
case (eq_sel d) of (co :: a ~# b) -> blah
where eq_sel :: (a~b) -> (a~#b)
- Or even even
+ Or even
case (df @Int) of (co :: a ~# b) -> blah
Which is very exotic, and I think never encountered; but see
Note [Equality superclasses in quantified constraints]
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index 85f490f68b..eb51508314 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -504,7 +504,7 @@ lintCoreBindings dflags pass local_in_scope binds
(_, dups) = removeDups compare binders
-- dups_ext checks for names with different uniques
- -- but but the same External name M.n. We don't
+ -- but the same External name M.n. We don't
-- allow this at top level:
-- M.n{r3} = ...
-- M.n{r29} = ...
diff --git a/compiler/GHC/Core/Multiplicity.hs b/compiler/GHC/Core/Multiplicity.hs
index 81e84e9936..8c3ad88fc2 100644
--- a/compiler/GHC/Core/Multiplicity.hs
+++ b/compiler/GHC/Core/Multiplicity.hs
@@ -290,7 +290,7 @@ cause more programs to fail to typecheck.
In future work, instead of approximating we might add type families
and allow users to write types involving operations on multiplicities.
In this case, we could enforce more invariants in Mult, for example,
-enforce that that it is in the form of a sum of products, and even
+enforce that it is in the form of a sum of products, and even
that the sumands and factors are ordered somehow, to have more equalities.
-}
diff --git a/compiler/GHC/Core/Opt/Driver.hs b/compiler/GHC/Core/Opt/Driver.hs
index 07714aafaa..ae7e35c5c7 100644
--- a/compiler/GHC/Core/Opt/Driver.hs
+++ b/compiler/GHC/Core/Opt/Driver.hs
@@ -909,7 +909,7 @@ Which we want to become:
x_exported = tick<x> <expression>
As it makes no sense to keep the tick and the expression on separate
-bindings. Note however that that this might increase the ticks scoping
+bindings. Note however that this might increase the ticks scoping
over the execution of x_local, so we can only do this for floatable
ticks. More often than not, other references will be unfoldings of
x_exported, and therefore carry the tick anyway.
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs
index dba4362a81..b4d3766502 100644
--- a/compiler/GHC/Core/Opt/Simplify.hs
+++ b/compiler/GHC/Core/Opt/Simplify.hs
@@ -497,7 +497,7 @@ Where should the NOINLINE pragma go? If we leave it on f we'll get
; {-# NOINLINE f #-}
f = $wf |> co
; g = ...f... }
-and that is bad bad: the whole point is that we want to inline that
+and that is bad: the whole point is that we want to inline that
cast! We want to transfer the pagma to $wf:
rec { {-# NOINLINE $wf #-}
$wf = ...g...
diff --git a/compiler/GHC/Core/Opt/Simplify/Env.hs b/compiler/GHC/Core/Opt/Simplify/Env.hs
index 71658c1295..c5f8193b4f 100644
--- a/compiler/GHC/Core/Opt/Simplify/Env.hs
+++ b/compiler/GHC/Core/Opt/Simplify/Env.hs
@@ -854,7 +854,7 @@ seqIds (id:ids) = seqId id `seq` seqIds ids
{-
Note [Arity robustness]
~~~~~~~~~~~~~~~~~~~~~~~
-We *do* transfer the arity from from the in_id of a let binding to the
+We *do* transfer the arity from the in_id of a let binding to the
out_id. This is important, so that the arity of an Id is visible in
its own RHS. For example:
f = \x. ....g (\y. f y)....
diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs
index eca8f0a474..a57550ddd2 100644
--- a/compiler/GHC/Core/Opt/Simplify/Utils.hs
+++ b/compiler/GHC/Core/Opt/Simplify/Utils.hs
@@ -207,7 +207,7 @@ the following invariants hold
(a) if dup = OkToDup, then continuation k is also ok-to-dup
(b) if dup = OkToDup or Simplified, the subst-env is empty
- (and and hence no need to re-simplify)
+ (and hence no need to re-simplify)
-}
instance Outputable DupFlag where
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs
index c3135de28f..8bb47215a1 100644
--- a/compiler/GHC/Core/Opt/SpecConstr.hs
+++ b/compiler/GHC/Core/Opt/SpecConstr.hs
@@ -753,7 +753,7 @@ Consider this, in (perf/should_run/T9339)
After optimisation, including SpecConstr, we get:
f :: Int# -> Int -> Int
- f x y = case case remInt# x 2# of
+ f x y = case remInt# x 2# of
__DEFAULT -> case x of
__DEFAULT -> f (+# wild_Xp 1#) (I# x)
1000000# -> ...
diff --git a/compiler/GHC/Core/SimpleOpt.hs b/compiler/GHC/Core/SimpleOpt.hs
index 3029737065..b2d67a5fad 100644
--- a/compiler/GHC/Core/SimpleOpt.hs
+++ b/compiler/GHC/Core/SimpleOpt.hs
@@ -958,7 +958,7 @@ unfolding, we would end up with
let a = I#3 in case a of I# y -> ...
because in general, we do this on-the-fly beta-reduction
(\x. e) blah --> let x = blah in e
-and then float the the let. (Substitution would risk duplicating 'blah'.)
+and then float the let. (Substitution would risk duplicating 'blah'.)
But if the case-of-known-constructor doesn't actually fire (i.e.
exprIsConApp_maybe does not return Just) then nothing happens, and nothing
diff --git a/compiler/GHC/Core/Subst.hs b/compiler/GHC/Core/Subst.hs
index 7beb238557..31e503158a 100644
--- a/compiler/GHC/Core/Subst.hs
+++ b/compiler/GHC/Core/Subst.hs
@@ -84,7 +84,7 @@ import Data.List
--
-- 2. Note [Substitutions apply only once] in "GHC.Core.TyCo.Subst"
data Subst
- = Subst InScopeSet -- Variables in in scope (both Ids and TyVars) /after/
+ = Subst InScopeSet -- Variables in scope (both Ids and TyVars) /after/
-- applying the substitution
IdSubstEnv -- Substitution from NcIds to CoreExprs
TvSubstEnv -- Substitution from TyVars to Types
@@ -757,6 +757,6 @@ A worker can get substituted away entirely.
We do not treat an InlWrapper as an 'occurrence' in the occurrence
analyser, so it's possible that the worker is not even in scope any more.
-In all all these cases we simply drop the special case, returning to
+In all these cases we simply drop the special case, returning to
InlVanilla. The WARN is just so I can see if it happens a lot.
-}
diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs
index 8f21523ad0..aa5c3460b0 100644
--- a/compiler/GHC/Core/TyCon.hs
+++ b/compiler/GHC/Core/TyCon.hs
@@ -616,7 +616,7 @@ They fit together like so:
, Bndr (a:k->*) AnonTCB
, Bndr (b:k) AnonTCB ]
- Note that that are three binders here, including the
+ Note that there are three binders here, including the
kind variable k.
* See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep
diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs
index 680ce67bc7..1ab1986d74 100644
--- a/compiler/GHC/Core/Type.hs
+++ b/compiler/GHC/Core/Type.hs
@@ -2458,7 +2458,7 @@ See also
* GHC.Core.Type.occCheckExpand
* GHC.Core.Utils.coreAltsType
* GHC.Tc.Validity.checkEscapingKind
-all of which grapple with with the same problem.
+all of which grapple with the same problem.
See #14939.
-}
diff --git a/compiler/GHC/Data/Bitmap.hs b/compiler/GHC/Data/Bitmap.hs
index 0b7158aa24..5f6444ddc0 100644
--- a/compiler/GHC/Data/Bitmap.hs
+++ b/compiler/GHC/Data/Bitmap.hs
@@ -76,7 +76,7 @@ intsToReverseBitmap platform size = go 0
Note [Strictness when building Bitmaps]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-One of the places where @Bitmap@ is used is in in building Static Reference
+One of the places where @Bitmap@ is used is in building Static Reference
Tables (SRTs) (in @GHC.Cmm.Info.Build.procpointSRT@). In #7450 it was noticed
that some test cases (particularly those whose C-- have large numbers of CAFs)
produced large quantities of allocations from this function.
diff --git a/compiler/GHC/Driver/CodeOutput.hs b/compiler/GHC/Driver/CodeOutput.hs
index 01de8cf982..8d4726baf6 100644
--- a/compiler/GHC/Driver/CodeOutput.hs
+++ b/compiler/GHC/Driver/CodeOutput.hs
@@ -58,7 +58,7 @@ codeOutput :: DynFlags
-> ModLocation
-> ForeignStubs
-> [(ForeignSrcLang, FilePath)]
- -- ^ additional files to be compiled with with the C compiler
+ -- ^ additional files to be compiled with the C compiler
-> [UnitId]
-> Stream IO RawCmmGroup a -- Compiled C--
-> IO (FilePath,
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index 32eb7c4b7c..9bfd3704cd 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -457,7 +457,7 @@ hscTypecheckRename hsc_env mod_summary rdr_module = runHsc hsc_env $
hsc_typecheck True mod_summary (Just rdr_module)
--- | A bunch of logic piled around around @tcRnModule'@, concerning a) backpack
+-- | A bunch of logic piled around @tcRnModule'@, concerning a) backpack
-- b) concerning dumping rename info and hie files. It would be nice to further
-- separate this stuff out, probably in conjunction better separating renaming
-- and type checking (#17781).
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index a9d8d1689b..6fb5fe9c72 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -2218,7 +2218,7 @@ enableCodeGenForTH =
-- the specified target, disable optimization and change the .hi
-- and .o file locations to be temporary files.
--
--- This is used used in order to load code that uses unboxed tuples
+-- This is used in order to load code that uses unboxed tuples
-- or sums into GHCi while still allowing some code to be interpreted.
enableCodeGenForUnboxedTuplesOrSums :: HscTarget
-> NodeMap [Either ErrorMessages ModSummary]
diff --git a/compiler/GHC/Driver/MakeFile.hs b/compiler/GHC/Driver/MakeFile.hs
index ed963ec733..cd1a2d6ffa 100644
--- a/compiler/GHC/Driver/MakeFile.hs
+++ b/compiler/GHC/Driver/MakeFile.hs
@@ -256,7 +256,7 @@ findDependency :: HscEnv
-> ModuleName -- Imported module
-> IsBootInterface -- Source import
-> Bool -- Record dependency on package modules
- -> IO (Maybe FilePath) -- Interface file file
+ -> IO (Maybe FilePath) -- Interface file
findDependency hsc_env srcloc pkg imp is_boot include_pkg_deps
= do { -- Find the module; this will be fast because
-- we've done it once during downsweep
@@ -296,7 +296,7 @@ insertSuffixes
:: FilePath -- Original filename; e.g. "foo.o"
-> [String] -- Suffix prefixes e.g. ["x_", "y_"]
-> [FilePath] -- Zapped filenames e.g. ["foo.x_o", "foo.y_o"]
- -- Note that that the extra bit gets inserted *before* the old suffix
+ -- Note that the extra bit gets inserted *before* the old suffix
-- We assume the old suffix contains no dots, so we know where to
-- split it
insertSuffixes file_name extras
diff --git a/compiler/GHC/Hs/Decls.hs b/compiler/GHC/Hs/Decls.hs
index 543aafc828..c4d457d808 100644
--- a/compiler/GHC/Hs/Decls.hs
+++ b/compiler/GHC/Hs/Decls.hs
@@ -873,7 +873,7 @@ Examples:
NOTE THAT
* A CUSK does /not/ mean that everything about the kind signature is
- fully specified by the user. Look at T4 and f4: we had do do kind
+ fully specified by the user. Look at T4 and f4: we had to do kind
inference to figure out the kind-quantification. But in both cases
(T4 and f4) that inference is done looking /only/ at the header of T4
(or signature for f4), not at the definition thereof.
diff --git a/compiler/GHC/HsToCore/Docs.hs b/compiler/GHC/HsToCore/Docs.hs
index 50f8f87aca..7066405274 100644
--- a/compiler/GHC/HsToCore/Docs.hs
+++ b/compiler/GHC/HsToCore/Docs.hs
@@ -1,4 +1,4 @@
--- | Extract docs from the renamer output so they can be be serialized.
+-- | Extract docs from the renamer output so they can be serialized.
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
diff --git a/compiler/GHC/HsToCore/PmCheck/Oracle.hs b/compiler/GHC/HsToCore/PmCheck/Oracle.hs
index 80a844ad19..7a213ce7ef 100644
--- a/compiler/GHC/HsToCore/PmCheck/Oracle.hs
+++ b/compiler/GHC/HsToCore/PmCheck/Oracle.hs
@@ -199,7 +199,7 @@ that we expect.
-- together as they see fit.
newtype SatisfiabilityCheck = SC (Delta -> DsM (Maybe Delta))
--- | Check the given 'Delta' for satisfiability by the the given
+-- | Check the given 'Delta' for satisfiability by the given
-- 'SatisfiabilityCheck'. Return 'Just' a new, potentially extended, 'Delta' if
-- successful, and 'Nothing' otherwise.
runSatisfiabilityCheck :: Delta -> SatisfiabilityCheck -> DsM (Maybe Delta)
@@ -1604,7 +1604,7 @@ provideEvidence = go
instantiate_cons x ty xs n delta (cl:cls) = do
env <- dsGetFamInstEnvs
case guessConLikeUnivTyArgsFromResTy env ty cl of
- Nothing -> pure [delta] -- No idea idea how to refine this one, so just finish off with a wildcard
+ Nothing -> pure [delta] -- No idea how to refine this one, so just finish off with a wildcard
Just arg_tys -> do
(tvs, arg_vars, new_ty_cs, strict_arg_tys) <- mkOneConFull arg_tys cl
let new_tm_cs = unitBag (TmConCt x (PmAltConLike cl) tvs arg_vars)
diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs
index 92b213a951..ae2e071f7b 100644
--- a/compiler/GHC/HsToCore/Utils.hs
+++ b/compiler/GHC/HsToCore/Utils.hs
@@ -223,7 +223,7 @@ combineMatchResults :: MatchResult CoreExpr -> MatchResult CoreExpr -> MatchResu
combineMatchResults match_result1@(MR_Infallible _) _
= match_result1
combineMatchResults match_result1 match_result2 =
- -- if the first pattern needs a failure handler (i.e. if it is is fallible),
+ -- if the first pattern needs a failure handler (i.e. if it is fallible),
-- make it let-bind it bind it with `shareFailureHandler`.
case shareFailureHandler match_result1 of
MR_Infallible _ -> match_result1
diff --git a/compiler/GHC/Iface/Env.hs b/compiler/GHC/Iface/Env.hs
index cace8ae046..161384821b 100644
--- a/compiler/GHC/Iface/Env.hs
+++ b/compiler/GHC/Iface/Env.hs
@@ -56,7 +56,7 @@ newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name
-- Name for a thing, given its Module and OccName
-- See Note [The Name Cache] in GHC.Types.Name.Cache
--
--- The cache may already already have a binding for this thing,
+-- The cache may already have a binding for this thing,
-- because we may have seen an occurrence before, but now is the
-- moment when we know its Module and SrcLoc in their full glory
diff --git a/compiler/GHC/Iface/Load.hs b/compiler/GHC/Iface/Load.hs
index 1ce0b1d78f..de4ef89283 100644
--- a/compiler/GHC/Iface/Load.hs
+++ b/compiler/GHC/Iface/Load.hs
@@ -486,7 +486,7 @@ loadInterface doc_str mod from
}
; let bad_boot = mi_boot iface == IsBoot && fmap fst (if_rec_types gbl_env) == Just mod
- -- Warn warn against an EPS-updating import
+ -- Warn against an EPS-updating import
-- of one's own boot file! (one-shot only)
-- See Note [Loading your own hi-boot file]
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs
index 5f10815703..58d9dd05af 100644
--- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -303,7 +303,7 @@ pluginRecompileToRecompileRequired old_fp new_fp pr
-- time or when we go from one recompilation strategy to another: (force ->
-- no-force, maybe-recomp -> no-force, no-force -> maybe-recomp etc.)
--
- -- For example when we go from from ForceRecomp to NoForceRecomp
+ -- For example when we go from ForceRecomp to NoForceRecomp
-- recompilation is triggered since the old impure plugins could have
-- changed the build output which is now back to normal.
= RecompBecause "Plugins changed"
diff --git a/compiler/GHC/Iface/Rename.hs b/compiler/GHC/Iface/Rename.hs
index 25f8d19036..ff3604f597 100644
--- a/compiler/GHC/Iface/Rename.hs
+++ b/compiler/GHC/Iface/Rename.hs
@@ -148,7 +148,7 @@ rnDepModules sel deps = do
--
-- However, we MUST NOT do this for regular modules.
-- First, for efficiency reasons, doing this
- -- bloats the the dep_finsts list, because we *already* had
+ -- bloats the dep_finsts list, because we *already* had
-- those modules in the list (it wasn't a hole module, after
-- all). But there's a second, more important correctness
-- consideration: we perform module renaming when running
@@ -158,7 +158,7 @@ rnDepModules sel deps = do
-- --abi-hash is just to get a hash of the on-disk interfaces
-- for this *specific* package. If we go off and tug on the
-- interface for /everything/ in dep_finsts, we're gonna have a
- -- bad time. (It's safe to do do this for hole modules, though,
+ -- bad time. (It's safe to do this for hole modules, though,
-- because the hmap for --abi-hash is always trivial, so the
-- interface we request is local. Though, maybe we ought
-- not to do it in this case either...)
diff --git a/compiler/GHC/Iface/Type.hs b/compiler/GHC/Iface/Type.hs
index 75d4911853..28a628344f 100644
--- a/compiler/GHC/Iface/Type.hs
+++ b/compiler/GHC/Iface/Type.hs
@@ -962,7 +962,7 @@ But if we are printing the type
we do want to turn that (free) r into LiftedRep, so it prints as
(forall a. blah)
-Conclusion: keep track of whether we we are in the kind of a
+Conclusion: keep track of whether we are in the kind of a
binder; only if so, convert free RuntimeRep variables to LiftedRep.
-}
diff --git a/compiler/GHC/Rename/Splice.hs b/compiler/GHC/Rename/Splice.hs
index eaee84119b..48a663952a 100644
--- a/compiler/GHC/Rename/Splice.hs
+++ b/compiler/GHC/Rename/Splice.hs
@@ -867,7 +867,7 @@ A thing can have a bind_lvl of outerLevel, but have an internal name:
foo = [d| op = 3
bop = op + 1 |]
Here the bind_lvl of 'op' is (bogusly) outerLevel, even though it is
-bound inside a bracket. That is because we don't even even record
+bound inside a bracket. That is because we don't even record
binding levels for top-level things; the binding levels are in the
LocalRdrEnv.
diff --git a/compiler/GHC/Stg/Unarise.hs b/compiler/GHC/Stg/Unarise.hs
index aafd28d73b..3f417ae586 100644
--- a/compiler/GHC/Stg/Unarise.hs
+++ b/compiler/GHC/Stg/Unarise.hs
@@ -672,7 +672,7 @@ unariseArgBinder is_con_arg rho x =
--
-- While not unarising the binder in this case does not break any programs
-- (because it unarises to a single variable), it triggers StgLint as we
- -- break the the post-unarisation invariant that says unboxed tuple/sum
+ -- break the post-unarisation invariant that says unboxed tuple/sum
-- binders should vanish. See Note [Post-unarisation invariants].
| isUnboxedSumType (idType x) || isUnboxedTupleType (idType x)
-> do x' <- mkId (mkFastString "us") (primRepToType rep)
diff --git a/compiler/GHC/StgToCmm/DataCon.hs b/compiler/GHC/StgToCmm/DataCon.hs
index d319ca7d17..30eeb25ab8 100644
--- a/compiler/GHC/StgToCmm/DataCon.hs
+++ b/compiler/GHC/StgToCmm/DataCon.hs
@@ -4,7 +4,7 @@
--
-- Stg to C--: code generation for constructors
--
--- This module provides the support code for StgToCmm to deal with with
+-- This module provides the support code for StgToCmm to deal with
-- constructors on the RHSs of let(rec)s.
--
-- (c) The University of Glasgow 2004-2006
diff --git a/compiler/GHC/StgToCmm/Expr.hs b/compiler/GHC/StgToCmm/Expr.hs
index 0ff9db404c..6b4bddca33 100644
--- a/compiler/GHC/StgToCmm/Expr.hs
+++ b/compiler/GHC/StgToCmm/Expr.hs
@@ -464,7 +464,7 @@ Note [Compiling case expressions]. However, after eliminating the
tagToEnum# (#13397) we will have:
case (a>b) of ...
Rather than make it behave quite differently, I am testing for a
-comparison operator here in in the general case as well.
+comparison operator here in the general case as well.
ToDo: figure out what the Right Rule should be.
diff --git a/compiler/GHC/StgToCmm/ExtCode.hs b/compiler/GHC/StgToCmm/ExtCode.hs
index e0b20021b3..987df399af 100644
--- a/compiler/GHC/StgToCmm/ExtCode.hs
+++ b/compiler/GHC/StgToCmm/ExtCode.hs
@@ -162,7 +162,7 @@ newLabel name = do
addLabel name (mkBlockId u)
return (mkBlockId u)
--- | Add add a local function to the environment.
+-- | Add a local function to the environment.
newFunctionName
:: FastString -- ^ name of the function
-> UnitId -- ^ package of the current module
diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs
index 38c5327570..5aa7566846 100644
--- a/compiler/GHC/StgToCmm/Prim.hs
+++ b/compiler/GHC/StgToCmm/Prim.hs
@@ -2155,7 +2155,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
--- measurements is the only only way to validate that.
+-- measurements is the 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/GHC/StgToCmm/Types.hs b/compiler/GHC/StgToCmm/Types.hs
index 6d54cdfdaa..e59792cb57 100644
--- a/compiler/GHC/StgToCmm/Types.hs
+++ b/compiler/GHC/StgToCmm/Types.hs
@@ -58,7 +58,7 @@ moving parts are:
* We record the CgInfo in the IdInfo of the Id.
* GHC.Driver.Pipeline: the call to updateModDetailsIdInfos augments the
- ModDetails constructed at the end of the Core pipeline, with with CgInfo
+ ModDetails constructed at the end of the Core pipeline, with CgInfo
gleaned from the back end. The hard work is done in GHC.Iface.UpdateIdInfos.
* For ModIface we generate the final ModIface with CgInfo in
diff --git a/compiler/GHC/Tc/Deriv/Utils.hs b/compiler/GHC/Tc/Deriv/Utils.hs
index 5f109fd148..b17cbb14b9 100644
--- a/compiler/GHC/Tc/Deriv/Utils.hs
+++ b/compiler/GHC/Tc/Deriv/Utils.hs
@@ -100,7 +100,7 @@ data DerivEnv = DerivEnv
, denv_cls :: Class
-- ^ Class for which we need to derive an instance
, denv_inst_tys :: [Type]
- -- ^ All arguments to to 'denv_cls' in the derived instance.
+ -- ^ All arguments to 'denv_cls' in the derived instance.
, denv_ctxt :: DerivContext
-- ^ @'SupplyContext' theta@ for standalone deriving (where @theta@ is the
-- context of the instance).
diff --git a/compiler/GHC/Tc/Errors/Hole.hs b/compiler/GHC/Tc/Errors/Hole.hs
index ebfe1e3003..25c7e8839a 100644
--- a/compiler/GHC/Tc/Errors/Hole.hs
+++ b/compiler/GHC/Tc/Errors/Hole.hs
@@ -111,7 +111,7 @@ The hole in `f` would generate the message:
(and originally defined in ‘GHC.Base’))
Valid hole fits are found by checking top level identifiers and local bindings
-in scope for whether their type can be instantiated to the the type of the hole.
+in scope for whether their type can be instantiated to the type of the hole.
Additionally, we also need to check whether all relevant constraints are solved
by choosing an identifier of that type as well, see Note [Relevant constraints]
@@ -122,10 +122,10 @@ This is to avoid affecting the hole and later checks by prematurely having
unified one of the free unification variables.
When outputting, we sort the hole fits by the size of the types we'd need to
-apply by type application to the type of the fit to to make it fit. This is done
+apply by type application to the type of the fit to make it fit. This is done
in order to display "more relevant" suggestions first. Another option is to
sort by building a subsumption graph of fits, i.e. a graph of which fits subsume
-what other fits, and then outputting those fits which are are subsumed by other
+what other fits, and then outputting those fits which are subsumed by other
fits (i.e. those more specific than other fits) first. This results in the ones
"closest" to the type of the hole to be displayed first.
@@ -600,7 +600,7 @@ findValidHoleFits tidy_env implics simples h@(Hole { hole_sort = ExprHole _
; return (tidy_env, vMsg $$ refMsg) }
where
-- We extract the type, the tcLevel and the types free variables
- -- from from the constraint.
+ -- from the constraint.
hole_fvs :: FV
hole_fvs = tyCoFVsOfType hole_ty
hole_lvl = ctLocLevel ct_loc
diff --git a/compiler/GHC/Tc/Gen/Bind.hs b/compiler/GHC/Tc/Gen/Bind.hs
index 0a393bf30b..1944c61af5 100644
--- a/compiler/GHC/Tc/Gen/Bind.hs
+++ b/compiler/GHC/Tc/Gen/Bind.hs
@@ -215,7 +215,7 @@ tcTopBinds binds sigs
-- a fixed return type must agree with this.
--
-- The fields of `Fixed` cache the first conlike and its return type so
--- that that we can compare all the other conlikes to it. The conlike is
+-- that we can compare all the other conlikes to it. The conlike is
-- stored for error messages.
--
-- `Nothing` in the case that the type is fixed by a type signature
@@ -1609,7 +1609,7 @@ We typecheck pattern bindings as follows. First tcLhs does this:
generalisation step will do the checking and impedance matching
against the signature.
- - If for some some reason we are not generalising (plan = NoGen), the
+ - If for some reason we are not generalising (plan = NoGen), the
LetBndrSpec will be LetGblBndr. In that case we must bind the
global version of the Id, and do so with precisely the type given
in the signature. (Then we unify with the type from the pattern
diff --git a/compiler/GHC/Tc/Gen/Expr.hs b/compiler/GHC/Tc/Gen/Expr.hs
index d970b3e0b2..eaf3a3db0c 100644
--- a/compiler/GHC/Tc/Gen/Expr.hs
+++ b/compiler/GHC/Tc/Gen/Expr.hs
@@ -2147,7 +2147,7 @@ tcTagToEnum expr fun args app_res_ty res_ty
checkThLocalId :: Id -> TcM ()
-- The renamer has already done checkWellStaged,
-- in 'GHC.Rename.Splice.checkThLocalName', so don't repeat that here.
--- Here we just just add constraints fro cross-stage lifting
+-- Here we just add constraints fro cross-stage lifting
checkThLocalId id
= do { mb_local_use <- getStageAndBindLevel (idName id)
; case mb_local_use of
diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs
index 22edf3c0b4..0d1bc6cceb 100644
--- a/compiler/GHC/Tc/Gen/HsType.hs
+++ b/compiler/GHC/Tc/Gen/HsType.hs
@@ -3721,7 +3721,7 @@ Consider
Here
* The pattern (MkT p1 p2) creates a *skolem* type variable 'a_sk',
- It must be a skolem so that that it retains its identity, and
+ It must be a skolem so that it retains its identity, and
GHC.Tc.Errors.getSkolemInfo can thereby find the binding site for the skolem.
* The type signature pattern (f :: b -> c) makes freshs meta-tyvars
diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs
index 7f60860888..8327b39e6d 100644
--- a/compiler/GHC/Tc/Solver.hs
+++ b/compiler/GHC/Tc/Solver.hs
@@ -435,7 +435,7 @@ than just accumulate an error message, for two reasons:
* More seriously, we don't have a convenient term-level place to add
deferred bindings for unsolved kind-equality constraints, so we
don't build evidence bindings (by usine reportAllUnsolved). That
- means that we'll be left with with a type that has coercion holes
+ means that we'll be left with a type that has coercion holes
in it, something like
<type> |> co-hole
where co-hole is not filled in. Eeek! That un-filled-in
@@ -2268,7 +2268,7 @@ the top-level simple constraints are plausible, but we also float constraints
out from inside, if they are not captured by skolems.
The same function is used when doing type-class defaulting (see the call
-to applyDefaultingRules) to extract constraints that that might be defaulted.
+to applyDefaultingRules) to extract constraints that might be defaulted.
There is one caveat:
diff --git a/compiler/GHC/Tc/Solver/Monad.hs b/compiler/GHC/Tc/Solver/Monad.hs
index 3500ef4bbe..3c783b0137 100644
--- a/compiler/GHC/Tc/Solver/Monad.hs
+++ b/compiler/GHC/Tc/Solver/Monad.hs
@@ -2313,7 +2313,7 @@ very same implication" as the equuality constraint.
MkS -> [y,z])
in ...
-From the type signature for `g`, we get `y::a` . Then when when we
+From the type signature for `g`, we get `y::a` . Then when we
encounter the `\z`, we'll assign `z :: alpha[1]`, say. Next, from the
body of the lambda we'll get
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index 5970147580..efdb1bdfd0 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -236,7 +236,7 @@ tcTyClDecls tyclds kisig_env role_annots
tcExtendRecEnv (zipRecTyClss tc_tycons rec_tyclss) $
-- Also extend the local type envt with bindings giving
- -- a TcTyCon for each each knot-tied TyCon or Class
+ -- a TcTyCon for each knot-tied TyCon or Class
-- See Note [Type checking recursive type and class declarations]
-- and Note [Type environment evolution]
tcExtendKindEnvWithTyCons tc_tycons $
@@ -2937,7 +2937,7 @@ unravelFamInstPats fam_app
addConsistencyConstraints :: AssocInstInfo -> TcType -> TcM ()
-- In the corresponding positions of the class and type-family,
--- ensure the the family argument is the same as the class argument
+-- ensure the family argument is the same as the class argument
-- E.g class C a b c d where
-- F c x y a :: Type
-- Here the first arg of F should be the same as the third of C
@@ -4191,7 +4191,7 @@ checkValidClass cls
-- default-method Name to be that of the generic
-- default type signature
- -- First, we check that that the method's default type signature
+ -- First, we check that the method's default type signature
-- aligns with the non-default type signature.
-- See Note [Default method type signatures must align]
let cls_pred = mkClassPred cls $ mkTyVarTys $ classTyVars cls
diff --git a/compiler/GHC/Tc/Types.hs b/compiler/GHC/Tc/Types.hs
index 2fb1a03db0..ce2e5faead 100644
--- a/compiler/GHC/Tc/Types.hs
+++ b/compiler/GHC/Tc/Types.hs
@@ -715,7 +715,7 @@ We gather three sorts of usage information
The tcg_keep field is used in two distinct ways:
* Desugar.addExportFlagsAndRules. Where things like (a-c) are locally
- defined, we should give them an an Exported flag, so that the
+ defined, we should give them an Exported flag, so that the
simplifier does not discard them as dead code, and so that they are
exposed in the interface file (but not to export to the user).
diff --git a/compiler/GHC/Tc/Utils/Env.hs b/compiler/GHC/Tc/Utils/Env.hs
index eebe9eb8ed..e8640a08dc 100644
--- a/compiler/GHC/Tc/Utils/Env.hs
+++ b/compiler/GHC/Tc/Utils/Env.hs
@@ -138,7 +138,7 @@ lookupGlobal hsc_env name
}
lookupGlobal_maybe :: HscEnv -> Name -> IO (MaybeErr MsgDoc TyThing)
--- This may look up an Id that one one has previously looked up.
+-- This may look up an Id that one has previously looked up.
-- If so, we are going to read its interface file, and add its bindings
-- to the ExternalPackageTable.
lookupGlobal_maybe hsc_env name
diff --git a/compiler/GHC/Tc/Validity.hs b/compiler/GHC/Tc/Validity.hs
index c9eec9838f..080132c080 100644
--- a/compiler/GHC/Tc/Validity.hs
+++ b/compiler/GHC/Tc/Validity.hs
@@ -122,7 +122,7 @@ Consider
You would think that the definition of g would surely typecheck!
After all f has exactly the same type, and g=f. But in fact f's type
is instantiated and the instantiated constraints are solved against
-the originals, so in the case an ambiguous type it won't work.
+the originals, so in the case of an ambiguous type it won't work.
Consider our earlier example f :: C a => Int. Then in g's definition,
we'll instantiate to (C alpha) and try to deduce (C alpha) from (C a),
and fail.
diff --git a/compiler/GHC/Types/Basic.hs b/compiler/GHC/Types/Basic.hs
index 12d54987f5..cf373f76d5 100644
--- a/compiler/GHC/Types/Basic.hs
+++ b/compiler/GHC/Types/Basic.hs
@@ -254,7 +254,7 @@ work. For example, consider
(\x{one-shot}. case t of { True -> ...; False -> ... })
Because it's a one-shot lambda, we can safely inline t, giving
- (\x{one_shot}. case <expensive> of of
+ (\x{one_shot}. case <expensive> of
{ True -> ...; False -> ... })
Moving parts:
@@ -744,7 +744,7 @@ data OverlapMode -- See Note [Rules for instance lookup] in GHC.Core.InstEnv
| Incoherent SourceText
-- See Note [Pragma source text]
-- ^ Behave like Overlappable and Overlapping, and in addition pick
- -- an an arbitrary one if there are multiple matching candidates, and
+ -- an arbitrary one if there are multiple matching candidates, and
-- don't worry about later instantiation
--
-- Example: constraint (Foo [b])
diff --git a/compiler/GHC/Types/Id/Info.hs b/compiler/GHC/Types/Id/Info.hs
index b18c634099..dfd6ef96ab 100644
--- a/compiler/GHC/Types/Id/Info.hs
+++ b/compiler/GHC/Types/Id/Info.hs
@@ -556,7 +556,7 @@ ruleInfoFreeVars (RuleInfo _ fvs) = fvs
ruleInfoRules :: RuleInfo -> [CoreRule]
ruleInfoRules (RuleInfo rules _) = rules
--- | Change the name of the function the rule is keyed on on all of the 'CoreRule's
+-- | Change the name of the function the rule is keyed on all of the 'CoreRule's
setRuleInfoHead :: Name -> RuleInfo -> RuleInfo
setRuleInfoHead fn (RuleInfo rules fvs)
= RuleInfo (map (setRuleIdName fn) rules) fvs
diff --git a/compiler/GHC/Types/Literal.hs b/compiler/GHC/Types/Literal.hs
index 6f2914a4ec..55f2ffaca6 100644
--- a/compiler/GHC/Types/Literal.hs
+++ b/compiler/GHC/Types/Literal.hs
@@ -99,7 +99,7 @@ import Numeric ( fromRat )
-- declaration ('LitLabel')
--
-- * A 'LitRubbish' to be used in place of values of 'UnliftedRep'
--- (i.e. 'MutVar#') when the the value is never used.
+-- (i.e. 'MutVar#') when the value is never used.
--
-- * A character
-- * A string
diff --git a/compiler/GHC/Types/RepType.hs b/compiler/GHC/Types/RepType.hs
index 73f35f33cc..6ab4387f38 100644
--- a/compiler/GHC/Types/RepType.hs
+++ b/compiler/GHC/Types/RepType.hs
@@ -367,7 +367,7 @@ It's all in 1-1 correspondence with PrimRep except for TupleRep and SumRep,
which describe unboxed products and sums respectively. RuntimeRep is defined
in the library ghc-prim:GHC.Types. It is also "wired-in" to GHC: see
GHC.Builtin.Types.runtimeRepTyCon. The unarisation pass, in GHC.Stg.Unarise, transforms the
-program, so that that every variable has a type that has a PrimRep. For
+program, so that every variable has a type that has a PrimRep. For
example, unarisation transforms our utup function above, to take two Int
arguments instead of one (# Int, Int #) argument.
@@ -392,7 +392,7 @@ Note [Getting from RuntimeRep to PrimRep]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
General info on RuntimeRep and PrimRep is in Note [RuntimeRep and PrimRep].
-How do we get from an Id to the the list or PrimReps used to store it? We get
+How do we get from an Id to the list or PrimReps used to store it? We get
the Id's type ty (using idType), then ty's kind ki (using typeKind), then
pattern-match on ki to extract rep (in kindPrimRep), then extract the PrimRep
from the RuntimeRep (in runtimeRepPrimRep).
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs
index 5413990b81..6bc073fc27 100644
--- a/compiler/GHC/Unit/State.hs
+++ b/compiler/GHC/Unit/State.hs
@@ -379,7 +379,7 @@ initUnitConfig dflags =
}
--- | Map from 'ModuleName' to a set of of module providers (i.e. a 'Module' and
+-- | Map from 'ModuleName' to a set of module providers (i.e. a 'Module' and
-- its 'ModuleOrigin').
--
-- NB: the set is in fact a 'Map Module ModuleOrigin', probably to keep only one