[Git][ghc/ghc][master] Fix typos in comments
Marge Bot
gitlab at gitlab.haskell.org
Fri Oct 2 12:00:32 UTC 2020
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
a9ae83af by Krzysztof Gogolewski at 2020-10-02T08:00:25-04:00
Fix typos in comments
[skip ci]
- - - - -
29 changed files:
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToByteCode.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Solver/Interact.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Id/Make.hs
- docs/users_guide/flags.py
- libraries/base/GHC/Conc/Sync.hs
- libraries/base/GHC/TypeNats.hs
- libraries/base/Unsafe/Coerce.hs
- libraries/ghc-prim/GHC/Prim/Ext.hs
- testsuite/tests/typecheck/should_fail/T18357b.hs
- utils/genprimopcode/Main.hs
Changes:
=====================================
compiler/GHC/Builtin/Names.hs
=====================================
@@ -1668,7 +1668,7 @@ datatypeClassKey = mkPreludeClassUnique 39
constructorClassKey = mkPreludeClassUnique 40
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 = mkPreludeClassUnique 42
=====================================
compiler/GHC/Builtin/primops.txt.pp
=====================================
@@ -163,7 +163,7 @@ defaults
--
-- Unfortunately, for the time being most of the primops which should be
-- 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:
--
-- - No polymorphism in type
=====================================
compiler/GHC/CmmToAsm.hs
=====================================
@@ -1174,7 +1174,7 @@ initNCGConfig dflags = NCGConfig
ArchX86 -> bmiVersion dflags
_ -> 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
-- SSE1 on x86, which results in defacto nondeterminism for how
-- rounding behaves in the associated x87 floating point instructions
=====================================
compiler/GHC/Core/InstEnv.hs
=====================================
@@ -234,7 +234,7 @@ pprInstances :: [ClsInst] -> SDoc
pprInstances ispecs = vcat (map pprInstance ispecs)
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 })
= (tvs, cls, tys)
where
=====================================
compiler/GHC/Core/Lint.hs
=====================================
@@ -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
this example [a -> Bool]) and apply this substitution before
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:
(SI1) The le_subst substitution is applied to types and coercions only
=====================================
compiler/GHC/Core/Make.hs
=====================================
@@ -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
-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
f x = case x of (a,b) -> $wf b
=====================================
compiler/GHC/Core/Opt/Simplify/Env.hs
=====================================
@@ -809,7 +809,7 @@ subst_id_bndr env@(SimplEnv { seInScope = in_scope, seIdSubst = id_subst })
= ASSERT2( not (isCoVar old_id), ppr old_id )
(env { seInScope = in_scope `extendInScopeSet` 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
-- 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
=====================================
compiler/GHC/Core/Opt/Specialise.hs
=====================================
@@ -946,7 +946,7 @@ and we get a loop!
Note [specImport call stack]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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'.
We track the stack of enclosing functions. So when specialising 'h' we
=====================================
compiler/GHC/Core/TyCo/Rep.hs
=====================================
@@ -2032,7 +2032,7 @@ GHC.Core.Multiplicity above this module.
-- | A shorthand for data with an attached 'Mult' element (the multiplicity).
data Scaled a = Scaled Mult a
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
-- to accidentally lift functions (substitutions, zonking etc.) from
-- Type -> Type to Scaled Type -> Scaled Type, ignoring
=====================================
compiler/GHC/Core/Utils.hs
=====================================
@@ -604,7 +604,7 @@ which allows only (Coercion co) on the RHS.
************************************************************************
* *
- Operations oer case alternatives
+ Operations over case alternatives
* *
************************************************************************
=====================================
compiler/GHC/CoreToByteCode.hs
=====================================
@@ -625,7 +625,7 @@ schemeE d s p exp@(AnnTick (Breakpoint _id _fvs) _rhs)
-- match = /\(r::RuntimeRep) /\(a::TYPE r).
-- \(k :: Int -> a) \(v::T).
-- 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.
id <- newId (mkVisFunTyMany realWorldStatePrimTy ty)
=====================================
compiler/GHC/Driver/Session.hs
=====================================
@@ -4910,7 +4910,7 @@ isSseEnabled platform = case platformArch platform of
isSse2Enabled :: Platform -> Bool
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
-- SSE1 on x86, which results in defacto nondeterminism for how
-- rounding behaves in the associated x87 floating point instructions
=====================================
compiler/GHC/Iface/Type.hs
=====================================
@@ -987,7 +987,7 @@ mismatch between two skolems
We certainly don't want to say "Can't match LiftedRep ~ LiftedRep"!
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
(forall a. blah)
=====================================
compiler/GHC/Tc/Errors/Hole.hs
=====================================
@@ -601,7 +601,7 @@ findValidHoleFits tidy_env implics simples h@(Hole { hole_sort = ExprHole _
; traceTc "findingValidHoleFitsFor }" empty
; return (tidy_env, vMsg $$ refMsg) }
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.
hole_fvs :: FV
hole_fvs = tyCoFVsOfType hole_ty
=====================================
compiler/GHC/Tc/Gen/App.hs
=====================================
@@ -196,7 +196,7 @@ tcApp works like this:
The "list of arguments" is [HsExprArg], described in Note [HsExprArg].
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
There are special cases for
HsVar, HsRecFld, and ExprWithTySig
@@ -588,7 +588,7 @@ Consider (#15859)
data A k :: k -> Type -- A :: 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
KindOf at type (forall k -> k -> Type), so
=====================================
compiler/GHC/Tc/Gen/Export.hs
=====================================
@@ -579,7 +579,7 @@ lookupChildrenExport spec_parent rdr_items =
--
-- 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
-- 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)
=====================================
compiler/GHC/Tc/Gen/Head.hs
=====================================
@@ -326,7 +326,7 @@ tcInferAppHead :: HsExpr GhcRn
-- See Note [Application chains and heads] in GHC.Tc.Gen.App
-- We get back a /SigmaType/ because we have special cases for
-- * 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)
-- See Note [Application chains and heads] in GHC.Tc.Gen.App
--
=====================================
compiler/GHC/Tc/Instance/Class.hs
=====================================
@@ -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
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:
* class KnownSymbol
=====================================
compiler/GHC/Tc/Module.hs
=====================================
@@ -301,7 +301,7 @@ tcRnModuleTcRnM hsc_env mod_sum
tcg_env <- return (tcg_env
{ tcg_doc_hdr = maybe_doc_hdr })
; -- 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
-- inferred type
reportUnusedNames tcg_env hsc_src
=====================================
compiler/GHC/Tc/Solver/Interact.hs
=====================================
@@ -2606,7 +2606,7 @@ because many good things flow from [W] t1 ~# t2.
The same reasoning applies to
-* (~~) heqTyCOn
+* (~~) heqTyCon
* (~) eqTyCon
* Coercible coercibleTyCon
=====================================
compiler/GHC/ThToHs.hs
=====================================
@@ -1689,7 +1689,7 @@ points so that the code is readable with its original meaning.
So scattered through "GHC.ThToHs" are various points where parens are added.
-See (among other closed issued) https://gitlab.haskell.org/ghc/ghc/issues/14289
+See (among other closed issues) https://gitlab.haskell.org/ghc/ghc/issues/14289
-}
-- ---------------------------------------------------------------------
=====================================
compiler/GHC/Types/Id/Make.hs
=====================================
@@ -1564,7 +1564,7 @@ Note [seqId magic]
a) Its fixity is set in GHC.Iface.Load.ghcPrimIface
b) It has quite a bit of desugaring magic.
- See GHC.HsToCore.Utils Note [Desugaring seq (1)] and (2) and (3)
+ See GHC.HsToCore.Utils Note [Desugaring seq] (1) and (2) and (3)
c) There is some special rule handing: Note [User-defined RULES for seq]
@@ -1748,7 +1748,7 @@ definition in Core. The rewrite rule works as follows:
f (x `cast` co a) y
The `co` coercion is the newtype-coercion extracted from the type-class.
-The type class is obtain by looking at the type of wrap.
+The type class is obtained by looking at the type of wrap.
-------------------------------------------------------------
=====================================
docs/users_guide/flags.py
=====================================
@@ -257,7 +257,7 @@ class LanguageExtension(GenericFlag):
@staticmethod
def _noname(name):
# We check isupper() so that NondecreasingIndentation
- # is not counted as "No-decreasingIndentation"
+ # is not counted as "No-ndecreasingIndentation"
if name[:2] == "No" and name[2].isupper():
return name[2:]
else:
=====================================
libraries/base/GHC/Conc/Sync.hs
=====================================
@@ -497,7 +497,7 @@ labelThread (ThreadId t) str =
case labelThread# t p s of s1 -> (# s1, () #)
-- Nota Bene: 'pseq' used to be 'seq'
--- but 'seq' is now defined in PrelGHC
+-- but 'seq' is now defined in GHC.Prim
--
-- "pseq" is defined a bit weirdly (see below)
--
=====================================
libraries/base/GHC/TypeNats.hs
=====================================
@@ -82,7 +82,7 @@ someNatVal n = withSNat SomeNat (SNat n) Proxy
{- Note [NOINLINE someNatVal]
`someNatVal` converts a natural number to an existentially quantified
-dictionary for `KnowNat` (aka `SomeNat`). The existential quantification
+dictionary for `KnownNat` (aka `SomeNat`). The existential quantification
is very important, as it captures the fact that we don't know the type
statically, although we do know that it exists. Because this type is
fully opaque, we should never be able to prove that it matches anything else.
=====================================
libraries/base/Unsafe/Coerce.hs
=====================================
@@ -277,7 +277,7 @@ unsafeEqualityProof = case unsafeEqualityProof @a @b of UnsafeRefl -> UnsafeRefl
-- are the same -- but the proof of that relies on the complex, trusted
-- implementation of @Typeable at .
--
--- 4. The "reflection trick", which takes advantanage of the fact that in
+-- 4. The "reflection trick", which takes advantage of the fact that in
-- @class C a where { op :: ty }@, we can safely coerce between @C a@ and @ty@
-- (which have different kinds!) because it's really just a newtype.
-- Note: there is /no guarantee, at all/ that this behavior will be supported
=====================================
libraries/ghc-prim/GHC/Prim/Ext.hs
=====================================
@@ -10,7 +10,7 @@
#include "MachDeps.h"
-- See note [When do out-of-line primops go in primops.txt.pp]. More primops
--- there are elgible according to the description below, but cannot yet be moved
+-- there are eligible according to the description below, but cannot yet be moved
-- here because of superficial restrictions to `foreign import prim`. Hopefully
-- that is fixed soon.
=====================================
testsuite/tests/typecheck/should_fail/T18357b.hs
=====================================
@@ -10,4 +10,4 @@ newtype T :: Type where
MkT :: Int -> (T :: Star)
-- The error message is pretty terrible
--- but it probably nevery happens in practice
+-- but it probably never happens in practice
=====================================
utils/genprimopcode/Main.hs
=====================================
@@ -274,7 +274,7 @@ gen_hs_source (Info defaults entries) =
-- with Declaration for $fEqMaybe:
-- attempting to use module ‘GHC.Classes’
-- (libraries/ghc-prim/./GHC/Classes.hs) which is not loaded
- -- coming from GHC.IFace.Load.homeModError
+ -- coming from GHC.Iface.Load.homeModError
-- I'm not sure precisely why; but I *am* sure that we don't need
-- any type-class defaulting; and it's clearly wrong to need
-- the base package when haddocking ghc-prim
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a9ae83af9e0cf48e860f2b7e1d50a057cb8a7890
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a9ae83af9e0cf48e860f2b7e1d50a057cb8a7890
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201002/ebac142a/attachment-0001.html>
More information about the ghc-commits
mailing list