Commit 0b5ddc7f authored by Brian Wignall's avatar Brian Wignall Committed by Marge Bot
Browse files

Fix more typos, via an improved Levenshtein-style corrector

parent 350e2b78
......@@ -1994,7 +1994,7 @@ case "$1" in
# GHC_LLVM_TARGET(target_cpu, target_vendor, target_os, llvm_target_var)
# --------------------------------
# converts the canonicalized target into someting llvm can understand
# converts the canonicalized target into something llvm can understand
AC_DEFUN([GHC_LLVM_TARGET], [
case "$2-$3" in
*-freebsd*-gnueabihf)
......@@ -2238,7 +2238,7 @@ EOF
# FIND_GHC_BOOTSTRAP_PROG()
# --------------------------------
# Parse the bootstrap GHC's compier settings file for the location of things
# Parse the bootstrap GHC's compiler settings file for the location of things
# like the `llc` and `opt` commands.
#
# $1 = the variable to set
......
......@@ -723,7 +723,7 @@ mkTopStgRhs dflags this_mod ccs bndr rhs
(_, all_cafs_ccs) = getAllCAFsCC this_mod
-- Generate a non-top-level RHS. Cost-centre is always currentCCS,
-- see Note [Cost-centre initialzation plan].
-- see Note [Cost-centre initialization plan].
mkStgRhs :: Id -> StgExpr -> StgRhs
mkStgRhs bndr rhs
| StgLam bndrs body <- rhs
......@@ -837,7 +837,7 @@ data LetInfo
-- For a let(rec)-bound variable, x, we record LiveInfo, the set of
-- variables that are live if x is live. This LiveInfo comprises
-- (a) dynamic live variables (ones with a non-top-level binding)
-- (b) static live variabes (CAFs or things that refer to CAFs)
-- (b) static live variables (CAFs or things that refer to CAFs)
--
-- For "normal" variables (a) is just x alone. If x is a let-no-escaped
-- variable then x is represented by a code pointer and a stack pointer
......
......@@ -345,7 +345,7 @@ type instance XXHsBindsLR (GhcPass pL) (GhcPass pR) = NoExtCon
--
-- See Note [AbsBinds]
-- | Abtraction Bindings Export
-- | Abstraction Bindings Export
data ABExport p
= ABE { abe_ext :: XABE p
, abe_poly :: IdP p -- ^ Any INLINE pragma is attached to this Id
......@@ -562,7 +562,7 @@ again we can desugar without a let:
undef = /\ a. \ (d:HasCallStack) -> error a d "undef"
The abs_sig field supports this direct desugaring, with no local
let-bining. When abs_sig = True
let-binding. When abs_sig = True
* the abs_binds is single FunBind
......
......@@ -907,7 +907,7 @@ Invariants
depend on group_tyclds, or on earlier TyClGroups, but not on later
ones.
See Note [Dependency analsis of type, class, and instance decls]
See Note [Dependency analysis of type, class, and instance decls]
in GHC.Rename.Source for more info.
-}
......@@ -1189,7 +1189,7 @@ data HsDataDefn pass -- The payload of a data type defn
-- For @data T a where { T1 :: T a }@
-- the 'LConDecls' all have 'ConDeclGADT'.
dd_derivs :: HsDeriving pass -- ^ Optional 'deriving' claues
dd_derivs :: HsDeriving pass -- ^ Optional 'deriving' clause
-- For details on above see note [Api annotations] in ApiAnnotation
}
......@@ -1412,7 +1412,7 @@ There's a wrinkle in ConDeclGADT
con_args = PrefixCon []
con_res_ty = a :*: (b -> (a :*: (b -> (a :+: b))))
- In the renamer (GHC.Rename.Source.rnConDecl), we unravel it afer
- In the renamer (GHC.Rename.Source.rnConDecl), we unravel it after
operator fixities are sorted. So we generate. So we end
up with
con_args = PrefixCon [ a :*: b, a :*: b ]
......
......@@ -674,7 +674,7 @@ data HsType pass
| HsExplicitListTy -- A promoted explicit list
(XExplicitListTy pass)
PromotionFlag -- whether explcitly promoted, for pretty printer
PromotionFlag -- whether explicitly promoted, for pretty printer
[LHsType pass]
-- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'["@,
-- 'ApiAnnotation.AnnClose' @']'@
......@@ -888,7 +888,7 @@ type LConDeclField pass = Located (ConDeclField pass)
-- For details on above see note [Api annotations] in ApiAnnotation
-- | Constructor Declaration Field
data ConDeclField pass -- Record fields have Haddoc docs on them
data ConDeclField pass -- Record fields have Haddock docs on them
= ConDeclField { cd_fld_ext :: XConDeclField pass,
cd_fld_names :: [LFieldOcc pass],
-- ^ See Note [ConDeclField passs]
......@@ -958,7 +958,7 @@ gives
hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
-- Get the lexically-scoped type variables of a HsSigType
-- - the explicitly-given forall'd type variables
-- - the named wildcars; see Note [Scoping of named wildcards]
-- - the named wildcards; see Note [Scoping of named wildcards]
-- because they scope in the same way
hsWcScopedTvs sig_ty
| HsWC { hswc_ext = nwcs, hswc_body = sig_ty1 } <- sig_ty
......
......@@ -551,7 +551,7 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup
-- #big_tuples#
--
-- GHCs built in tuples can only go up to 'mAX_TUPLE_SIZE' in arity, but
-- we might concievably want to build such a massive tuple as part of the
-- we might conceivably want to build such a massive tuple as part of the
-- output of a desugaring stage (notably that for list comprehensions).
--
-- We call tuples above this size \"big tuples\", and emulate them by
......@@ -566,7 +566,7 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup
-- and 'mkTupleCase' functions to do all your work with tuples you should be
-- fine, and not have to worry about the arity limitation at all.
-- | Lifts a \"small\" constructor into a \"big\" constructor by recursive decompositon
-- | Lifts a \"small\" constructor into a \"big\" constructor by recursive decomposition
mkChunkified :: ([a] -> a) -- ^ \"Small\" constructor function, of maximum input arity 'mAX_TUPLE_SIZE'
-> [a] -- ^ Possible \"big\" list of things to construct from
-> a -- ^ Constructed thing made possible by recursive decomposition
......
......@@ -83,7 +83,7 @@ import Data.Ord (comparing)
import qualified Data.Semigroup as Semigroup
import Data.Tuple (swap)
-- Debugging Infrastructre
-- Debugging Infrastructure
tracePm :: String -> SDoc -> DsM ()
tracePm herald doc = do
......@@ -142,7 +142,7 @@ mkOneConFull arg_tys con = do
-- pprTrace "mkOneConFull" (ppr con $$ ppr arg_tys $$ ppr univ_tvs $$ ppr _con_res_ty) (return ())
-- Substitute universals for type arguments
let subst_univ = zipTvSubst univ_tvs arg_tys
-- Instantiate fresh existentials as arguments to the contructor. This is
-- Instantiate fresh existentials as arguments to the constructor. This is
-- important for instantiating the Thetas and field types.
(subst, _) <- cloneTyVarBndrs subst_univ ex_tvs <$> getUniqueSupplyM
let field_tys' = substTys subst field_tys
......@@ -175,7 +175,7 @@ Consider the following code (see #12957 and #15450):
We want to warn that the pattern-matching in `f` is non-exhaustive. But GHC
used not to do this; in fact, it would warn that the match was /redundant/!
This is because the constraint (Int ~ Bool) in `f` is unsatisfiable, and the
coverage checker deems any matches with unsatifiable constraint sets to be
coverage checker deems any matches with unsatisfiable constraint sets to be
unreachable.
We decide to better than this. When beginning coverage checking, we first
......@@ -562,7 +562,7 @@ tyIsSatisfiable recheck_complete_sets new_ty_cs = SC $ \delta ->
Invariant applying to each VarInfo: Whenever we have @(C, [y,z])@ in 'vi_pos',
any entry in 'vi_neg' must be incomparable to C (return Nothing) according to
'eqPmAltCons'. Those entries that are comparable either lead to a refutation
or are redudant. Examples:
or are redundant. Examples:
* @x ~ Just y@, @x /~ [Just]@. 'eqPmAltCon' returns @Equal@, so refute.
* @x ~ Nothing@, @x /~ [Just]@. 'eqPmAltCon' returns @Disjoint@, so negative
info is redundant and should be discarded.
......@@ -934,7 +934,7 @@ guessConLikeUnivTyArgsFromResTy _ res_ty (PatSynCon ps) = do
subst <- tcMatchTy con_res_ty res_ty
traverse (lookupTyVar subst) univ_tvs
-- | Kind of tries to add a non-void contraint to 'Delta', but doesn't really
-- | Kind of tries to add a non-void constraint to 'Delta', but doesn't really
-- commit to upholding that constraint in the future. This will be rectified
-- in a follow-up patch. The status quo should work good enough for now.
addVarNonVoidCt :: Delta -> Id -> MaybeT DsM Delta
......@@ -1340,7 +1340,7 @@ determine whether a strict type is inhabitable by a terminating value or not.
`nonVoid ty` returns True when either:
1. `ty` has at least one InhabitationCandidate for which both its term and type
constraints are satifiable, and `nonVoid` returns `True` for all of the
constraints are satisfiable, and `nonVoid` returns `True` for all of the
strict argument types in that InhabitationCandidate.
2. We're unsure if it's inhabited by a terminating value.
......
......@@ -304,7 +304,7 @@ concatM :: Monad m => [m [a]] -> m [a]
concatM xs = concat <$> sequence xs
{- Note [Capturing Scopes and other non local information]
toHie is a local tranformation, but scopes of bindings cannot be known locally,
toHie is a local transformation, but scopes of bindings cannot be known locally,
hence we have to push the relevant info down into the binding nodes.
We use the following types (*Context and *Scoped) to wrap things and
carry the required info
......@@ -479,7 +479,7 @@ instance HasLoc (HsDataDefn GhcRn) where
loc _ = noSrcSpan
{- Note [Real DataCon Name]
The typechecker subtitutes the conLikeWrapId for the name, but we don't want
The typechecker substitutes the conLikeWrapId for the name, but we don't want
this showing up in the hieFile, so we replace the name in the Id with the
original datacon name
See also Note [Data Constructor Naming]
......
......@@ -406,7 +406,7 @@ lookupConstructorFields :: Name -> RnM [FieldLabel]
-- data type decls
--
-- * For constructors from imported modules, use the *type* environment
-- since imported modles are already compiled, the info is conveniently
-- since imported modules are already compiled, the info is conveniently
-- right there
lookupConstructorFields con_name
......
......@@ -70,7 +70,7 @@ type MiniFixityEnv = FastStringEnv (Located Fixity)
--
-- It is keyed by the *FastString*, not the *OccName*, because
-- the single fixity decl infix 3 T
-- affects both the data constructor T and the type constrctor T
-- affects both the data constructor T and the type constructor T
--
-- We keep the location so that if we find
-- a duplicate, we can report it sensibly
......@@ -181,7 +181,7 @@ lookupTyFixityRn :: Located Name -> RnM Fixity
lookupTyFixityRn = lookupFixityRn . unLoc
-- | Look up the fixity of a (possibly ambiguous) occurrence of a record field
-- selector. We use 'lookupFixityRn'' so that we can specifiy the 'OccName' as
-- selector. We use 'lookupFixityRn'' so that we can specify the 'OccName' as
-- the field label, which might be different to the 'OccName' of the selector
-- 'Name' if @DuplicateRecordFields@ is in use (#1173). If there are
-- multiple possible selectors with different fixities, generate an error.
......
......@@ -93,7 +93,7 @@ graph. So we can just worry mostly about direct imports.
There is one trust property that can change for a package though without
recompilation being triggered: package trust. So we must check that all
packages a module tranitively depends on to be trusted are still trusted when
packages a module transitively depends on to be trusted are still trusted when
we are compiling this module (as due to recompilation avoidance some modules
below may not be considered trusted any more without recompilation being
triggered).
......@@ -406,7 +406,7 @@ calculateAvails dflags iface mod_safe' want_boot imported_by =
-- reported. Easiest thing is just to filter them out up
-- front. This situation only arises if a module imports
-- itself, or another module that imported it. (Necessarily,
-- this invoves a loop.)
-- this involves a loop.)
--
-- We do this *after* filterImports, so that if you say
-- module A where
......@@ -1510,7 +1510,7 @@ decls, and simply trim their import lists. NB that
* We do *not* change the 'qualified' or 'as' parts!
* We do not disard a decl altogether; we might need instances
* We do not discard a decl altogether; we might need instances
from it. Instead we just trim to an empty import list
-}
......
......@@ -700,7 +700,7 @@ rnFamInstEqn doc atfi rhs_kvars
-- bound in the type patterns.
; payload_kvar_names <- mapM (newTyVarNameRn mb_cls) payload_kvars
-- all names not bound in an explict forall
-- all names not bound in an explicit forall
; let all_imp_var_names = imp_var_names ++ payload_kvar_names
-- All the free vars of the family patterns
......@@ -768,7 +768,7 @@ rnTyFamInstDecl atfi (TyFamInstDecl { tfid_eqn = eqn })
-- 1. A type family equation that is not associated
-- with a parent type class ('NonAssocTyFamEqn')
--
-- 2. An associated type family default delcaration ('AssocTyFamDeflt')
-- 2. An associated type family default declaration ('AssocTyFamDeflt')
--
-- 3. An associated type family instance declaration ('AssocTyFamInst')
data AssocTyFamInfo
......
......@@ -658,7 +658,7 @@ rnTyVar env rdr_name
; return name }
rnLTyVar :: Located RdrName -> RnM (Located Name)
-- Called externally; does not deal with wildards
-- Called externally; does not deal with wildcards
rnLTyVar (L loc rdr_name)
= do { tyvar <- lookupTypeOccRn rdr_name
; return (L loc tyvar) }
......
......@@ -2,7 +2,7 @@
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1997-1998
\section[BasicTypes]{Miscellanous types}
\section[BasicTypes]{Miscellaneous types}
This module defines a miscellaneously collection of very simple
types that
......@@ -970,8 +970,8 @@ data InterestingCxt
| NotInteresting
deriving (Eq)
-- | If there is any 'interesting' identifier occurance, then the
-- aggregated occurance info of that identifier is considered interesting.
-- | If there is any 'interesting' identifier occurrence, then the
-- aggregated occurrence info of that identifier is considered interesting.
instance Semi.Semigroup InterestingCxt where
NotInteresting <> x = x
IsInteresting <> _ = IsInteresting
......@@ -990,8 +990,8 @@ data InsideLam
| NotInsideLam
deriving (Eq)
-- | If any occurance of an identifier is inside a lambda, then the
-- occurance info of that identifier marks it as occuring inside a lambda
-- | If any occurrence of an identifier is inside a lambda, then the
-- occurrence info of that identifier marks it as occurring inside a lambda
instance Semi.Semigroup InsideLam where
NotInsideLam <> x = x
IsInsideLam <> _ = IsInsideLam
......@@ -1003,7 +1003,7 @@ instance Monoid InsideLam where
-----------------
data OneBranch
= InOneBranch
-- ^ One syntactic occurance: Occurs in only one case branch
-- ^ One syntactic occurrence: Occurs in only one case branch
-- so no code-duplication issue to worry about
| MultipleBranches
deriving (Eq)
......
......@@ -526,7 +526,7 @@ This too would get <Str, Used>, but this time there really isn't any
point in w/w since the components of the pair are not used at all.
So the solution is: don't aggressively collapse UProd [Used,Used] to
Used; intead leave it as-is. In effect we are using the UseDmd to do a
Used; instead leave it as-is. In effect we are using the UseDmd to do a
little bit of boxity analysis. Not very nice.
Note [Used should win]
......@@ -700,7 +700,7 @@ cleanEvalProdDmd n = JD { sd = HeadStr, ud = UProd (replicate n useTop) }
{-
************************************************************************
* *
Demand: combining stricness and usage
Demand: combining strictness and usage
* *
************************************************************************
-}
......@@ -1089,7 +1089,7 @@ For a
The CPR information, though, is valid after the number of arguments mentioned
in the type is given. Therefore, when forgetting the demand on arguments, as in
dmdAnalRhs, this needs to be considere (via removeDmdTyArgs).
dmdAnalRhs, this needs to be considered (via removeDmdTyArgs).
Consider
b2 x y = x `seq` y `seq` error (show x)
......@@ -1128,7 +1128,7 @@ We
3. combine the termination results, but
4. take CPR info from the first argument.
3 and 4 are implementd in bothDmdResult.
3 and 4 are implemented in bothDmdResult.
-}
-- Equality needed for fixpoints in DmdAnal
......@@ -1444,7 +1444,7 @@ Note [Default demand on free variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the variable is not mentioned in the environment of a demand type,
its demand is taken to be a result demand of the type.
For the stricness component,
For the strictness component,
if the result demand is a Diverges, then we use HyperStr
else we use Lazy
For the usage component, we use Absent.
......
......@@ -250,7 +250,7 @@ data IdInfo
oneShotInfo :: OneShotInfo,
-- ^ Info about a lambda-bound variable, if the 'Id' is one
inlinePragInfo :: InlinePragma,
-- ^ Any inline pragma atached to the 'Id'
-- ^ Any inline pragma attached to the 'Id'
occInfo :: OccInfo,
-- ^ How the 'Id' occurs in the program
strictnessInfo :: StrictSig,
......@@ -425,7 +425,7 @@ data RuleInfo
-- ru_fn though.
-- Note [Rule dependency info] in OccurAnal
-- | Assume that no specilizations exist: always safe
-- | Assume that no specializations exist: always safe
emptyRuleInfo :: RuleInfo
emptyRuleInfo = RuleInfo [] emptyDVarSet
......
......@@ -831,7 +831,7 @@ Here are the moving parts:
* We define LitRubbish as a constructor in Literal.Literal
* It is given its polymoprhic type by Literal.literalType
* It is given its polymorphic type by Literal.literalType
* WwLib.mk_absent_let introduces a LitRubbish for absent
arguments of boxed, unlifted type.
......@@ -842,7 +842,7 @@ Here are the moving parts:
which the garbage collector can follow if it encounters it.
We considered maintaining LitRubbish in STG, and lowering
it in the code genreators, but it seems simpler to do it
it in the code generators, but it seems simpler to do it
once and for all in CoreToSTG.
In ByteCodeAsm we just lower it as a 0 literal, because
......
......@@ -1178,7 +1178,7 @@ wrapNewTypeBody tycon args result_expr
-- When unwrapping, we do *not* apply any family coercion, because this will
-- be done via a CoPat by the type checker. We have to do it this way as
-- computing the right type arguments for the coercion requires more than just
-- a splitting operation (cf, TcPat.tcConPat).
unwrapNewTypeBody :: TyCon -> [Type] -> CoreExpr -> CoreExpr
unwrapNewTypeBody tycon args result_expr
......
......@@ -1068,7 +1068,7 @@ versions of them installed. To the user, everything looks normal.
However, for each invocation of GHC, only a single instance of each wired-in
package will be recognised (the desired one is selected via
@-package@\/@-hide-package@), and GHC will internall pretend that it has the
@-package@\/@-hide-package@), and GHC will internally pretend that it has the
*unversioned* 'UnitId', including in .hi files and object file symbols.
Unselected versions of wired-in packages will be ignored, as will any other
......
......@@ -452,7 +452,7 @@ type GlobalRdrEnv = OccEnv [GlobalRdrElt]
--
-- NB: greOccName gre is usually the same as
-- nameOccName (gre_name gre), but not always in the
-- case of record seectors; see greOccName
-- case of record selectors; see greOccName
-- | Global Reader Element
--
......@@ -509,7 +509,7 @@ gre_lcl is True, or gre_imp is non-empty.
It is just possible to have *both* if there is a module loop: a Name
is defined locally in A, and also brought into scope by importing a
module that SOURCE-imported A. Exapmle (#7672):
module that SOURCE-imported A. Example (#7672):
A.hs-boot module A where
data T
......
Supports Markdown
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