Commit 68530b1c authored by Jan Hrček's avatar Jan Hrček Committed by Marge Bot

Fix duplicated words and typos in comments and user guide

parent 42f797b0
Pipeline #21596 passed with stages
in 1124 minutes and 19 seconds
......@@ -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:
......
......@@ -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.
......
......@@ -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.)
......
......@@ -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
......
......@@ -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
......
-----------------------------------------------------------------------------
-- 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',
......
......@@ -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.
......
......@@ -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
......
......@@ -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).
--
......
......@@ -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]
......
......@@ -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} = ...
......
......@@ -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.
-}
......
......@@ -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.
......
......@@ -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...
......
......@@ -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)....
......
......@@ -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
......
......@@ -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# -> ...
......
......@@ -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
......
......@@ -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.
-}
......@@ -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
......
......@@ -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.
-}
......
......@@ -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.
......
......@@ -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,
......
......@@ -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).
......
......@@ -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]
......
......@@ -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
......
......@@ -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.
......
-- | 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 #-}
......
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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]
......
......@@ -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"
......
......@@ -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...)
......
......@@ -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.
-}
......
......@@ -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.
......
......@@ -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)
......
......@@ -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
......
......@@ -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.
......
......@@ -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
......
......@@ -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 ...
......
......@@ -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
......
......@@ -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).
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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:
......
......@@ -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
......
......@@ -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
......
......@@ -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).
......
......@@ -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
......
......@@ -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.
......
......@@ -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])
......
......@@ -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
......
......@@ -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
......
......@@ -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).
......
......@@ -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
......
......@@ -40,7 +40,7 @@
%% \end{prootree} at the outer level (however this will not work for the inner
%% levels, but in any case why would you want to be so verbose?).
%%
%% All of of the keywords except \prooftree and \endprooftree are optional
%% All of the keywords except \prooftree and \endprooftree are optional
%% and may appear in any order. They may also be combined in \newcommand's
%% eg "\def\Cut{\using\sf cut\thickness.08em\justifies}" with the abbreviation
%% "\prooftree hyp1 hyp2 \Cut \concl \endprooftree". This is recommended and
......
......@@ -194,7 +194,7 @@ Thread and scheduling events
:field ThreadId: thread id
:field CapNo: other capability
The indicated thread has been been woken up on another capability.
The indicated thread has been woken up on another capability.
.. event-type:: THREAD_LABEL
......
......@@ -13,7 +13,7 @@ Ambiguous types and the ambiguity check
an unusable binding.
Each user-written type signature is subjected to an *ambiguity check*.
The ambiguity check rejects functions that can never be called; for
The ambiguity check rejects functions that can never be called. For
example: ::
f :: C a => Int
......@@ -80,7 +80,7 @@ typecheck. We use a very similar test for *inferred* types, to ensure
that they too are unambiguous.
*Switching off the ambiguity check.* Even if a function has an