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

Fix more typos, via an improved Levenshtein-style corrector

parent 350e2b78
Pipeline #14485 failed with stages
in 475 minutes
...@@ -1994,7 +1994,7 @@ case "$1" in ...@@ -1994,7 +1994,7 @@ case "$1" in
# GHC_LLVM_TARGET(target_cpu, target_vendor, target_os, llvm_target_var) # 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], [ AC_DEFUN([GHC_LLVM_TARGET], [
case "$2-$3" in case "$2-$3" in
*-freebsd*-gnueabihf) *-freebsd*-gnueabihf)
...@@ -2238,7 +2238,7 @@ EOF ...@@ -2238,7 +2238,7 @@ EOF
# FIND_GHC_BOOTSTRAP_PROG() # 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. # like the `llc` and `opt` commands.
# #
# $1 = the variable to set # $1 = the variable to set
......
...@@ -723,7 +723,7 @@ mkTopStgRhs dflags this_mod ccs bndr rhs ...@@ -723,7 +723,7 @@ mkTopStgRhs dflags this_mod ccs bndr rhs
(_, all_cafs_ccs) = getAllCAFsCC this_mod (_, all_cafs_ccs) = getAllCAFsCC this_mod
-- Generate a non-top-level RHS. Cost-centre is always currentCCS, -- 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 :: Id -> StgExpr -> StgRhs
mkStgRhs bndr rhs mkStgRhs bndr rhs
| StgLam bndrs body <- rhs | StgLam bndrs body <- rhs
...@@ -837,7 +837,7 @@ data LetInfo ...@@ -837,7 +837,7 @@ data LetInfo
-- For a let(rec)-bound variable, x, we record LiveInfo, the set of -- For a let(rec)-bound variable, x, we record LiveInfo, the set of
-- variables that are live if x is live. This LiveInfo comprises -- variables that are live if x is live. This LiveInfo comprises
-- (a) dynamic live variables (ones with a non-top-level binding) -- (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 -- 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 -- 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 ...@@ -345,7 +345,7 @@ type instance XXHsBindsLR (GhcPass pL) (GhcPass pR) = NoExtCon
-- --
-- See Note [AbsBinds] -- See Note [AbsBinds]
-- | Abtraction Bindings Export -- | Abstraction Bindings Export
data ABExport p data ABExport p
= ABE { abe_ext :: XABE p = ABE { abe_ext :: XABE p
, abe_poly :: IdP p -- ^ Any INLINE pragma is attached to this Id , abe_poly :: IdP p -- ^ Any INLINE pragma is attached to this Id
...@@ -562,7 +562,7 @@ again we can desugar without a let: ...@@ -562,7 +562,7 @@ again we can desugar without a let:
undef = /\ a. \ (d:HasCallStack) -> error a d "undef" undef = /\ a. \ (d:HasCallStack) -> error a d "undef"
The abs_sig field supports this direct desugaring, with no local 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 * the abs_binds is single FunBind
......
...@@ -907,7 +907,7 @@ Invariants ...@@ -907,7 +907,7 @@ Invariants
depend on group_tyclds, or on earlier TyClGroups, but not on later depend on group_tyclds, or on earlier TyClGroups, but not on later
ones. 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. in GHC.Rename.Source for more info.
-} -}
...@@ -1189,7 +1189,7 @@ data HsDataDefn pass -- The payload of a data type defn ...@@ -1189,7 +1189,7 @@ data HsDataDefn pass -- The payload of a data type defn
-- For @data T a where { T1 :: T a }@ -- For @data T a where { T1 :: T a }@
-- the 'LConDecls' all have 'ConDeclGADT'. -- 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 -- For details on above see note [Api annotations] in ApiAnnotation
} }
...@@ -1412,7 +1412,7 @@ There's a wrinkle in ConDeclGADT ...@@ -1412,7 +1412,7 @@ There's a wrinkle in ConDeclGADT
con_args = PrefixCon [] con_args = PrefixCon []
con_res_ty = a :*: (b -> (a :*: (b -> (a :+: b)))) 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 operator fixities are sorted. So we generate. So we end
up with up with
con_args = PrefixCon [ a :*: b, a :*: b ] con_args = PrefixCon [ a :*: b, a :*: b ]
......
...@@ -674,7 +674,7 @@ data HsType pass ...@@ -674,7 +674,7 @@ data HsType pass
| HsExplicitListTy -- A promoted explicit list | HsExplicitListTy -- A promoted explicit list
(XExplicitListTy pass) (XExplicitListTy pass)
PromotionFlag -- whether explcitly promoted, for pretty printer PromotionFlag -- whether explicitly promoted, for pretty printer
[LHsType pass] [LHsType pass]
-- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'["@, -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'["@,
-- 'ApiAnnotation.AnnClose' @']'@ -- 'ApiAnnotation.AnnClose' @']'@
...@@ -888,7 +888,7 @@ type LConDeclField pass = Located (ConDeclField pass) ...@@ -888,7 +888,7 @@ type LConDeclField pass = Located (ConDeclField pass)
-- For details on above see note [Api annotations] in ApiAnnotation -- For details on above see note [Api annotations] in ApiAnnotation
-- | Constructor Declaration Field -- | 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, = ConDeclField { cd_fld_ext :: XConDeclField pass,
cd_fld_names :: [LFieldOcc pass], cd_fld_names :: [LFieldOcc pass],
-- ^ See Note [ConDeclField passs] -- ^ See Note [ConDeclField passs]
...@@ -958,7 +958,7 @@ gives ...@@ -958,7 +958,7 @@ gives
hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name] hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
-- Get the lexically-scoped type variables of a HsSigType -- Get the lexically-scoped type variables of a HsSigType
-- - the explicitly-given forall'd type variables -- - 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 -- because they scope in the same way
hsWcScopedTvs sig_ty hsWcScopedTvs sig_ty
| HsWC { hswc_ext = nwcs, hswc_body = sig_ty1 } <- sig_ty | HsWC { hswc_ext = nwcs, hswc_body = sig_ty1 } <- sig_ty
......
...@@ -551,7 +551,7 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup ...@@ -551,7 +551,7 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup
-- #big_tuples# -- #big_tuples#
-- --
-- GHCs built in tuples can only go up to 'mAX_TUPLE_SIZE' in arity, but -- 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). -- output of a desugaring stage (notably that for list comprehensions).
-- --
-- We call tuples above this size \"big tuples\", and emulate them by -- We call tuples above this size \"big tuples\", and emulate them by
...@@ -566,7 +566,7 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup ...@@ -566,7 +566,7 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup
-- and 'mkTupleCase' functions to do all your work with tuples you should be -- 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. -- 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' mkChunkified :: ([a] -> a) -- ^ \"Small\" constructor function, of maximum input arity 'mAX_TUPLE_SIZE'
-> [a] -- ^ Possible \"big\" list of things to construct from -> [a] -- ^ Possible \"big\" list of things to construct from
-> a -- ^ Constructed thing made possible by recursive decomposition -> a -- ^ Constructed thing made possible by recursive decomposition
......
...@@ -83,7 +83,7 @@ import Data.Ord (comparing) ...@@ -83,7 +83,7 @@ import Data.Ord (comparing)
import qualified Data.Semigroup as Semigroup import qualified Data.Semigroup as Semigroup
import Data.Tuple (swap) import Data.Tuple (swap)
-- Debugging Infrastructre -- Debugging Infrastructure
tracePm :: String -> SDoc -> DsM () tracePm :: String -> SDoc -> DsM ()
tracePm herald doc = do tracePm herald doc = do
...@@ -142,7 +142,7 @@ mkOneConFull arg_tys con = 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 ()) -- pprTrace "mkOneConFull" (ppr con $$ ppr arg_tys $$ ppr univ_tvs $$ ppr _con_res_ty) (return ())
-- Substitute universals for type arguments -- Substitute universals for type arguments
let subst_univ = zipTvSubst univ_tvs arg_tys 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. -- important for instantiating the Thetas and field types.
(subst, _) <- cloneTyVarBndrs subst_univ ex_tvs <$> getUniqueSupplyM (subst, _) <- cloneTyVarBndrs subst_univ ex_tvs <$> getUniqueSupplyM
let field_tys' = substTys subst field_tys let field_tys' = substTys subst field_tys
...@@ -175,7 +175,7 @@ Consider the following code (see #12957 and #15450): ...@@ -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 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/! 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 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. unreachable.
We decide to better than this. When beginning coverage checking, we first 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 -> ...@@ -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', 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 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 '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 ~ Just y@, @x /~ [Just]@. 'eqPmAltCon' returns @Equal@, so refute.
* @x ~ Nothing@, @x /~ [Just]@. 'eqPmAltCon' returns @Disjoint@, so negative * @x ~ Nothing@, @x /~ [Just]@. 'eqPmAltCon' returns @Disjoint@, so negative
info is redundant and should be discarded. info is redundant and should be discarded.
...@@ -934,7 +934,7 @@ guessConLikeUnivTyArgsFromResTy _ res_ty (PatSynCon ps) = do ...@@ -934,7 +934,7 @@ guessConLikeUnivTyArgsFromResTy _ res_ty (PatSynCon ps) = do
subst <- tcMatchTy con_res_ty res_ty subst <- tcMatchTy con_res_ty res_ty
traverse (lookupTyVar subst) univ_tvs 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 -- 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. -- in a follow-up patch. The status quo should work good enough for now.
addVarNonVoidCt :: Delta -> Id -> MaybeT DsM Delta addVarNonVoidCt :: Delta -> Id -> MaybeT DsM Delta
...@@ -1340,7 +1340,7 @@ determine whether a strict type is inhabitable by a terminating value or not. ...@@ -1340,7 +1340,7 @@ determine whether a strict type is inhabitable by a terminating value or not.
`nonVoid ty` returns True when either: `nonVoid ty` returns True when either:
1. `ty` has at least one InhabitationCandidate for which both its term and type 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. strict argument types in that InhabitationCandidate.
2. We're unsure if it's inhabited by a terminating value. 2. We're unsure if it's inhabited by a terminating value.
......
...@@ -304,7 +304,7 @@ concatM :: Monad m => [m [a]] -> m [a] ...@@ -304,7 +304,7 @@ concatM :: Monad m => [m [a]] -> m [a]
concatM xs = concat <$> sequence xs concatM xs = concat <$> sequence xs
{- Note [Capturing Scopes and other non local information] {- 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. 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 We use the following types (*Context and *Scoped) to wrap things and
carry the required info carry the required info
...@@ -479,7 +479,7 @@ instance HasLoc (HsDataDefn GhcRn) where ...@@ -479,7 +479,7 @@ instance HasLoc (HsDataDefn GhcRn) where
loc _ = noSrcSpan loc _ = noSrcSpan
{- Note [Real DataCon Name] {- 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 this showing up in the hieFile, so we replace the name in the Id with the
original datacon name original datacon name
See also Note [Data Constructor Naming] See also Note [Data Constructor Naming]
......
...@@ -406,7 +406,7 @@ lookupConstructorFields :: Name -> RnM [FieldLabel] ...@@ -406,7 +406,7 @@ lookupConstructorFields :: Name -> RnM [FieldLabel]
-- data type decls -- data type decls
-- --
-- * For constructors from imported modules, use the *type* environment -- * 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 -- right there
lookupConstructorFields con_name lookupConstructorFields con_name
......
...@@ -70,7 +70,7 @@ type MiniFixityEnv = FastStringEnv (Located Fixity) ...@@ -70,7 +70,7 @@ type MiniFixityEnv = FastStringEnv (Located Fixity)
-- --
-- It is keyed by the *FastString*, not the *OccName*, because -- It is keyed by the *FastString*, not the *OccName*, because
-- the single fixity decl infix 3 T -- 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 -- We keep the location so that if we find
-- a duplicate, we can report it sensibly -- a duplicate, we can report it sensibly
...@@ -181,7 +181,7 @@ lookupTyFixityRn :: Located Name -> RnM Fixity ...@@ -181,7 +181,7 @@ lookupTyFixityRn :: Located Name -> RnM Fixity
lookupTyFixityRn = lookupFixityRn . unLoc lookupTyFixityRn = lookupFixityRn . unLoc
-- | Look up the fixity of a (possibly ambiguous) occurrence of a record field -- | 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 -- the field label, which might be different to the 'OccName' of the selector
-- 'Name' if @DuplicateRecordFields@ is in use (#1173). If there are -- 'Name' if @DuplicateRecordFields@ is in use (#1173). If there are
-- multiple possible selectors with different fixities, generate an error. -- multiple possible selectors with different fixities, generate an error.
......
...@@ -93,7 +93,7 @@ graph. So we can just worry mostly about direct imports. ...@@ -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 There is one trust property that can change for a package though without
recompilation being triggered: package trust. So we must check that all 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 we are compiling this module (as due to recompilation avoidance some modules
below may not be considered trusted any more without recompilation being below may not be considered trusted any more without recompilation being
triggered). triggered).
...@@ -406,7 +406,7 @@ calculateAvails dflags iface mod_safe' want_boot imported_by = ...@@ -406,7 +406,7 @@ calculateAvails dflags iface mod_safe' want_boot imported_by =
-- reported. Easiest thing is just to filter them out up -- reported. Easiest thing is just to filter them out up
-- front. This situation only arises if a module imports -- front. This situation only arises if a module imports
-- itself, or another module that imported it. (Necessarily, -- 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 -- We do this *after* filterImports, so that if you say
-- module A where -- module A where
...@@ -1510,7 +1510,7 @@ decls, and simply trim their import lists. NB that ...@@ -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* 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 from it. Instead we just trim to an empty import list
-} -}
......
...@@ -700,7 +700,7 @@ rnFamInstEqn doc atfi rhs_kvars ...@@ -700,7 +700,7 @@ rnFamInstEqn doc atfi rhs_kvars
-- bound in the type patterns. -- bound in the type patterns.
; payload_kvar_names <- mapM (newTyVarNameRn mb_cls) payload_kvars ; 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 ; let all_imp_var_names = imp_var_names ++ payload_kvar_names
-- All the free vars of the family patterns -- All the free vars of the family patterns
...@@ -768,7 +768,7 @@ rnTyFamInstDecl atfi (TyFamInstDecl { tfid_eqn = eqn }) ...@@ -768,7 +768,7 @@ rnTyFamInstDecl atfi (TyFamInstDecl { tfid_eqn = eqn })
-- 1. A type family equation that is not associated -- 1. A type family equation that is not associated
-- with a parent type class ('NonAssocTyFamEqn') -- 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') -- 3. An associated type family instance declaration ('AssocTyFamInst')
data AssocTyFamInfo data AssocTyFamInfo
......
...@@ -658,7 +658,7 @@ rnTyVar env rdr_name ...@@ -658,7 +658,7 @@ rnTyVar env rdr_name
; return name } ; return name }
rnLTyVar :: Located RdrName -> RnM (Located 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) rnLTyVar (L loc rdr_name)
= do { tyvar <- lookupTypeOccRn rdr_name = do { tyvar <- lookupTypeOccRn rdr_name
; return (L loc tyvar) } ; return (L loc tyvar) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
(c) The University of Glasgow 2006 (c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1997-1998 (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 This module defines a miscellaneously collection of very simple
types that types that
...@@ -970,8 +970,8 @@ data InterestingCxt ...@@ -970,8 +970,8 @@ data InterestingCxt
| NotInteresting | NotInteresting
deriving (Eq) deriving (Eq)
-- | If there is any 'interesting' identifier occurance, then the -- | If there is any 'interesting' identifier occurrence, then the
-- aggregated occurance info of that identifier is considered interesting. -- aggregated occurrence info of that identifier is considered interesting.
instance Semi.Semigroup InterestingCxt where instance Semi.Semigroup InterestingCxt where
NotInteresting <> x = x NotInteresting <> x = x
IsInteresting <> _ = IsInteresting IsInteresting <> _ = IsInteresting
...@@ -990,8 +990,8 @@ data InsideLam ...@@ -990,8 +990,8 @@ data InsideLam
| NotInsideLam | NotInsideLam
deriving (Eq) deriving (Eq)
-- | If any occurance of an identifier is inside a lambda, then the -- | If any occurrence of an identifier is inside a lambda, then the
-- occurance info of that identifier marks it as occuring inside a lambda -- occurrence info of that identifier marks it as occurring inside a lambda
instance Semi.Semigroup InsideLam where instance Semi.Semigroup InsideLam where
NotInsideLam <> x = x NotInsideLam <> x = x
IsInsideLam <> _ = IsInsideLam IsInsideLam <> _ = IsInsideLam
...@@ -1003,7 +1003,7 @@ instance Monoid InsideLam where ...@@ -1003,7 +1003,7 @@ instance Monoid InsideLam where
----------------- -----------------
data OneBranch data OneBranch
= InOneBranch = 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 -- so no code-duplication issue to worry about
| MultipleBranches | MultipleBranches
deriving (Eq) deriving (Eq)
......
...@@ -526,7 +526,7 @@ This too would get <Str, Used>, but this time there really isn't any ...@@ -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. 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 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. little bit of boxity analysis. Not very nice.
Note [Used should win] Note [Used should win]
...@@ -700,7 +700,7 @@ cleanEvalProdDmd n = JD { sd = HeadStr, ud = UProd (replicate n useTop) } ...@@ -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 ...@@ -1089,7 +1089,7 @@ For a
The CPR information, though, is valid after the number of arguments mentioned 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 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 Consider
b2 x y = x `seq` y `seq` error (show x) b2 x y = x `seq` y `seq` error (show x)
...@@ -1128,7 +1128,7 @@ We ...@@ -1128,7 +1128,7 @@ We
3. combine the termination results, but 3. combine the termination results, but
4. take CPR info from the first argument. 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 -- Equality needed for fixpoints in DmdAnal
...@@ -1444,7 +1444,7 @@ Note [Default demand on free variables] ...@@ -1444,7 +1444,7 @@ Note [Default demand on free variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the variable is not mentioned in the environment of a demand type, 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. 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 if the result demand is a Diverges, then we use HyperStr
else we use Lazy else we use Lazy
For the usage component, we use Absent. For the usage component, we use Absent.
......
...@@ -250,7 +250,7 @@ data IdInfo ...@@ -250,7 +250,7 @@ data IdInfo
oneShotInfo :: OneShotInfo, oneShotInfo :: OneShotInfo,
-- ^ Info about a lambda-bound variable, if the 'Id' is one -- ^ Info about a lambda-bound variable, if the 'Id' is one
inlinePragInfo :: InlinePragma, inlinePragInfo :: InlinePragma,
-- ^ Any inline pragma atached to the 'Id' -- ^ Any inline pragma attached to the 'Id'
occInfo :: OccInfo, occInfo :: OccInfo,
-- ^ How the 'Id' occurs in the program -- ^ How the 'Id' occurs in the program
strictnessInfo :: StrictSig, strictnessInfo :: StrictSig,
...@@ -425,7 +425,7 @@ data RuleInfo ...@@ -425,7 +425,7 @@ data RuleInfo
-- ru_fn though. -- ru_fn though.
-- Note [Rule dependency info] in OccurAnal -- Note [Rule dependency info] in OccurAnal
-- | Assume that no specilizations exist: always safe -- | Assume that no specializations exist: always safe
emptyRuleInfo :: RuleInfo emptyRuleInfo :: RuleInfo
emptyRuleInfo = RuleInfo [] emptyDVarSet emptyRuleInfo = RuleInfo [] emptyDVarSet
......
...@@ -831,7 +831,7 @@ Here are the moving parts: ...@@ -831,7 +831,7 @@ Here are the moving parts:
* We define LitRubbish as a constructor in Literal.Literal * 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 * WwLib.mk_absent_let introduces a LitRubbish for absent
arguments of boxed, unlifted type. arguments of boxed, unlifted type.
...@@ -842,7 +842,7 @@ Here are the moving parts: ...@@ -842,7 +842,7 @@ Here are the moving parts:
which the garbage collector can follow if it encounters it. which the garbage collector can follow if it encounters it.
We considered maintaining LitRubbish in STG, and lowering 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. once and for all in CoreToSTG.
In ByteCodeAsm we just lower it as a 0 literal, because In ByteCodeAsm we just lower it as a 0 literal, because
......
...@@ -1178,7 +1178,7 @@ wrapNewTypeBody tycon args result_expr ...@@ -1178,7 +1178,7 @@ wrapNewTypeBody tycon args result_expr
-- When unwrapping, we do *not* apply any family coercion, because this will -- 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 -- 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 -- 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 -> [Type] -> CoreExpr -> CoreExpr
unwrapNewTypeBody tycon args result_expr unwrapNewTypeBody tycon args result_expr
......
...@@ -1068,7 +1068,7 @@ versions of them installed. To the user, everything looks normal. ...@@ -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 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 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. *unversioned* 'UnitId', including in .hi files and object file symbols.
Unselected versions of wired-in packages will be ignored, as will any other Unselected versions of wired-in packages will be ignored, as will any other
......
...@@ -452,7 +452,7 @@ type GlobalRdrEnv = OccEnv [GlobalRdrElt] ...@@ -452,7 +452,7 @@ type GlobalRdrEnv = OccEnv [GlobalRdrElt]
-- --
-- NB: greOccName gre is usually the same as -- NB: greOccName gre is usually the same as
-- nameOccName (gre_name gre), but not always in the -- nameOccName (gre_name gre), but not always in the
-- case of record seectors; see greOccName -- case of record selectors; see greOccName
-- | Global Reader Element -- | Global Reader Element
-- --
...@@ -509,7 +509,7 @@ gre_lcl is True, or gre_imp is non-empty. ...@@ -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 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 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 A.hs-boot module A where
data T data T
......
...@@ -803,7 +803,7 @@ maybeLocalBlockLabel _ = Nothing ...@@ -803,7 +803,7 @@ maybeLocalBlockLabel _ = Nothing
-- | Check whether a label corresponds to a C function that has -- | Check whether a label corresponds to a C function that has
-- a prototype in a system header somehere, or is built-in -- a prototype in a system header somewhere, or is built-in
-- to the C compiler. For these labels we avoid generating our -- to the C compiler. For these labels we avoid generating our
-- own C prototypes. -- own C prototypes.
isMathFun :: CLabel -> Bool isMathFun :: CLabel -> Bool
...@@ -1474,7 +1474,7 @@ mayRedirectTo symbol target ...@@ -1474,7 +1474,7 @@ mayRedirectTo symbol target
{- {-
Note [emit-time elimination of static indirections] Note [emit-time elimination of static indirections]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As described in #15155, certain static values are repesentationally As described in #15155, certain static values are representationally
equivalent, e.g. 'cast'ed values (when created by 'newtype' wrappers). equivalent, e.g. 'cast'ed values (when created by 'newtype' wrappers).
newtype A = A Int newtype A = A Int
......
...@@ -324,7 +324,7 @@ targetSupportsSwitch _ = False ...@@ -324,7 +324,7 @@ targetSupportsSwitch _ = False
-- | This function creates a SwitchPlan from a SwitchTargets value, breaking it -- | This function creates a SwitchPlan from a SwitchTargets value, breaking it
-- down into smaller pieces suitable for code generation.