Skip to content

Commit

Permalink
Verify spelling fixes pass check-spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Jul 31, 2022
2 parents 5a440c4 + 2a4a1f4 commit 28d74f3
Show file tree
Hide file tree
Showing 260 changed files with 894 additions and 894 deletions.
2 changes: 1 addition & 1 deletion compiler/Eta/Backpack/NameShape.hs
Expand Up @@ -150,7 +150,7 @@ ns_module = mkHoleModule . ns_mod_name
-- | Substitution on @{A.T}@. We enforce the invariant that the
-- 'nameModule' of keys of this map have 'moduleUnitId' @hole@
-- (meaning that if we have a hole substitution, the keys of the map
-- are never affected.) Alternately, this is ismorphic to
-- are never affected.) Alternately, this is isomorphic to
-- @Map ('ModuleName', 'OccName') 'Name'@.
type ShNameSubst = NameEnv Name

Expand Down
6 changes: 3 additions & 3 deletions compiler/Eta/BasicTypes/BasicTypes.hs
Expand Up @@ -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
Expand Down Expand Up @@ -343,7 +343,7 @@ Consider
\begin{verbatim}
a `op1` b `op2` c
\end{verbatim}
@(compareFixity op1 op2)@ tells which way to arrange appication, or
@(compareFixity op1 op2)@ tells which way to arrange application, or
whether there's an error.
-}

Expand Down Expand Up @@ -761,7 +761,7 @@ instance Outputable OccInfo where
{-
************************************************************************
* *
Default method specfication
Default method specification
* *
************************************************************************
Expand Down
16 changes: 8 additions & 8 deletions compiler/Eta/BasicTypes/DataCon.hs
Expand Up @@ -181,7 +181,7 @@ Why might the wrapper have anything to do? Two reasons:
The wrapper has the programmer-specified type:
\$wMkT :: a -> T [a]
\$wMkT a x = MkT [a] a [a] x
The third argument is a coerion
The third argument is a coercion
[a] :: [a]~[a]
INVARIANT: the dictionary constructor for a class
Expand Down Expand Up @@ -222,7 +222,7 @@ It's a flaw in the language.
it separately in the type checker on occurrences of a
constructor, either in an expression or in a pattern.
[May 2003: actually I think this decision could evasily be
[May 2003: actually I think this decision could easily be
reversed now, and probably should be. Generics could be
disabled for types with a stupid context; record updates now
(H98) needs the context too; etc. It's an unforced change, so
Expand Down Expand Up @@ -524,7 +524,7 @@ Terminology:
Note [Data con representation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The dcRepType field contains the type of the representation of a contructor
The dcRepType field contains the type of the representation of a constructor
This may differ from the type of the constructor *Id* (built
by MkId.mkDataConId) for two reasons:
a) the constructor Id may be overloaded, but the dictionary isn't stored
Expand Down Expand Up @@ -669,7 +669,7 @@ mkDataCon :: Name
-> [TyVar] -- ^ Universally quantified type variables
-> [TyVar] -- ^ Existentially quantified type variables
-> [(TyVar,Type)] -- ^ GADT equalities
-> ThetaType -- ^ Theta-type occuring before the arguments proper
-> ThetaType -- ^ Theta-type occurring before the arguments proper
-> [Type] -- ^ Original argument types
-> Type -- ^ Original result type
-> TyCon -- ^ Representation type constructor
Expand All @@ -692,7 +692,7 @@ mkDataCon name declared_infix
-- data T a where { MkT :: S }
-- then it's possible that the univ_tvs may hit an assertion failure
-- if you pull on univ_tvs. This case is checked by checkValidDataCon,
-- so the error is detected properly... it's just that asaertions here
-- so the error is detected properly... it's just that assertions here
-- are a little dodgy.

= con
Expand Down Expand Up @@ -741,7 +741,7 @@ eqSpecPreds spec = [ mkEqPred (mkTyVarTy tv) ty | (tv,ty) <- spec ]
{-
Note [Unpack equality predicates]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we have a GADT with a contructor C :: (a~[b]) => b -> T a
If we have a GADT with a constructor C :: (a~[b]) => b -> T a
we definitely want that equality predicate *unboxed* so that it
takes no space at all. This is easily done: just give it
an UNPACK pragma. The rest of the unpack/repack code does the
Expand Down Expand Up @@ -789,7 +789,7 @@ dataConUnivTyVars = dcUnivTyVars
dataConExTyVars :: DataCon -> [TyVar]
dataConExTyVars = dcExTyVars

-- | Both the universal and existentiatial type variables of the constructor
-- | Both the universal and existential type variables of the constructor
dataConAllTyVars :: DataCon -> [TyVar]
dataConAllTyVars (MkData { dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs })
= univ_tvs ++ ex_tvs
Expand Down Expand Up @@ -1143,7 +1143,7 @@ promoteDataCon_maybe (MkData { dcPromoted = mb_tc }) = mb_tc
{-
Note [Promoting a Type to a Kind]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppsoe we have a data constructor D
Suppose we have a data constructor D
D :: forall (a:*). Maybe a -> T a
We promote this to be a type constructor 'D:
'D :: forall (k:BOX). 'Maybe k -> 'T k
Expand Down
12 changes: 6 additions & 6 deletions compiler/Eta/BasicTypes/Demand.hs
Expand Up @@ -736,7 +736,7 @@ cleanEvalProdDmd n = JD { sd = HeadStr, ud = UProd (replicate n useTop) }
{-
************************************************************************
* *
Demand: combining stricness and usage
Demand: combining strictness and usage
* *
************************************************************************
-}
Expand Down Expand Up @@ -1246,7 +1246,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
Expand Down Expand Up @@ -1544,7 +1544,7 @@ But the demand fed into f might be less than <C(C(S)), C1(C1(S))>. There are a f
- And finally termination information: If r says that f diverges for sure,
then this holds when the demand guarantees that two arguments are going to
be passed. If the demand is lower, we may just as well converge.
If we were tracking definite convegence, than that would still hold under
If we were tracking definite convergence, than that would still hold under
a weaker demand than expected by the demand transformer.
* Not enough demand from the usage side: The missing usage can be expanded
using UCall Many, therefore this is subsumed by the third case:
Expand Down Expand Up @@ -1581,7 +1581,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.
Expand Down Expand Up @@ -1686,8 +1686,8 @@ a demand on the Id into a DmdType, which gives
c) an indication of the result of applying
the Id to its arguments
However, in fact we store in the Id an extremely emascuated demand
transfomer, namely
However, in fact we store in the Id an extremely emasculated demand
transformer, namely
a single DmdType
(Nevertheless we dignify StrictSig as a distinct type.)
Expand Down
6 changes: 3 additions & 3 deletions compiler/Eta/BasicTypes/Id.hs
Expand Up @@ -211,7 +211,7 @@ setIdInfo id info = seqIdInfo info `seq` (lazySetIdInfo id info)
modifyIdInfo :: (IdInfo -> IdInfo) -> Id -> Id
modifyIdInfo fn id = setIdInfo id (fn (idInfo id))

-- maybeModifyIdInfo tries to avoid unnecesary thrashing
-- maybeModifyIdInfo tries to avoid unnecessary thrashing
maybeModifyIdInfo :: Maybe IdInfo -> Id -> Id
maybeModifyIdInfo (Just new_info) id = lazySetIdInfo id new_info
maybeModifyIdInfo Nothing id = id
Expand Down Expand Up @@ -482,7 +482,7 @@ isImplicitId id
PrimOpId {} -> True
DataConWorkId {} -> True
DataConWrapId {} -> True
-- These are are implied by their type or class decl;
-- These are implied by their type or class decl;
-- remember that all type and class decls appear in the interface file.
-- The dfun id is not an implicit Id; it must *not* be omitted, because
-- it carries version info for the instance decl
Expand Down Expand Up @@ -627,7 +627,7 @@ setIdCafInfo :: Id -> CafInfo -> Id
setIdCafInfo id caf_info = modifyIdInfo (`setCafInfo` caf_info) id

---------------------------------
-- Occcurrence INFO
-- Occurrence INFO
idOccInfo :: Id -> OccInfo
idOccInfo id = occInfo (idInfo id)

Expand Down
6 changes: 3 additions & 3 deletions compiler/Eta/BasicTypes/IdInfo.hs
Expand Up @@ -193,7 +193,7 @@ data IdInfo
unfoldingInfo :: Unfolding, -- ^ The 'Id's unfolding
cafInfo :: CafInfo, -- ^ 'Id' CAF info
oneShotInfo :: OneShotInfo, -- ^ Info about a lambda-bound variable, if the 'Id' is one
inlinePragInfo :: InlinePragma, -- ^ Any inline pragma atached to the 'Id'
inlinePragInfo :: InlinePragma, -- ^ Any inline pragma attached to the 'Id'
occInfo :: OccInfo, -- ^ How the 'Id' occurs in the program

strictnessInfo :: StrictSig, -- ^ A strictness signature
Expand Down Expand Up @@ -343,7 +343,7 @@ But we don't do that for instance declarations and so we just treat
them all uniformly.
The EXCEPTION is PrimOpIds, which do have rules in their IdInfo. That is
jsut for convenience really.
just for convenience really.
However, LocalIds may have non-empty RuleInfo. We treat them
differently because:
Expand All @@ -364,7 +364,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

Expand Down
8 changes: 4 additions & 4 deletions compiler/Eta/BasicTypes/Literal.hs
Expand Up @@ -137,8 +137,8 @@ They only get converted into real Core,
during the CorePrep phase, although TidyPgm looks ahead at what the
core will be, so that it can see whether it involves CAFs.
When we initally build an Integer literal, notably when
deserialising it from an interface file (see the Binary instance
When we initially build an Integer literal, notably when
deserializing it from an interface file (see the Binary instance
below), we don't have convenient access to the mkInteger Id. So we
just use an error thunk, and fill in the real Id when we do tcIfaceLit
in TcIface.
Expand Down Expand Up @@ -475,7 +475,7 @@ literalType (MachLabel _ _ _) = addrPrimTy
literalType (LitInteger _ t) = t

absentLiteralOf :: TyCon -> Maybe Literal
-- Return a literal of the appropriate primtive
-- Return a literal of the appropriate primitive
-- TyCon, to use as a placeholder when it doesn't matter
absentLiteralOf tc = lookupUFM absent_lits (tyConName tc)

Expand Down Expand Up @@ -527,7 +527,7 @@ litTag (MachNull) = _ILIT(12)
{-
Printing
~~~~~~~~
* MachX (i.e. unboxed) things are printed unadornded (e.g. 3, 'a', "foo")
* MachX (i.e. unboxed) things are printed unadorned (e.g. 3, 'a', "foo")
exceptions: MachFloat gets an initial keyword prefix.
-}

Expand Down
22 changes: 11 additions & 11 deletions compiler/Eta/BasicTypes/MkId.hs
Expand Up @@ -108,7 +108,7 @@ There are several reasons why an Id might appear in the wiredInIds:
result type. -- sof 1/99]
(3) Other error functions (rUNTIME_ERROR_ID) are wired in (a) because
the desugarer generates code that mentiones them directly, and
the desugarer generates code that mentions them directly, and
(b) for the same reason as eRROR_ID
(4) lazyId is wired in because the wired-in version overrides the
Expand Down Expand Up @@ -395,13 +395,13 @@ mkDataConWorkId wkr_name data_con
-- even if the data constructor is declared strict
-- e.g. data T = MkT !(Int,Int)
-- Why? Because the *wrapper* is strict (and its unfolding has case
-- expresssions that do the evals) but the *worker* itself is not.
-- expressions that do the evals) but the *worker* itself is not.
-- If we pretend it is strict then when we see
-- case x of y -> $wMkT y
-- the simplifier thinks that y is "sure to be evaluated" (because
-- $wMkT is strict) and drops the case. No, $wMkT is not strict.
--
-- When the simplifer sees a pattern
-- When the simplifier sees a pattern
-- case e of MkT x -> ...
-- it uses the dataConRepStrictness of MkT to mark x as evaluated;
-- but that's fine... dataConRepStrictness comes from the data con
Expand Down Expand Up @@ -504,7 +504,7 @@ mkDataConRep dflags fam_envs wrap_name mb_bangs data_con
-- The Cpr info can be important inside INLINE rhss, where the
-- wrapper constructor isn't inlined.
-- And the argument strictness can be important too; we
-- may not inline a contructor when it is partially applied.
-- may not inline a constructor when it is partially applied.
-- For example:
-- data W = C !Int !Int !Int
-- ...(let w = C x in ...(w p q)...)...
Expand Down Expand Up @@ -821,7 +821,7 @@ Because then we'd get an infinite number of arguments.
Here is a more complicated case:
data S = MkS {-# UNPACK #-} !T Int
data T = MkT {-# UNPACK #-} !S Int
Each of S and T must decide independendently whether to unpack
Each of S and T must decide independently whether to unpack
and they had better not both say yes. So they must both say no.
Also behave conservatively when there is no UNPACK pragma
Expand All @@ -836,7 +836,7 @@ because Int is non-recursive.
Note [Unpack equality predicates]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we have a GADT with a contructor C :: (a~[b]) => b -> T a
If we have a GADT with a constructor C :: (a~[b]) => b -> T a
we definitely want that equality predicate *unboxed* so that it
takes no space at all. This is easily done: just give it
an UNPACK pragma. The rest of the unpack/repack code does the
Expand All @@ -863,7 +863,7 @@ wrapNewTypeBody :: TyCon -> [Type] -> CoreExpr -> CoreExpr
-- newtype T a = MkT (a,Int)
-- MkT :: forall a. (a,Int) -> T a
-- MkT = /\a. \(x:(a,Int)). x `cast` sym (CoT a)
-- where CoT is the coercion TyCon assoicated with the newtype
-- where CoT is the coercion TyCon associated with the newtype
--
-- The call (wrapNewTypeBody T [a] e) returns the
-- body of the wrapper, namely
Expand All @@ -887,7 +887,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 spliting operation (cf, TcPat.tcConPat).
-- a splitting operation (cf, TcPat.tcConPat).

unwrapNewTypeBody :: TyCon -> [Type] -> CoreExpr -> CoreExpr
unwrapNewTypeBody tycon args result_expr
Expand Down Expand Up @@ -992,7 +992,7 @@ mkFCallId dflags uniq fcall ty

strict_sig = mkClosedStrictSig (replicate arity topDmd) topRes
-- the call does not claim to be strict in its arguments, since they
-- may be lifted (foreign import prim) and the called code doen't
-- may be lifted (foreign import prim) and the called code doesn't
-- necessarily force them. See Trac #11076.
{-
************************************************************************
Expand Down Expand Up @@ -1415,7 +1415,7 @@ and Note [Left folds via right fold]) it was determined that it would be useful
if library authors could explicitly tell the compiler that a certain lambda is
called at most once. The oneShot function allows that.
Like most magic functions it has a compulsary unfolding, so there is no need
Like most magic functions it has a compulsory unfolding, so there is no need
for a real definition somewhere. We have one in GHC.Magic for the convenience
of putting the documentation there.
Expand All @@ -1438,7 +1438,7 @@ Note [magicDictId magic]
~~~~~~~~~~~~~~~~~~~~~~~~~
The identifier `magicDict` is just a place-holder, which is used to
implement a primitve that we cannot define in Haskell but we can write
implement a primitive that we cannot define in Haskell but we can write
in Core. It is declared with a place-holder type:
magicDict :: forall a. a
Expand Down
2 changes: 1 addition & 1 deletion compiler/Eta/BasicTypes/Module.hs
Expand Up @@ -1173,7 +1173,7 @@ To be on the safe side and not pessimize ModuleEnv uses nondeterministic
ordering on Module and normalizes by doing the lexicographic sort when
turning the env to a list.
See Note [Unique Determinism] for more information about the source of
nondeterminism and and Note [Deterministic UniqFM] for explanation of why
nondeterminism and Note [Deterministic UniqFM] for explanation of why
it matters for maps.
-}

Expand Down
2 changes: 1 addition & 1 deletion compiler/Eta/BasicTypes/Name.hs
Expand Up @@ -98,7 +98,7 @@ import Data.Data
************************************************************************
-}

-- | A unique, unambigious name for something, containing information about where
-- | A unique, unambiguous name for something, containing information about where
-- that thing originated.
data Name = Name {
n_sort :: NameSort, -- What sort of name it is
Expand Down
2 changes: 1 addition & 1 deletion compiler/Eta/BasicTypes/NameEnv.hs
Expand Up @@ -43,7 +43,7 @@ depAnal :: (node -> [Name]) -- Defs
-> (node -> [Name]) -- Uses
-> [node]
-> [SCC node]
-- Peform dependency analysis on a group of definitions,
-- Perform dependency analysis on a group of definitions,
-- where each definition may define more than one Name
--
-- The get_defs and get_uses functions are called only once per node
Expand Down
8 changes: 4 additions & 4 deletions compiler/Eta/BasicTypes/OccName.hs
Expand Up @@ -564,12 +564,12 @@ a user-written type or function name
$f... Dict-fun identifiers (from inst decls)
$dmop Default method for 'op'
$pnC n'th superclass selector for class C
$wf Worker for functtoin 'f'
$wf Worker for function 'f'
$sf.. Specialised version of f
T:C Tycon for dictionary for class C
D:C Data constructor for dictionary for class C
NTCo:T Coercion connecting newtype T with its representation type
TFCo:R Coercion connecting a data family to its respresentation type R
TFCo:R Coercion connecting a data family to its representation type R
In encoded form these appear as Zdfxxx etc
Expand Down Expand Up @@ -851,15 +851,15 @@ tidyOccName env occ@(OccName occ_sp fs)
find !k !n
= case lookupUFM env new_fs of
Just {} -> find (k+1 :: Int) (n+k)
-- By using n+k, the n arguemt to find goes
-- By using n+k, the n argument to find goes
-- 1, add 1, add 2, add 3, etc which
-- moves at quadratic speed through a dense patch

Nothing -> (new_env, OccName occ_sp new_fs)
where
new_fs = mkFastString (base ++ show n)
new_env = addToUFM (addToUFM env new_fs 1) base1 (n+1)
-- Update: base_fs, so that next time we'll start whwere we left off
-- Update: base_fs, so that next time we'll start where we left off
-- new_fs, so that we know it is taken
-- If they are the same (n==1), the former wins
-- See Note [TidyOccEnv]
Expand Down

0 comments on commit 28d74f3

Please sign in to comment.