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 ...@@ -467,7 +467,7 @@ Duplicate YES NO
Note [Implementation: how can_fail/has_side_effects affect transformations] 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? in the simplifier?
Two main predicates on primpops test these flags: Two main predicates on primpops test these flags:
......
...@@ -301,7 +301,7 @@ syntax. This has a few consequences: ...@@ -301,7 +301,7 @@ syntax. This has a few consequences:
* Writing (a ~ b) does not require enabling -XTypeOperators. It does, however, * Writing (a ~ b) does not require enabling -XTypeOperators. It does, however,
require -XGADTs or -XTypeFamilies. 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. and it cannot be hidden.
* We have a bunch of special cases in the compiler to arrange all of the above. * 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. ...@@ -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 Generally speaking, you can't be polymorphic in 'rr'. E.g
f :: forall (rr:RuntimeRep) (a:TYPE rr). a -> [a] f :: forall (rr:RuntimeRep) (a:TYPE rr). a -> [a]
f = /\(rr:RuntimeRep) (a:rr) \(a:rr). ... 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 calling convention for 'f' varies depending on whether the argument is
a a Int, Int#, or Float#. (You could imagine generating specialised a a Int, Int#, or Float#. (You could imagine generating specialised
code, one for each instantiation of 'rr', but we don't do that.) code, one for each instantiation of 'rr', but we don't do that.)
......
...@@ -3430,7 +3430,7 @@ primop TraceEventBinaryOp "traceBinaryEvent#" GenPrimOp ...@@ -3430,7 +3430,7 @@ primop TraceEventBinaryOp "traceBinaryEvent#" GenPrimOp
Addr# -> Int# -> State# s -> State# s Addr# -> Int# -> State# s -> State# s
{ Emits an event via the RTS tracing framework. The contents { Emits an event via the RTS tracing framework. The contents
of the event is the binary object passed as the first argument with 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. } emitted to the {\tt .eventlog} file. }
with with
has_side_effects = True has_side_effects = True
......
...@@ -1027,7 +1027,7 @@ oneSRT dflags staticFuns lbls caf_lbls isCAF cafs static_data = do ...@@ -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, -- "Referring to an SRT from the info table" of Note [SRTs]). However,
-- when dynamic linking is used we cannot guarantee that the offset -- when dynamic linking is used we cannot guarantee that the offset
-- between the SRT and the info table will fit in the offset field. -- 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) not (labelDynamic config this_mod lbl)
-- MachO relocations can't express offsets between compilation units at -- MachO relocations can't express offsets between compilation units at
......
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- A Parser monad with access to the 'DynFlags'. -- 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. -- required for parsing Haskell.
-- The parser for C-- requires access to a lot more of the 'DynFlags', -- The parser for C-- requires access to a lot more of the 'DynFlags',
......
...@@ -545,7 +545,7 @@ buildChains edges blocks ...@@ -545,7 +545,7 @@ buildChains edges blocks
-- buildNext builds up chains from edges one at a time. -- buildNext builds up chains from edges one at a time.
-- We keep a map from the ends of chains to the chains. -- 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! -- existing chain!
-- We store them using STRefs so we don't have to rebuild the spine of both -- We store them using STRefs so we don't have to rebuild the spine of both
-- maps every time we update a chain. -- maps every time we update a chain.
......
...@@ -218,7 +218,7 @@ argRegs r ...@@ -218,7 +218,7 @@ argRegs r
_ -> panic "MachRegs.argRegs(sparc): don't know about >6 arguments!" _ -> 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 :: [Reg]
allArgRegs allArgRegs
......
...@@ -58,7 +58,7 @@ import Data.Bits ...@@ -58,7 +58,7 @@ import Data.Bits
-- If we are using the .subsections_via_symbols directive -- If we are using the .subsections_via_symbols directive
-- (available on recent versions of Darwin), -- (available on recent versions of Darwin),
-- we have to make sure that there is some kind of reference -- 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 -- so that the linker will not think it is unreferenced and dead-strip
-- it. That's why the label is called a DeadStripPreventer (_dsp). -- it. That's why the label is called a DeadStripPreventer (_dsp).
-- --
......
...@@ -538,7 +538,7 @@ substitutions until the next run of the simplifier. ...@@ -538,7 +538,7 @@ substitutions until the next run of the simplifier.
case (eq_sel d) of (co :: a ~# b) -> blah case (eq_sel d) of (co :: a ~# b) -> blah
where eq_sel :: (a~b) -> (a~#b) where eq_sel :: (a~b) -> (a~#b)
Or even even Or even
case (df @Int) of (co :: a ~# b) -> blah case (df @Int) of (co :: a ~# b) -> blah
Which is very exotic, and I think never encountered; but see Which is very exotic, and I think never encountered; but see
Note [Equality superclasses in quantified constraints] Note [Equality superclasses in quantified constraints]
......
...@@ -504,7 +504,7 @@ lintCoreBindings dflags pass local_in_scope binds ...@@ -504,7 +504,7 @@ lintCoreBindings dflags pass local_in_scope binds
(_, dups) = removeDups compare binders (_, dups) = removeDups compare binders
-- dups_ext checks for names with different uniques -- 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: -- allow this at top level:
-- M.n{r3} = ... -- M.n{r3} = ...
-- M.n{r29} = ... -- M.n{r29} = ...
......
...@@ -290,7 +290,7 @@ cause more programs to fail to typecheck. ...@@ -290,7 +290,7 @@ cause more programs to fail to typecheck.
In future work, instead of approximating we might add type families In future work, instead of approximating we might add type families
and allow users to write types involving operations on multiplicities. and allow users to write types involving operations on multiplicities.
In this case, we could enforce more invariants in Mult, for example, 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. that the sumands and factors are ordered somehow, to have more equalities.
-} -}
......
...@@ -909,7 +909,7 @@ Which we want to become: ...@@ -909,7 +909,7 @@ Which we want to become:
x_exported = tick<x> <expression> x_exported = tick<x> <expression>
As it makes no sense to keep the tick and the expression on separate 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 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 ticks. More often than not, other references will be unfoldings of
x_exported, and therefore carry the tick anyway. 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 ...@@ -497,7 +497,7 @@ Where should the NOINLINE pragma go? If we leave it on f we'll get
; {-# NOINLINE f #-} ; {-# NOINLINE f #-}
f = $wf |> co f = $wf |> co
; g = ...f... } ; 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: cast! We want to transfer the pagma to $wf:
rec { {-# NOINLINE $wf #-} rec { {-# NOINLINE $wf #-}
$wf = ...g... $wf = ...g...
......
...@@ -854,7 +854,7 @@ seqIds (id:ids) = seqId id `seq` seqIds ids ...@@ -854,7 +854,7 @@ seqIds (id:ids) = seqId id `seq` seqIds ids
{- {-
Note [Arity robustness] 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 out_id. This is important, so that the arity of an Id is visible in
its own RHS. For example: its own RHS. For example:
f = \x. ....g (\y. f y).... f = \x. ....g (\y. f y)....
......
...@@ -207,7 +207,7 @@ the following invariants hold ...@@ -207,7 +207,7 @@ the following invariants hold
(a) if dup = OkToDup, then continuation k is also ok-to-dup (a) if dup = OkToDup, then continuation k is also ok-to-dup
(b) if dup = OkToDup or Simplified, the subst-env is empty (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 instance Outputable DupFlag where
......
...@@ -753,7 +753,7 @@ Consider this, in (perf/should_run/T9339) ...@@ -753,7 +753,7 @@ Consider this, in (perf/should_run/T9339)
After optimisation, including SpecConstr, we get: After optimisation, including SpecConstr, we get:
f :: Int# -> Int -> Int 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 -> case x of
__DEFAULT -> f (+# wild_Xp 1#) (I# x) __DEFAULT -> f (+# wild_Xp 1#) (I# x)
1000000# -> ... 1000000# -> ...
......
...@@ -958,7 +958,7 @@ unfolding, we would end up with ...@@ -958,7 +958,7 @@ unfolding, we would end up with
let a = I#3 in case a of I# y -> ... let a = I#3 in case a of I# y -> ...
because in general, we do this on-the-fly beta-reduction because in general, we do this on-the-fly beta-reduction
(\x. e) blah --> let x = blah in e (\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. But if the case-of-known-constructor doesn't actually fire (i.e.
exprIsConApp_maybe does not return Just) then nothing happens, and nothing exprIsConApp_maybe does not return Just) then nothing happens, and nothing
......
...@@ -84,7 +84,7 @@ import Data.List ...@@ -84,7 +84,7 @@ import Data.List
-- --
-- 2. Note [Substitutions apply only once] in "GHC.Core.TyCo.Subst" -- 2. Note [Substitutions apply only once] in "GHC.Core.TyCo.Subst"
data 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 -- applying the substitution
IdSubstEnv -- Substitution from NcIds to CoreExprs IdSubstEnv -- Substitution from NcIds to CoreExprs
TvSubstEnv -- Substitution from TyVars to Types TvSubstEnv -- Substitution from TyVars to Types
...@@ -757,6 +757,6 @@ A worker can get substituted away entirely. ...@@ -757,6 +757,6 @@ A worker can get substituted away entirely.
We do not treat an InlWrapper as an 'occurrence' in the occurrence 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. 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. InlVanilla. The WARN is just so I can see if it happens a lot.
-} -}
...@@ -616,7 +616,7 @@ They fit together like so: ...@@ -616,7 +616,7 @@ They fit together like so:
, Bndr (a:k->*) AnonTCB , Bndr (a:k->*) AnonTCB
, Bndr (b: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. kind variable k.
* See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep * See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep
......
...@@ -2458,7 +2458,7 @@ See also ...@@ -2458,7 +2458,7 @@ See also
* GHC.Core.Type.occCheckExpand * GHC.Core.Type.occCheckExpand
* GHC.Core.Utils.coreAltsType * GHC.Core.Utils.coreAltsType
* GHC.Tc.Validity.checkEscapingKind * GHC.Tc.Validity.checkEscapingKind
all of which grapple with with the same problem. all of which grapple with the same problem.
See #14939. See #14939.
-} -}
......
...@@ -76,7 +76,7 @@ intsToReverseBitmap platform size = go 0 ...@@ -76,7 +76,7 @@ intsToReverseBitmap platform size = go 0
Note [Strictness when building Bitmaps] 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 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) that some test cases (particularly those whose C-- have large numbers of CAFs)
produced large quantities of allocations from this function. produced large quantities of allocations from this function.
......
...@@ -58,7 +58,7 @@ codeOutput :: DynFlags ...@@ -58,7 +58,7 @@ codeOutput :: DynFlags
-> ModLocation -> ModLocation
-> ForeignStubs -> ForeignStubs
-> [(ForeignSrcLang, FilePath)] -> [(ForeignSrcLang, FilePath)]
-- ^ additional files to be compiled with with the C compiler -- ^ additional files to be compiled with the C compiler
-> [UnitId] -> [UnitId]
-> Stream IO RawCmmGroup a -- Compiled C-- -> Stream IO RawCmmGroup a -- Compiled C--
-> IO (FilePath, -> IO (FilePath,
......
...@@ -457,7 +457,7 @@ hscTypecheckRename hsc_env mod_summary rdr_module = runHsc hsc_env $ ...@@ -457,7 +457,7 @@ hscTypecheckRename hsc_env mod_summary rdr_module = runHsc hsc_env $
hsc_typecheck True mod_summary (Just rdr_module) 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 -- b) concerning dumping rename info and hie files. It would be nice to further
-- separate this stuff out, probably in conjunction better separating renaming -- separate this stuff out, probably in conjunction better separating renaming
-- and type checking (#17781). -- and type checking (#17781).
......
...@@ -2218,7 +2218,7 @@ enableCodeGenForTH = ...@@ -2218,7 +2218,7 @@ enableCodeGenForTH =
-- the specified target, disable optimization and change the .hi -- the specified target, disable optimization and change the .hi
-- and .o file locations to be temporary files. -- 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. -- or sums into GHCi while still allowing some code to be interpreted.
enableCodeGenForUnboxedTuplesOrSums :: HscTarget enableCodeGenForUnboxedTuplesOrSums :: HscTarget
-> NodeMap [Either ErrorMessages ModSummary] -> NodeMap [Either ErrorMessages ModSummary]
......
...@@ -256,7 +256,7 @@ findDependency :: HscEnv ...@@ -256,7 +256,7 @@ findDependency :: HscEnv
-> ModuleName -- Imported module -> ModuleName -- Imported module
-> IsBootInterface -- Source import -> IsBootInterface -- Source import
-> Bool -- Record dependency on package modules -> 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 findDependency hsc_env srcloc pkg imp is_boot include_pkg_deps
= do { -- Find the module; this will be fast because = do { -- Find the module; this will be fast because
-- we've done it once during downsweep -- we've done it once during downsweep
...@@ -296,7 +296,7 @@ insertSuffixes ...@@ -296,7 +296,7 @@ insertSuffixes
:: FilePath -- Original filename; e.g. "foo.o" :: FilePath -- Original filename; e.g. "foo.o"
-> [String] -- Suffix prefixes e.g. ["x_", "y_"] -> [String] -- Suffix prefixes e.g. ["x_", "y_"]
-> [FilePath] -- Zapped filenames e.g. ["foo.x_o", "foo.y_o"] -> [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 -- We assume the old suffix contains no dots, so we know where to
-- split it -- split it
insertSuffixes file_name extras insertSuffixes file_name extras
......
...@@ -873,7 +873,7 @@ Examples: ...@@ -873,7 +873,7 @@ Examples:
NOTE THAT NOTE THAT
* A CUSK does /not/ mean that everything about the kind signature is * 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 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 (T4 and f4) that inference is done looking /only/ at the header of T4
(or signature for f4), not at the definition thereof. (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 LambdaCase #-}
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleContexts #-}
......
...@@ -199,7 +199,7 @@ that we expect. ...@@ -199,7 +199,7 @@ that we expect.
-- together as they see fit. -- together as they see fit.
newtype SatisfiabilityCheck = SC (Delta -> DsM (Maybe Delta)) 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 -- 'SatisfiabilityCheck'. Return 'Just' a new, potentially extended, 'Delta' if
-- successful, and 'Nothing' otherwise. -- successful, and 'Nothing' otherwise.
runSatisfiabilityCheck :: Delta -> SatisfiabilityCheck -> DsM (Maybe Delta) runSatisfiabilityCheck :: Delta -> SatisfiabilityCheck -> DsM (Maybe Delta)
...@@ -1604,7 +1604,7 @@ provideEvidence = go ...@@ -1604,7 +1604,7 @@ provideEvidence = go
instantiate_cons x ty xs n delta (cl:cls) = do instantiate_cons x ty xs n delta (cl:cls) = do
env <- dsGetFamInstEnvs env <- dsGetFamInstEnvs
case guessConLikeUnivTyArgsFromResTy env ty cl of 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 Just arg_tys -> do
(tvs, arg_vars, new_ty_cs, strict_arg_tys) <- mkOneConFull arg_tys cl (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) let new_tm_cs = unitBag (TmConCt x (PmAltConLike cl) tvs arg_vars)
......
...@@ -223,7 +223,7 @@ combineMatchResults :: MatchResult CoreExpr -> MatchResult CoreExpr -> MatchResu ...@@ -223,7 +223,7 @@ combineMatchResults :: MatchResult CoreExpr -> MatchResult CoreExpr -> MatchResu
combineMatchResults match_result1@(MR_Infallible _) _ combineMatchResults match_result1@(MR_Infallible _) _
= match_result1 = match_result1
combineMatchResults match_result1 match_result2 = 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`. -- make it let-bind it bind it with `shareFailureHandler`.
case shareFailureHandler match_result1 of case shareFailureHandler match_result1 of
MR_Infallible _ -> match_result1 MR_Infallible _ -> match_result1
......
...@@ -56,7 +56,7 @@ newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name ...@@ -56,7 +56,7 @@ newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name
-- Name for a thing, given its Module and OccName -- Name for a thing, given its Module and OccName
-- See Note [The Name Cache] in GHC.Types.Name.Cache -- 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 -- because we may have seen an occurrence before, but now is the
-- moment when we know its Module and SrcLoc in their full glory -- moment when we know its Module and SrcLoc in their full glory
......
...@@ -486,7 +486,7 @@ loadInterface doc_str mod from ...@@ -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 ; 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) -- of one's own boot file! (one-shot only)
-- See Note [Loading your own hi-boot file] -- See Note [Loading your own hi-boot file]
......
...@@ -303,7 +303,7 @@ pluginRecompileToRecompileRequired old_fp new_fp pr ...@@ -303,7 +303,7 @@ pluginRecompileToRecompileRequired old_fp new_fp pr
-- time or when we go from one recompilation strategy to another: (force -> -- time or when we go from one recompilation strategy to another: (force ->
-- no-force, maybe-recomp -> no-force, no-force -> maybe-recomp etc.) -- 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 -- recompilation is triggered since the old impure plugins could have
-- changed the build output which is now back to normal. -- changed the build output which is now back to normal.
= RecompBecause "Plugins changed" = RecompBecause "Plugins changed"
......
...@@ -148,7 +148,7 @@ rnDepModules sel deps = do ...@@ -148,7 +148,7 @@ rnDepModules sel deps = do
-- --
-- However, we MUST NOT do this for regular modules. -- However, we MUST NOT do this for regular modules.
-- First, for efficiency reasons, doing this -- 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 -- those modules in the list (it wasn't a hole module, after
-- all). But there's a second, more important correctness -- all). But there's a second, more important correctness
-- consideration: we perform module renaming when running -- consideration: we perform module renaming when running
...@@ -158,7 +158,7 @@ rnDepModules sel deps = do ...@@ -158,7 +158,7 @@ rnDepModules sel deps = do
-- --abi-hash is just to get a hash of the on-disk interfaces -- --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 -- for this *specific* package. If we go off and tug on the
-- interface for /everything/ in dep_finsts, we're gonna have a -- 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 -- because the hmap for --abi-hash is always trivial, so the
-- interface we request is local. Though, maybe we ought -- interface we request is local. Though, maybe we ought
-- not to do it in this case either...) -- not to do it in this case either...)
......
...@@ -962,7 +962,7 @@ But if we are printing the type ...@@ -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 we do want to turn that (free) r into LiftedRep, so it prints as
(forall a. blah) (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. 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: ...@@ -867,7 +867,7 @@ A thing can have a bind_lvl of outerLevel, but have an internal name:
foo = [d| op = 3 foo = [d| op = 3
bop = op + 1 |] bop = op + 1 |]
Here the bind_lvl of 'op' is (bogusly) outerLevel, even though it is 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 binding levels for top-level things; the binding levels are in the
LocalRdrEnv. LocalRdrEnv.
......
...@@ -672,7 +672,7 @@ unariseArgBinder is_con_arg rho x = ...@@ -672,7 +672,7 @@ unariseArgBinder is_con_arg rho x =
-- --
-- While not unarising the binder in this case does not break any programs -- 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 -- (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]. -- binders should vanish. See Note [Post-unarisation invariants].
| isUnboxedSumType (idType x) || isUnboxedTupleType (idType x) | isUnboxedSumType (idType x) || isUnboxedTupleType (idType x)
-> do x' <- mkId (mkFastString "us") (primRepToType rep) -> do x' <- mkId (mkFastString "us") (primRepToType rep)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
-- --
-- Stg to C--: code generation for constructors -- 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. -- constructors on the RHSs of let(rec)s.
-- --
-- (c) The University of Glasgow 2004-2006 -- (c) The University of Glasgow 2004-2006
......
...@@ -464,7 +464,7 @@ Note [Compiling case expressions]. However, after eliminating the ...@@ -464,7 +464,7 @@ Note [Compiling case expressions]. However, after eliminating the
tagToEnum# (#13397) we will have: tagToEnum# (#13397) we will have:
case (a>b) of ... case (a>b) of ...
Rather than make it behave quite differently, I am testing for a 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. ToDo: figure out what the Right Rule should be.
......
...@@ -162,7 +162,7 @@ newLabel name = do ...@@ -162,7 +162,7 @@ newLabel name = do
addLabel name (mkBlockId u) addLabel name (mkBlockId u)
return (mkBlockId u) return (mkBlockId u)
-- | Add add a local function to the environment. -- | Add a local function to the environment.
newFunctionName newFunctionName
:: FastString -- ^ name of the function :: FastString -- ^ name of the function
-> UnitId -- ^ package of the current module -> UnitId -- ^ package of the current module
......
...@@ -2155,7 +2155,7 @@ vecElemProjectCast _ _ _ = Nothing ...@@ -2155,7 +2155,7 @@ vecElemProjectCast _ _ _ = Nothing
-- values! -- values!
-- The current design with respect to register mapping of scalars could -- The current design with respect to register mapping of scalars could
-- very well be the best,but exploring the design space and doing careful -- 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 -- In some next generation CPU ISAs, notably RISC V, the SIMD extension
-- includes support for a sort of run time CPU dependent vectorization parameter, -- 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 ... -- where a loop may act upon a single scalar each iteration OR some 2,4,8 ...
......
...@@ -58,7 +58,7 @@ moving parts are: ...@@ -58,7 +58,7 @@ moving parts are:
* We record the CgInfo in the IdInfo of the Id. * We record the CgInfo in the IdInfo of the Id.
* GHC.Driver.Pipeline: the call to updateModDetailsIdInfos augments the * 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. gleaned from the back end. The hard work is done in GHC.Iface.UpdateIdInfos.
* For ModIface we generate the final ModIface with CgInfo in * For ModIface we generate the final ModIface with CgInfo in
......
...@@ -100,7 +100,7 @@ data DerivEnv = DerivEnv ...@@ -100,7 +100,7 @@ data DerivEnv = DerivEnv
, denv_cls :: Class , denv_cls :: Class
-- ^ Class for which we need to derive an instance -- ^ Class for which we need to derive an instance
, denv_inst_tys :: [Type] , 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 , denv_ctxt :: DerivContext
-- ^ @'SupplyContext' theta@ for standalone deriving (where @theta@ is the -- ^ @'SupplyContext' theta@ for standalone deriving (where @theta@ is the
-- context of the instance). -- context of the instance).
......
...@@ -111,7 +111,7 @@ The hole in `f` would generate the message: ...@@ -111,7 +111,7 @@ The hole in `f` would generate the message:
(and originally defined in ‘GHC.Base’)) (and originally defined in ‘GHC.Base’))
Valid hole fits are found by checking top level identifiers and local bindings 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 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] 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 ...@@ -122,10 +122,10 @@ This is to avoid affecting the hole and later checks by prematurely having
unified one of the free unification variables. unified one of the free unification variables.
When outputting, we sort the hole fits by the size of the types we'd need to 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 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