Commit a9ae83af authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot
Browse files

Fix typos in comments

[skip ci]
parent 1edd6d21
...@@ -1668,7 +1668,7 @@ datatypeClassKey = mkPreludeClassUnique 39 ...@@ -1668,7 +1668,7 @@ datatypeClassKey = mkPreludeClassUnique 39
constructorClassKey = mkPreludeClassUnique 40 constructorClassKey = mkPreludeClassUnique 40
selectorClassKey = mkPreludeClassUnique 41 selectorClassKey = mkPreludeClassUnique 41
-- KnownNat: see Note [KnowNat & KnownSymbol and EvLit] in GHC.Tc.Types.Evidence -- KnownNat: see Note [KnownNat & KnownSymbol and EvLit] in GHC.Tc.Types.Evidence
knownNatClassNameKey :: Unique knownNatClassNameKey :: Unique
knownNatClassNameKey = mkPreludeClassUnique 42 knownNatClassNameKey = mkPreludeClassUnique 42
......
...@@ -163,7 +163,7 @@ defaults ...@@ -163,7 +163,7 @@ defaults
-- --
-- Unfortunately, for the time being most of the primops which should be -- Unfortunately, for the time being most of the primops which should be
-- moved according to the previous paragraph can't yet. There are some -- moved according to the previous paragraph can't yet. There are some
-- superficial restrictions in `foreign import prim` which mus be fixed -- superficial restrictions in `foreign import prim` which must be fixed
-- first. Specifically, `foreign import prim` always requires: -- first. Specifically, `foreign import prim` always requires:
-- --
-- - No polymorphism in type -- - No polymorphism in type
......
...@@ -1174,7 +1174,7 @@ initNCGConfig dflags = NCGConfig ...@@ -1174,7 +1174,7 @@ initNCGConfig dflags = NCGConfig
ArchX86 -> bmiVersion dflags ArchX86 -> bmiVersion dflags
_ -> Nothing _ -> Nothing
-- We Assume SSE1 and SSE2 operations are available on both -- We assume SSE1 and SSE2 operations are available on both
-- x86 and x86_64. Historically we didn't default to SSE2 and -- x86 and x86_64. Historically we didn't default to SSE2 and
-- SSE1 on x86, which results in defacto nondeterminism for how -- SSE1 on x86, which results in defacto nondeterminism for how
-- rounding behaves in the associated x87 floating point instructions -- rounding behaves in the associated x87 floating point instructions
......
...@@ -234,7 +234,7 @@ pprInstances :: [ClsInst] -> SDoc ...@@ -234,7 +234,7 @@ pprInstances :: [ClsInst] -> SDoc
pprInstances ispecs = vcat (map pprInstance ispecs) pprInstances ispecs = vcat (map pprInstance ispecs)
instanceHead :: ClsInst -> ([TyVar], Class, [Type]) instanceHead :: ClsInst -> ([TyVar], Class, [Type])
-- Returns the head, using the fresh tyavs from the ClsInst -- Returns the head, using the fresh tyvars from the ClsInst
instanceHead (ClsInst { is_tvs = tvs, is_tys = tys, is_dfun = dfun }) instanceHead (ClsInst { is_tvs = tvs, is_tys = tys, is_dfun = dfun })
= (tvs, cls, tys) = (tvs, cls, tys)
where where
......
...@@ -178,7 +178,7 @@ in GHC.Core.Opt.WorkWrap.Utils. (Maybe there are other "clients" of this featur ...@@ -178,7 +178,7 @@ in GHC.Core.Opt.WorkWrap.Utils. (Maybe there are other "clients" of this featur
might reject a correct program. So we carry a type substitution (in might reject a correct program. So we carry a type substitution (in
this example [a -> Bool]) and apply this substitution before this example [a -> Bool]) and apply this substitution before
comparing types. In effect, in Lint, type equality is always comparing types. In effect, in Lint, type equality is always
equality-moduolo-le-subst. This is in the le_subst field of equality-modulo-le-subst. This is in the le_subst field of
LintEnv. But nota bene: LintEnv. But nota bene:
(SI1) The le_subst substitution is applied to types and coercions only (SI1) The le_subst substitution is applied to types and coercions only
......
...@@ -940,7 +940,7 @@ We use aBSENT_ERROR_ID to build dummy values in workers. E.g. ...@@ -940,7 +940,7 @@ We use aBSENT_ERROR_ID to build dummy values in workers. E.g.
f x = (case x of (a,b) -> b) + 1::Int f x = (case x of (a,b) -> b) + 1::Int
The demand analyser figures ot that only the second component of x is The demand analyser figures out that only the second component of x is
used, and does a w/w split thus used, and does a w/w split thus
f x = case x of (a,b) -> $wf b f x = case x of (a,b) -> $wf b
......
...@@ -809,7 +809,7 @@ subst_id_bndr env@(SimplEnv { seInScope = in_scope, seIdSubst = id_subst }) ...@@ -809,7 +809,7 @@ subst_id_bndr env@(SimplEnv { seInScope = in_scope, seIdSubst = id_subst })
= ASSERT2( not (isCoVar old_id), ppr old_id ) = ASSERT2( not (isCoVar old_id), ppr old_id )
(env { seInScope = in_scope `extendInScopeSet` new_id, (env { seInScope = in_scope `extendInScopeSet` new_id,
seIdSubst = new_subst }, new_id) seIdSubst = new_subst }, new_id)
-- It's important that both seInScope and seIdSubt are updated with -- It's important that both seInScope and seIdSubst are updated with
-- the new_id, /after/ applying adjust_type. That's why adjust_type -- the new_id, /after/ applying adjust_type. That's why adjust_type
-- is done here. If we did adjust_type in simplJoinBndr (the only -- is done here. If we did adjust_type in simplJoinBndr (the only
-- place that gives a non-identity adjust_type) we'd have to fiddle -- place that gives a non-identity adjust_type) we'd have to fiddle
......
...@@ -946,7 +946,7 @@ and we get a loop! ...@@ -946,7 +946,7 @@ and we get a loop!
Note [specImport call stack] Note [specImport call stack]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When specialising an imports function 'f', we may get new calls When specialising an imports function 'f', we may get new calls
of an imported fuction 'g', which we want to specialise in turn, of an imported function 'g', which we want to specialise in turn,
and similarly specialising 'g' might expose a new call to 'h'. and similarly specialising 'g' might expose a new call to 'h'.
We track the stack of enclosing functions. So when specialising 'h' we We track the stack of enclosing functions. So when specialising 'h' we
......
...@@ -2032,7 +2032,7 @@ GHC.Core.Multiplicity above this module. ...@@ -2032,7 +2032,7 @@ GHC.Core.Multiplicity above this module.
-- | A shorthand for data with an attached 'Mult' element (the multiplicity). -- | A shorthand for data with an attached 'Mult' element (the multiplicity).
data Scaled a = Scaled Mult a data Scaled a = Scaled Mult a
deriving (Data.Data) deriving (Data.Data)
-- You might think that this would be a natural candiate for -- You might think that this would be a natural candidate for
-- Functor, Traversable but Krzysztof says (!3674) "it was too easy -- Functor, Traversable but Krzysztof says (!3674) "it was too easy
-- to accidentally lift functions (substitutions, zonking etc.) from -- to accidentally lift functions (substitutions, zonking etc.) from
-- Type -> Type to Scaled Type -> Scaled Type, ignoring -- Type -> Type to Scaled Type -> Scaled Type, ignoring
......
...@@ -604,7 +604,7 @@ which allows only (Coercion co) on the RHS. ...@@ -604,7 +604,7 @@ which allows only (Coercion co) on the RHS.
************************************************************************ ************************************************************************
* * * *
Operations oer case alternatives Operations over case alternatives
* * * *
************************************************************************ ************************************************************************
......
...@@ -625,7 +625,7 @@ schemeE d s p exp@(AnnTick (Breakpoint _id _fvs) _rhs) ...@@ -625,7 +625,7 @@ schemeE d s p exp@(AnnTick (Breakpoint _id _fvs) _rhs)
-- match = /\(r::RuntimeRep) /\(a::TYPE r). -- match = /\(r::RuntimeRep) /\(a::TYPE r).
-- \(k :: Int -> a) \(v::T). -- \(k :: Int -> a) \(v::T).
-- case v of MkV n -> k n -- case v of MkV n -> k n
-- Here (k n) :: a :: Type r, so we don't know if it's lifted -- Here (k n) :: a :: TYPE r, so we don't know if it's lifted
-- or not; but that should be fine provided we add that void arg. -- or not; but that should be fine provided we add that void arg.
id <- newId (mkVisFunTyMany realWorldStatePrimTy ty) id <- newId (mkVisFunTyMany realWorldStatePrimTy ty)
......
...@@ -4910,7 +4910,7 @@ isSseEnabled platform = case platformArch platform of ...@@ -4910,7 +4910,7 @@ isSseEnabled platform = case platformArch platform of
isSse2Enabled :: Platform -> Bool isSse2Enabled :: Platform -> Bool
isSse2Enabled platform = case platformArch platform of isSse2Enabled platform = case platformArch platform of
-- We Assume SSE1 and SSE2 operations are available on both -- We assume SSE1 and SSE2 operations are available on both
-- x86 and x86_64. Historically we didn't default to SSE2 and -- x86 and x86_64. Historically we didn't default to SSE2 and
-- SSE1 on x86, which results in defacto nondeterminism for how -- SSE1 on x86, which results in defacto nondeterminism for how
-- rounding behaves in the associated x87 floating point instructions -- rounding behaves in the associated x87 floating point instructions
......
...@@ -987,7 +987,7 @@ mismatch between two skolems ...@@ -987,7 +987,7 @@ mismatch between two skolems
We certainly don't want to say "Can't match LiftedRep ~ LiftedRep"! We certainly don't want to say "Can't match LiftedRep ~ LiftedRep"!
But if we are printing the type But if we are printing the type
(forall (a :: Type r). blah (forall (a :: TYPE r). blah
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)
......
...@@ -601,7 +601,7 @@ findValidHoleFits tidy_env implics simples h@(Hole { hole_sort = ExprHole _ ...@@ -601,7 +601,7 @@ findValidHoleFits tidy_env implics simples h@(Hole { hole_sort = ExprHole _
; traceTc "findingValidHoleFitsFor }" empty ; traceTc "findingValidHoleFitsFor }" empty
; return (tidy_env, vMsg $$ refMsg) } ; return (tidy_env, vMsg $$ refMsg) }
where where
-- We extract the type, the tcLevel and the types free variables -- We extract the type, the TcLevel and the types free variables
-- from the constraint. -- from the constraint.
hole_fvs :: FV hole_fvs :: FV
hole_fvs = tyCoFVsOfType hole_ty hole_fvs = tyCoFVsOfType hole_ty
......
...@@ -196,7 +196,7 @@ tcApp works like this: ...@@ -196,7 +196,7 @@ tcApp works like this:
The "list of arguments" is [HsExprArg], described in Note [HsExprArg]. The "list of arguments" is [HsExprArg], described in Note [HsExprArg].
in GHC.Tc.Gen.Head in GHC.Tc.Gen.Head
2. Use tcInferAppHead to infer the type of the fuction, 2. Use tcInferAppHead to infer the type of the function,
as an (uninstantiated) TcSigmaType as an (uninstantiated) TcSigmaType
There are special cases for There are special cases for
HsVar, HsRecFld, and ExprWithTySig HsVar, HsRecFld, and ExprWithTySig
...@@ -588,7 +588,7 @@ Consider (#15859) ...@@ -588,7 +588,7 @@ Consider (#15859)
data A k :: k -> Type -- A :: forall k -> k -> Type data A k :: k -> Type -- A :: forall k -> k -> Type
type KindOf (a :: k) = k -- KindOf :: forall k. k -> Type type KindOf (a :: k) = k -- KindOf :: forall k. k -> Type
a = (undefind :: KindOf A) @Int a = (undefined :: KindOf A) @Int
With ImpredicativeTypes (thin ice, I know), we instantiate With ImpredicativeTypes (thin ice, I know), we instantiate
KindOf at type (forall k -> k -> Type), so KindOf at type (forall k -> k -> Type), so
......
...@@ -579,7 +579,7 @@ lookupChildrenExport spec_parent rdr_items = ...@@ -579,7 +579,7 @@ lookupChildrenExport spec_parent rdr_items =
-- --
-- Note: [Types of TyCon] -- Note: [Types of TyCon]
-- --
-- This check appears to be overlly complicated, Richard asked why it -- This check appears to be overly complicated, Richard asked why it
-- is not simply just `isAlgTyCon`. The answer for this is that -- is not simply just `isAlgTyCon`. The answer for this is that
-- a classTyCon is also an `AlgTyCon` which we explicitly want to disallow. -- a classTyCon is also an `AlgTyCon` which we explicitly want to disallow.
-- (It is either a newtype or data depending on the number of methods) -- (It is either a newtype or data depending on the number of methods)
......
...@@ -326,7 +326,7 @@ tcInferAppHead :: HsExpr GhcRn ...@@ -326,7 +326,7 @@ tcInferAppHead :: HsExpr GhcRn
-- See Note [Application chains and heads] in GHC.Tc.Gen.App -- See Note [Application chains and heads] in GHC.Tc.Gen.App
-- We get back a /SigmaType/ because we have special cases for -- We get back a /SigmaType/ because we have special cases for
-- * A bare identifier (just look it up) -- * A bare identifier (just look it up)
-- This case also covers a record selectro HsRecFld -- This case also covers a record selector HsRecFld
-- * An expression with a type signature (e :: ty) -- * An expression with a type signature (e :: ty)
-- See Note [Application chains and heads] in GHC.Tc.Gen.App -- See Note [Application chains and heads] in GHC.Tc.Gen.App
-- --
......
...@@ -297,7 +297,7 @@ a more convenient function, defined in terms of `natSing`: ...@@ -297,7 +297,7 @@ a more convenient function, defined in terms of `natSing`:
The reason we don't use this directly in the class is that it is simpler The reason we don't use this directly in the class is that it is simpler
and more efficient to pass around a Natural rather than an entire function, and more efficient to pass around a Natural rather than an entire function,
especially when the `KnowNat` evidence is packaged up in an existential. especially when the `KnownNat` evidence is packaged up in an existential.
The story for kind `Symbol` is analogous: The story for kind `Symbol` is analogous:
* class KnownSymbol * class KnownSymbol
......
...@@ -301,7 +301,7 @@ tcRnModuleTcRnM hsc_env mod_sum ...@@ -301,7 +301,7 @@ tcRnModuleTcRnM hsc_env mod_sum
tcg_env <- return (tcg_env tcg_env <- return (tcg_env
{ tcg_doc_hdr = maybe_doc_hdr }) { tcg_doc_hdr = maybe_doc_hdr })
; -- Report unused names ; -- Report unused names
-- Do this /after/ typeinference, so that when reporting -- Do this /after/ type inference, so that when reporting
-- a function with no type signature we can give the -- a function with no type signature we can give the
-- inferred type -- inferred type
reportUnusedNames tcg_env hsc_src reportUnusedNames tcg_env hsc_src
......
...@@ -2606,7 +2606,7 @@ because many good things flow from [W] t1 ~# t2. ...@@ -2606,7 +2606,7 @@ because many good things flow from [W] t1 ~# t2.
The same reasoning applies to The same reasoning applies to
* (~~) heqTyCOn * (~~) heqTyCon
* (~) eqTyCon * (~) eqTyCon
* Coercible coercibleTyCon * Coercible coercibleTyCon
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment