Commit 3748ba3a authored by Brian Wignall's avatar Brian Wignall Committed by Marge Bot

Fix typos, using Wikipedia list of common typos

parent 5f84b52a
Pipeline #13270 passed with stages
in 494 minutes and 53 seconds
......@@ -407,7 +407,7 @@ where 'BIND' binds the monomorphic Ids 'fm' and 'gm', means
gp = ...same again, with gm instead of fm
The 'fwrap' is an impedence-matcher that typically does nothing; see
The 'fwrap' is an impedance-matcher that typically does nothing; see
Note [ABExport wrapper].
This is a pretty bad translation, because it duplicates all the bindings.
......
......@@ -947,7 +947,7 @@ Main functions are:
* pmCheck :: PatVec -> [PatVec] -> ValVec -> Delta -> DsM PartialResult
This function implements functions `covered`, `uncovered` and
`divergent` from the paper at once. Calls out to the auxilary function
`divergent` from the paper at once. Calls out to the auxiliary function
`pmCheckGuards` for handling (possibly multiple) guarded RHSs when the whole
clause is checked. Slightly different from the paper because it does not even
produce the covered and uncovered sets. Since we only care about whether a
......
......@@ -180,7 +180,7 @@ cgBind (StgRec pairs)
3. emit all the inits, and then all the bodies
We'd rather not have separate functions to do steps 1 and 2 for
each binding, since in pratice they share a lot of code. So we
each binding, since in practice they share a lot of code. So we
have just one function, cgRhs, that returns a pair of the CgIdInfo
for step 1, and a monadic computation to generate the code in step
2.
......
......@@ -328,14 +328,14 @@ ldvEnterClosure :: ClosureInfo -> CmmReg -> FCode ()
ldvEnterClosure closure_info node_reg = do
dflags <- getDynFlags
let tag = funTag dflags closure_info
-- don't forget to substract node's tag
-- don't forget to subtract node's tag
ldvEnter (cmmOffsetB dflags (CmmReg node_reg) (-tag))
ldvEnter :: CmmExpr -> FCode ()
-- Argument is a closure pointer
ldvEnter cl_ptr = do
dflags <- getDynFlags
let -- don't forget to substract node's tag
let -- don't forget to subtract node's tag
ldv_wd = ldvWord dflags cl_ptr
new_ldv_wd = cmmOrWord dflags (cmmAndWord dflags (CmmLoad ldv_wd (bWord dflags))
(CmmLit (mkWordCLit dflags (iLDV_CREATE_MASK dflags))))
......
......@@ -1059,7 +1059,7 @@ cvt_tup es boxity = do { let cvtl_maybe Nothing = return missingTupArg
(map noLoc es')
boxity }
{- Note [Operator assocation]
{- Note [Operator association]
We must be quite careful about adding parens:
* Infix (UInfix ...) op arg Needs parens round the first arg
* Infix (Infix ...) op arg Needs parens round the first arg
......
......@@ -618,7 +618,7 @@ useCount _ = Many
* *
************************************************************************
This domain differst from JointDemand in the sence that pure absence
This domain differst from JointDemand in the sense that pure absence
is taken away, i.e., we deal *only* with non-absent demands.
Note [Strict demands]
......
......@@ -402,7 +402,7 @@ But we don't do that for instance declarations and so we just treat
them all uniformly.
The EXCEPTION is PrimOpIds, which do have rules in their IdInfo. That is
jsut for convenience really.
just for convenience really.
However, LocalIds may have non-empty RuleInfo. We treat them
differently because:
......
......@@ -180,7 +180,7 @@ They only get converted into real Core,
during the CorePrep phase, although TidyPgm looks ahead at what the
core will be, so that it can see whether it involves CAFs.
When we initally build an Integer literal, notably when
When we initially build an Integer literal, notably when
deserialising it from an interface file (see the Binary instance
below), we don't have convenient access to the mkInteger Id. So we
just use an error thunk, and fill in the real Id when we do tcIfaceLit
......
......@@ -348,7 +348,7 @@ data ForeignLabelSource
-- external packages. It is safe to treat the RTS package as "external".
| ForeignLabelInExternalPackage
-- | Label is in the package currenly being compiled.
-- | Label is in the package currently being compiled.
-- This is only used for creating hacky tmp labels during code generation.
-- Don't use it in any code that might be inlined across a package boundary
-- (ie, core code) else the information will be wrong relative to the
......
......@@ -669,7 +669,7 @@ scopeUniques (SubScope u _) = [u]
scopeUniques (CombinedScope s1 s2) = scopeUniques s1 ++ scopeUniques s2
-- Equality and order is based on the head uniques defined above. We
-- take care to short-cut the (extremly) common cases.
-- take care to short-cut the (extremely) common cases.
instance Eq CmmTickScope where
GlobalScope == GlobalScope = True
GlobalScope == _ = False
......
......@@ -574,7 +574,7 @@ importName
:: { (FastString, CLabel) }
-- A label imported without an explicit packageId.
-- These are taken to come frome some foreign, unnamed package.
-- These are taken to come from some foreign, unnamed package.
: NAME
{ ($1, mkForeignLabel $1 Nothing ForeignLabelInExternalPackage IsFunction) }
......
......@@ -542,7 +542,7 @@ A program has the Let-Unfoldings property iff:
- For every let-bound variable f, whether top-level or nested, whether
recursive or not:
- Both the binding Id of f, and every occurence Id of f, has an idUnfolding.
- Both the binding Id of f, and every occurrence Id of f, has an idUnfolding.
- For non-INLINE things, that unfolding will be f's right hand sids
- For INLINE things (which have a "stable" unfolding) that unfolding is
semantically equivalent to f's RHS, but derived from the original RHS of f
......@@ -1226,11 +1226,11 @@ Here we implement the "push rules" from FC papers:
(fun |> co) arg
and we want to transform it to
(fun arg') |> co'
for some suitable co' and tranformed arg'.
for some suitable co' and transformed arg'.
* The PushK rule for data constructors. We have
(K e1 .. en) |> co
and we want to tranform to
and we want to transform to
(K e1' .. en')
by pushing the coercion into the arguments
-}
......
......@@ -1227,7 +1227,7 @@ notOrphan _ = False
chooseOrphanAnchor :: NameSet -> IsOrphan
-- Something (rule, instance) is relate to all the Names in this
-- list. Choose one of them to be an "anchor" for the orphan. We make
-- the choice deterministic to avoid gratuitious changes in the ABI
-- the choice deterministic to avoid gratuitous changes in the ABI
-- hash (#4012). Specifically, use lexicographic comparison of
-- OccName rather than comparing Uniques
--
......@@ -1559,7 +1559,7 @@ data UnfoldingGuidance
ug_size :: Int, -- The "size" of the unfolding.
ug_res :: Int -- Scrutinee discount: the discount to substract if the thing is in
ug_res :: Int -- Scrutinee discount: the discount to subtract if the thing is in
} -- a context (case (thing args) of ...),
-- (where there are the right number of arguments.)
......
......@@ -528,7 +528,7 @@ In the above example, suppose we had
{-# RULES "rule-for-g" forally. g [y] = ... #-}
Then "rule-for-f" and "rule-for-g" would compete. Better to add phase
control, so "rule-for-f" has a chance to fire before "rule-for-g" becomes
active; or perhpas after "rule-for-g" has become inactive. This is checked
active; or perhaps after "rule-for-g" has become inactive. This is checked
by 'competesWith'
Class methods have a built-in RULE to select the method from the dictionary,
......
......@@ -279,7 +279,7 @@ in repTyClD and repC.
Note [Don't quantify implicit type variables in quotes]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you're not careful, it's suprisingly easy to take this quoted declaration:
If you're not careful, it's surprisingly easy to take this quoted declaration:
[d| idProxy :: forall proxy (b :: k). proxy b -> proxy b
idProxy x = x
......@@ -1404,7 +1404,7 @@ repE e@(HsTickPragma {}) = notHandled "Tick Pragma" (ppr e)
repE e = notHandled "Expression form" (ppr e)
-----------------------------------------------------------------------------
-- Building representations of auxillary structures like Match, Clause, Stmt,
-- Building representations of auxiliary structures like Match, Clause, Stmt,
repMatchTup :: LMatch GhcRn (LHsExpr GhcRn) -> DsM (Core TH.MatchQ)
repMatchTup (dL->L _ (Match { m_pats = [p]
......@@ -1481,7 +1481,7 @@ repUpdFields = repList fieldExpQTyConName rep_fld
-- shadow each other. Consider: [| do { x <- f 1; x <- f x; g x } |]
-- First gensym new names for every variable in any of the patterns.
-- both static (x'1 and x'2), and dynamic ((gensym "x") and (gensym "y"))
-- if variables didn't shaddow, the static gensym wouldn't be necessary
-- if variables didn't shadow, the static gensym wouldn't be necessary
-- and we could reuse the original names (x and x).
--
-- do { x'1 <- gensym "x"
......
......@@ -530,7 +530,7 @@ dsExtendMetaEnv menv thing_inside
discardWarningsDs :: DsM a -> DsM a
-- Ignore warnings inside the thing inside;
-- used to ignore inaccessable cases etc. inside generated code
-- used to ignore inaccessible cases etc. inside generated code
discardWarningsDs thing_inside
= do { env <- getGblEnv
; old_msgs <- readTcRef (ds_msgs env)
......
......@@ -402,7 +402,7 @@ bar (x :: forall a. a -> a) = ... -- a is not in scope here
bax (x :: a) = ... -- a is in scope here
Because of HsWC and HsIB pass on their scope to their children
we must wrap the LHsType in pattern signatures in a
Shielded explictly, so that the HsWC/HsIB scope is not passed
Shielded explicitly, so that the HsWC/HsIB scope is not passed
on the the LHsType
-}
......
......@@ -117,7 +117,7 @@ writeHieFile hie_file_path hiefile = do
symtab_p_p <- tellBin bh0
put_ bh0 symtab_p_p
-- Make some intial state
-- Make some initial state
symtab_next <- newFastMutInt
writeFastMutInt symtab_next 0
symtab_map <- newIORef emptyUFM
......
......@@ -885,7 +885,7 @@ ppr_ty ctxt_prec (IfaceCoercionTy co)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RuntimeRep variables are considered by many (most?) users to be little
more than syntactic noise. When the notion was introduced there was a
signficant and understandable push-back from those with pedagogy in
significant and understandable push-back from those with pedagogy in
mind, which argued that RuntimeRep variables would throw a wrench into
nearly any teach approach since they appear in even the lowly ($)
function's type,
......
......@@ -549,7 +549,7 @@ But there is a HORRIBLE HACK here.
* And that means we end up loading M.hi-boot, because those
data types are not yet in the type environment.
But in this wierd case, /all/ we need is the types. We don't need
But in this weird case, /all/ we need is the types. We don't need
instances, rules etc. And if we put the instances in the EPS
we get "duplicate instance" warnings when we compile the "real"
instance in M itself. Hence the strange business of just updateing
......
......@@ -879,7 +879,7 @@ the whole thing with 'withTiming'. Instead we wrap the processing of each
individual stream element, all along the codegen pipeline, using the appropriate
label for the pass to which this processing belongs. That generates a lot more
data but allows us to get fine-grained timings about all the passes and we can
easily compute totals withh tools like ghc-events-analyze (see below).
easily compute totals with tools like ghc-events-analyze (see below).
Producing an eventlog for GHC
......
......@@ -730,7 +730,7 @@ findPartiallyCompletedCycles modsDone theGraph
--
-- | Unloading
unload :: HscEnv -> [Linkable] -> IO ()
unload hsc_env stable_linkables -- Unload everthing *except* 'stable_linkables'
unload hsc_env stable_linkables -- Unload everything *except* 'stable_linkables'
= case ghcLink (hsc_dflags hsc_env) of
LinkInMemory -> Linker.unload hsc_env stable_linkables
_other -> return ()
......
......@@ -2135,7 +2135,7 @@ isDllName dflags this_mod name
-- On Windows the hack for #8696 makes it unlinkable.
-- As the entire setup of the code from Cmm down to the RTS expects
-- the use of trampolines for the imported functions only when
-- doing intra-package linking, e.g. refering to a symbol defined in the same
-- doing intra-package linking, e.g. referring to a symbol defined in the same
-- package should not use a trampoline.
-- I much rather have dynamic TH not supported than the entire Dynamic linking
-- not due to a hack.
......
......@@ -1280,7 +1280,7 @@ So we have to *predict* the result here, which is revolting.
In particular CorePrep expands Integer and Natural literals. So in the
prediction code here we resort to applying the same expansion (cvt_literal).
There are also numberous other ways in which we can introduce inconsistencies
There are also numerous other ways in which we can introduce inconsistencies
between CorePrep and TidyPgm. See Note [CAFfyness inconsistencies due to eta
expansion in TidyPgm] for one such example.
......
......@@ -9,7 +9,7 @@ import Fingerprint
-- | Settings for other executables GHC calls.
--
-- Probably should futher split down by phase, or split between
-- Probably should further split down by phase, or split between
-- platform-specific and platform-agnostic.
data ToolSettings = ToolSettings
{ toolSettings_ldSupportsCompactUnwind :: Bool
......
......@@ -79,7 +79,7 @@ import Control.Monad (foldM)
Edge weights not only represent likelyhood of control transfer between blocks
but also how much a block would benefit from being placed sequentially after
it's predecessor.
For example blocks which are preceeded by an info table are more likely to end
For example blocks which are preceded by an info table are more likely to end
up in a different cache line than their predecessor and we can't eliminate the jump
so there is less benefit to placing them sequentially.
......
......@@ -3,7 +3,7 @@
--
-- TODO: Signed vs unsigned?
--
-- TODO: This module is currenly shared by all architectures because
-- TODO: This module is currently shared by all architectures because
-- NCGMonad need to know about it to make a VReg. It would be better
-- to have architecture specific formats, and do the overloading
-- properly. eg SPARC doesn't care about FF80.
......
......@@ -420,7 +420,7 @@ picRelative dflags arch OSDarwin lbl
-- On AIX we use an indirect local TOC anchored by 'gotLabel'.
-- This way we use up only one global TOC entry per compilation-unit
-- (this is quite similiar to GCC's @-mminimal-toc@ compilation mode)
-- (this is quite similar to GCC's @-mminimal-toc@ compilation mode)
picRelative dflags _ OSAIX lbl
= CmmLabelDiffOff lbl gotLabel 0 (wordWidth dflags)
......@@ -623,7 +623,7 @@ pprImportedSymbol _ (Platform { platformMini = PlatformMini { platformMini_os =
-- XCOFF / AIX
--
-- Similiar to PPC64 ELF v1, there's dedicated TOC register (r2). To
-- Similar to PPC64 ELF v1, there's dedicated TOC register (r2). To
-- workaround the limitation of a global TOC we use an indirect TOC
-- with the label `ghc_toc_table`.
--
......
......@@ -1690,7 +1690,7 @@ genCCall' dflags gcp target dest_regs args
`appOL` codeAfter)
GCPAIX -> return ( dynCode
-- AIX/XCOFF follows the PowerOPEN ABI
-- which is quite similiar to LinuxPPC64/ELFv1
-- which is quite similar to LinuxPPC64/ELFv1
`appOL` codeBefore
`snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 20))
`snocOL` LD II32 r11 (AddrRegImm dynReg (ImmInt 0))
......
......@@ -297,7 +297,7 @@ patchInstr
patchInstr reg instr
= do nUnique <- newUnique
-- The register we're rewriting is suppoed to be virtual.
-- The register we're rewriting is supposed to be virtual.
-- If it's not then something has gone horribly wrong.
let nReg
= case reg of
......
......@@ -297,7 +297,7 @@ nodeDegree classOfVirtualReg graph reg
-- | Show a spill cost record, including the degree from the graph
-- and final calulated spill cost.
-- and final calculated spill cost.
pprSpillCostRecord
:: (VirtualReg -> RegClass)
-> (Reg -> SDoc)
......
......@@ -12,7 +12,7 @@ import Unique
-- | The class of a register.
-- Used in the register allocator.
-- We treat all registers in a class as being interchangable.
-- We treat all registers in a class as being interchangeable.
--
data RegClass
= RcInteger
......
......@@ -51,7 +51,7 @@ expandBlockInstrs (ii:is)
-- | In the SPARC instruction set the FP register pairs that are used
-- to hold 64 bit floats are refered to by just the first reg
-- to hold 64 bit floats are referred to by just the first reg
-- of the pair. Remap our internal reg pairs to the appropriate reg.
--
-- For example:
......
......@@ -816,7 +816,7 @@ x86_mkJumpInstr id
-- | |
-- +-------------------+
--
-- In essense each allocation larger than a page size needs to be chunked and
-- In essence each allocation larger than a page size needs to be chunked and
-- a probe emitted after each page allocation. You have to hit the guard
-- page so the kernel can map in the next page, otherwise you'll segfault.
--
......
......@@ -2247,7 +2247,7 @@ with constructor names (see Note [Parsing data constructors is hard]).
Due to simplified syntax, GADT constructor names (left-hand side of '::')
use simpler grammar production than usual data constructor names. As a
consequence, GADT constructor names are resticted (names like '(*)' are
consequence, GADT constructor names are restricted (names like '(*)' are
allowed in usual data constructors, but not in GADTs).
-}
......
......@@ -564,7 +564,7 @@ declarations and types as a reversed list of TyEl:
| TyElOpd (HsType GhcPs)
| ...
For example, both occurences of (C ! D) in the following example are parsed
For example, both occurrences of (C ! D) in the following example are parsed
into equal lists of TyEl:
data T = C ! D => C ! D results in [ TyElOpd (HsTyVar "D")
......@@ -2878,7 +2878,7 @@ failOpNotEnabledImportQualifiedPost loc = addError loc msg
failOpImportQualifiedTwice :: SrcSpan -> P ()
failOpImportQualifiedTwice loc = addError loc msg
where
msg = text "Multiple occurences of 'qualified'"
msg = text "Multiple occurrences of 'qualified'"
warnStarIsType :: SrcSpan -> P ()
warnStarIsType span = addWarning Opt_WarnStarIsType span msg
......
......@@ -734,7 +734,7 @@ There are two cases:
and match_Integer_shift_op.
Here we could in principle shift by any amount, but we arbitary
limit the shift to 4 bits; in particualr we do not want shift by a
limit the shift to 4 bits; in particular we do not want shift by a
huge amount, which can happen in code like that above.
The two cases are more different in their code paths that is comfortable,
......
......@@ -2057,7 +2057,7 @@ primop FetchAddByteArrayOp_Int "fetchAddIntArray#" GenPrimOp
primop FetchSubByteArrayOp_Int "fetchSubIntArray#" GenPrimOp
MutableByteArray# s -> Int# -> Int# -> State# s -> (# State# s, Int# #)
{Given an array, and offset in machine words, and a value to subtract,
atomically substract the value to the element. Returns the value of
atomically subtract the value to the element. Returns the value of
the element before the operation. Implies a full memory barrier.}
with has_side_effects = True
can_fail = True
......
......@@ -1137,7 +1137,7 @@ constructor namespace before looking in the data constructor namespace to
deal with `DataKinds`.
There is however, as always, one exception to this scheme. If we find
an ambiguous occurence of a record selector and DuplicateRecordFields
an ambiguous occurrence of a record selector and DuplicateRecordFields
is enabled then we defer the selection until the typechecker.
-}
......
......@@ -686,7 +686,7 @@ rnFamInstEqn doc atfi rhs_kvars
; tycon' <- lookupFamInstName mb_cls tycon
; let pat_kity_vars_with_dups = extractHsTyArgRdrKiTyVarsDup pats
-- Use the "...Dups" form because it's needed
-- below to report unsed binder on the LHS
-- below to report unused binder on the LHS
-- Implicitly bound variables, empty if we have an explicit 'forall' according
-- to the "forall-or-nothing" rule.
......
......@@ -1653,7 +1653,7 @@ extractHsTysRdrTyVarsDups :: [LHsType GhcPs] -> FreeKiTyVarsWithDups
extractHsTysRdrTyVarsDups tys
= extract_ltys tys []
-- Returns the free kind variables of any explictly-kinded binders, returning
-- Returns the free kind variables of any explicitly-kinded binders, returning
-- variable occurrences in left-to-right order.
-- See Note [Ordering of implicit variables].
-- NB: Does /not/ delete the binders themselves.
......@@ -1758,7 +1758,7 @@ extract_hs_tv_bndrs tv_bndrs acc_vars body_vars
tv_bndr_rdrs = map hsLTyVarLocName tv_bndrs
extract_hs_tv_bndrs_kvs :: [LHsTyVarBndr GhcPs] -> [Located RdrName]
-- Returns the free kind variables of any explictly-kinded binders, returning
-- Returns the free kind variables of any explicitly-kinded binders, returning
-- variable occurrences in left-to-right order.
-- See Note [Ordering of implicit variables].
-- NB: Does /not/ delete the binders themselves.
......
......@@ -256,7 +256,7 @@ We do not want to extend the substitution with (y -> x |> co); since y
is of unlifted type, this would destroy the let/app invariant if (x |>
co) was not ok-for-speculation.
But surely (x |> co) is ok-for-speculation, becasue it's a trivial
But surely (x |> co) is ok-for-speculation, because it's a trivial
expression, and x's type is also unlifted, presumably. Well, maybe
not if you are using unsafe casts. I actually found a case where we
had
......
......@@ -162,7 +162,7 @@ The interesting cases of the analysis:
Return: C(e₁) ∪ (fv e₁) × {x} ∪ {(x,x)}
* Let v = rhs in body:
In addition to the results from the subexpressions, add all co-calls from
everything that the body calls together with v to everthing that is called
everything that the body calls together with v to everything that is called
by v.
Return: C'(rhs) ∪ C(body) ∪ (fv rhs) × {v'| {v,v'} ∈ C(body)}
* Letrec v₁ = rhs₁ ... vₙ = rhsₙ in body
......@@ -318,7 +318,7 @@ Note [Taking boring variables into account]
If we decide that the variable bound in `let x = e1 in e2` is not interesting,
the analysis of `e2` will not report anything about `x`. To ensure that
`callArityBind` does still do the right thing we have to take that into account
everytime we would be lookup up `x` in the analysis result of `e2`.
every time we would be lookup up `x` in the analysis result of `e2`.
* Instead of calling lookupCallArityRes, we return (0, True), indicating
that this variable might be called many times with no arguments.
* Instead of checking `calledWith x`, we assume that everything can be called
......
......@@ -431,7 +431,7 @@ To prevent this, we need to recognize exit join points, and then disable
inlining.
Exit join points, recognizeable using `isExitJoinId` are join points with an
occurence in a recursive group, and can be recognized (after the occurence
occurrence in a recursive group, and can be recognized (after the occurrence
analyzer ran!) using `isExitJoinId`.
This function detects joinpoints with `occ_in_lam (idOccinfo id) == True`,
because the lambdas of a non-recursive join point are not considered for
......@@ -493,7 +493,7 @@ free variables of the join point.
We do not just `filter (`elemVarSet` fvs) captured`, as there might be
shadowing, and `captured` may contain multiple variables with the same Unique. I
these cases we want to abstract only over the last occurence, hence the `foldr`
these cases we want to abstract only over the last occurrence, hence the `foldr`
(with emphasis on the `r`). This is #15110.
-}
......@@ -371,7 +371,7 @@ That's why we compute
So we must *not* postInlineUnconditionally 'g', even though
its RHS turns out to be trivial. (I'm assuming that 'g' is
not choosen as a loop breaker.) Why not? Because then we
not chosen as a loop breaker.) Why not? Because then we
drop the binding for 'g', which leaves it out of scope in the
RULE!
......@@ -1790,7 +1790,7 @@ occAnal env (Case scrut bndr ty alts)
| t `tickishScopesLike` SoftScope
-- No reason to not look through all ticks here, but only
-- for soft-scoped ticks we can do so without having to
-- update returned occurance info (see occAnal)
-- update returned occurrence info (see occAnal)
= second (Tick t) $ occ_anal_scrut e alts
occ_anal_scrut scrut _alts
......@@ -2210,7 +2210,7 @@ extendFvs env s
Note [Binder swap]
~~~~~~~~~~~~~~~~~~
The "binder swap" tranformation swaps occurence of the
The "binder swap" tranformation swaps occurrence of the
scrutinee of a case for occurrences of the case-binder:
(1) case x of b { pi -> ri }
......@@ -2325,7 +2325,7 @@ as Dead, so we must zap the OccInfo on cb before making the
binding x = cb. See #5028.
NB: the OccInfo on /occurrences/ really doesn't matter much; the simplifier
doesn't use it. So this is only to satisfy the perhpas-over-picky Lint.
doesn't use it. So this is only to satisfy the perhaps-over-picky Lint.
Historical note [no-case-of-case]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -2535,7 +2535,7 @@ zapDetails = markAllMany . markAllNonTailCalled -- effectively sets to noOccInfo
lookupDetails :: UsageDetails -> Id -> OccInfo
lookupDetails ud id
| isCoVar id -- We do not currenly gather occurrence info (from types)
| isCoVar id -- We do not currently gather occurrence info (from types)
= noOccInfo -- for CoVars, so we must conservatively mark them as used
-- See Note [DoO not mark CoVars as dead]
| otherwise
......
......@@ -1623,7 +1623,7 @@ wrapJoinCont env cont thing_inside
= thing_inside env cont
| not (sm_case_case (getMode env))
-- See Note [Join points wih -fno-case-of-case]
-- See Note [Join points with -fno-case-of-case]
= do { (floats1, expr1) <- thing_inside env (mkBoringStop (contHoleType cont))
; let (floats2, expr2) = wrapJoinFloatsX floats1 expr1
; (floats3, expr3) <- rebuild (env `setInScopeFromF` floats2) expr2 cont
......@@ -1691,7 +1691,7 @@ We need do make the continuation E duplicable (since we are duplicating it)
with mkDuableCont.
Note [Join points wih -fno-case-of-case]
Note [Join points with -fno-case-of-case]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supose case-of-case is switched off, and we are simplifying
......@@ -2965,7 +2965,7 @@ knownCon env scrut dc_floats dc dc_ty_args dc_args bndr bs rhs cont
| exprIsTrivial scrut = return (emptyFloats env
, extendIdSubst env bndr (DoneEx scrut Nothing))
| otherwise = do { dc_args <- mapM (simplVar env) bs
-- dc_ty_args are aready OutTypes,
-- dc_ty_args are already OutTypes,
-- but bs are InBndrs
; let con_app = Var (dataConWorkId dc)
`mkTyApps` dc_ty_args
......
......@@ -330,7 +330,7 @@ Examples include:
The "representation or a primitive entity" specifies what kind of register is
needed and how many bits are required. The data type TyCon.PrimRep
enumerates all the possiblities.
enumerates all the possibilities.
data PrimRep
= VoidRep
......
......@@ -881,7 +881,7 @@ To do the injectivity check:
1. We build VarUsages that represent the LHS (rather, the portion of the LHS
that is flagged as injective); each usage on the LHS is NotPresent, because we
hvae not yet looked at the RHS.
have not yet looked at the RHS.
2. We also build a VarUsage for the RHS, done by injTyVarUsages.
......
......@@ -1098,7 +1098,7 @@ checkOverloadedSig monomorphism_restriction_applies sig
{- Note [Partial type signatures and generalisation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If /any/ of the signatures in the gropu is a partial type signature
If /any/ of the signatures in the group is a partial type signature
f :: _ -> Int
then we *always* use the InferGen plan, and hence tcPolyInfer.
We do this even for a local binding with -XMonoLocalBinds, when
......
......@@ -609,7 +609,7 @@ makeSuperClasses, giving us a a second quantified constrait
(forall a. a ~# b)
BUT this is an unboxed value! And nothing has prepared us for
dictionary "functions" that are unboxed. Actually it does just
about work, but the simplier ends up with stuff like
about work, but the simplifier ends up with stuff like
case (/\a. eq_sel d) of df -> ...(df @Int)...
and fails to simplify that any further. And it doesn't satisfy
isPredTy any more.
......
......@@ -1016,7 +1016,7 @@ a poly-kinded typeclass for a poly-kinded datatype. For example:
class Category (cat :: k -> k -> *) where
newtype T (c :: k -> k -> *) a b = MkT (c a b) deriving Category
This case is suprisingly tricky. To see why, let's write out what instance GHC
This case is surprisingly tricky. To see why, let's write out what instance GHC
will attempt to derive (using -fprint-explicit-kinds syntax):
instance Category k1 (T k2 c) where ...
......@@ -1289,7 +1289,7 @@ When there are no type families, it's quite easy:
instance Eq [a] => Eq (S a) -- by coercion sym (Eq (:CoS a)) : Eq [a] ~ Eq (S a)
instance Monad [] => Monad S -- by coercion sym (Monad :CoS) : Monad [] ~ Monad S
When type familes are involved it's trickier:
When type families are involved it's trickier:
data family T a b
newtype instance T Int a = MkT [a] deriving( Eq, Monad )
......
......@@ -991,7 +991,7 @@ more complicated it will be reported in a civilised way.
Note [Error reporting for deriving clauses]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A suprisingly tricky aspect of deriving to get right is reporting sensible
A surprisingly tricky aspect of deriving to get right is reporting sensible
error messages. In particular, if simplifyDeriv reaches a constraint that it
cannot solve, which might include:
......
......@@ -980,7 +980,7 @@ tcCheckHoleFit (TyH {..}) hole_ty ty = discardErrs $
; traceTc "w_givens are: " $ ppr w_givens
; rem <- runTcSDeriveds $ simpl_top w_givens
-- We don't want any insoluble or simple constraints left, but
-- solved implications are ok (and neccessary for e.g. undefined)
-- solved implications are ok (and necessary for e.g. undefined)
; traceTc "rems was:" $ ppr rem
; traceTc "}" empty
; return (isSolvedWC rem, wrp) } }
......
......@@ -265,7 +265,7 @@ There are three possibilities:
So we default it to 'Any' of the right kind.
All this works for both type and kind variables (indeed
the two are the same thign).
the two are the same thing).
* SkolemiseFlexi: is a special case for the LHS of RULES.
See Note [Zonking the LHS of a RULE]
......
......@@ -1323,7 +1323,7 @@ saturateFamApp :: TcType -> TcKind -> TcM (TcType, TcKind)
-- Precondition for (saturateFamApp ty kind):