diff options
author | Brian Wignall <brianwignall@gmail.com> | 2021-02-05 09:03:21 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-06 09:30:34 -0500 |
commit | 3da472f0e78fe5f1068be0cc2b1c0762532da9f9 (patch) | |
tree | d88a147c49aa25fff13866de9b87c712213fbd3f /compiler | |
parent | 9b7dcd80f16efda57e4e51e39d61b55a11c72014 (diff) | |
download | haskell-3da472f0e78fe5f1068be0cc2b1c0762532da9f9.tar.gz |
Fix typos
Diffstat (limited to 'compiler')
48 files changed, 67 insertions, 67 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs index 5d8b295b95..eef40f6c2b 100644 --- a/compiler/GHC.hs +++ b/compiler/GHC.hs @@ -857,7 +857,7 @@ looks_like_an_input m = isSourceFilename m -- away. Note the asymmetry of FilePath.normalise: -- Linux: p\/q -> p\/q; p\\q -> p\\q -- Windows: p\/q -> p\\q; p\\q -> p\\q --- #12674: Filenames starting with a hypen get normalised from ./-foo.hs +-- #12674: Filenames starting with a hyphen get normalised from ./-foo.hs -- to -foo.hs. We have to re-prepend the current directory. normalise_hyp :: FilePath -> FilePath normalise_hyp fp diff --git a/compiler/GHC/Builtin/PrimOps.hs b/compiler/GHC/Builtin/PrimOps.hs index 4ad8652922..14040692bc 100644 --- a/compiler/GHC/Builtin/PrimOps.hs +++ b/compiler/GHC/Builtin/PrimOps.hs @@ -634,7 +634,7 @@ Note [Eta expanding primops] STG requires that primop applications be saturated. This makes code generation significantly simpler since otherwise we would need to define a calling -convention for curried applications that can accomodate levity polymorphism. +convention for curried applications that can accommodate levity polymorphism. To ensure saturation, CorePrep eta expands expand all primop applications as described in Note [Eta expansion of hasNoBinding things in CorePrep] in diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index 75559edd2e..4b30bc8cf1 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -1378,7 +1378,7 @@ pprCLabel platform sty lbl = -- Note that these labels are *not* referred to by code. They are strictly for -- diagnostics purposes. -- --- To avoid confusion, it is desireable to add a module-qualifier to the +-- To avoid confusion, it is desirable to add a module-qualifier to the -- symbol name. However, the Name type's Internal constructor doesn't carry -- knowledge of the current Module. Consequently, we have to pass this around -- explicitly. diff --git a/compiler/GHC/Cmm/Info/Build.hs b/compiler/GHC/Cmm/Info/Build.hs index b43eaa1257..1d3431c4af 100644 --- a/compiler/GHC/Cmm/Info/Build.hs +++ b/compiler/GHC/Cmm/Info/Build.hs @@ -441,7 +441,7 @@ counters are not exported. So we ignore ticky counters in SRT analysis (which are never CAFFY and never exported). Not doing this caused #17947 where we analysed the function first mapped the -name to CAFFY. We then saw the ticky constructor, and becuase it has the same +name to CAFFY. We then saw the ticky constructor, and because it has the same Name as the function and is not CAFFY we overrode the CafInfo of the name as non-CAFFY. -} diff --git a/compiler/GHC/CmmToAsm/BlockLayout.hs b/compiler/GHC/CmmToAsm/BlockLayout.hs index b7c6ffb098..d7314eaa5b 100644 --- a/compiler/GHC/CmmToAsm/BlockLayout.hs +++ b/compiler/GHC/CmmToAsm/BlockLayout.hs @@ -539,7 +539,7 @@ mergeChains edges chains -- An Edge is irrelevant if the ends are part of the same chain. -- We say these edges are already linked buildChains :: [CfgEdge] -> [BlockId] - -> ( LabelMap BlockChain -- Resulting chains, indexd by end if chain. + -> ( LabelMap BlockChain -- Resulting chains, indexed by end if chain. , Set.Set (BlockId, BlockId)) --List of fused edges. buildChains edges blocks = runST $ buildNext setEmpty mapEmpty mapEmpty edges Set.empty diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/Base.hs b/compiler/GHC/CmmToAsm/Reg/Graph/Base.hs index a06934c837..32b49a61e8 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/Base.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/Base.hs @@ -141,7 +141,7 @@ bound regsOfClass regAlias classN classesC -- | The total squeese on a particular node with a list of neighbors. -- -- A version of this should be constructed for each particular architecture, --- possibly including uses of bound, so that alised registers don't get +-- possibly including uses of bound, so that aliased registers don't get -- counted twice, as per the paper. squeese :: (RegClass -> UniqSet Reg) -> (Reg -> UniqSet Reg) diff --git a/compiler/GHC/CmmToAsm/X86/CodeGen.hs b/compiler/GHC/CmmToAsm/X86/CodeGen.hs index 3883d44717..36b24e8be2 100644 --- a/compiler/GHC/CmmToAsm/X86/CodeGen.hs +++ b/compiler/GHC/CmmToAsm/X86/CodeGen.hs @@ -3054,7 +3054,7 @@ genCCall32' target dest_regs args = do X87Store fmt tmp_amode, -- X87Store only supported for the CDECL ABI -- NB: This code will need to be - -- revisted once GHC does more work around + -- revisited once GHC does more work around -- SIGFPE f MOV fmt (OpAddr tmp_amode) (OpReg r_dest), ADD II32 (OpImm (ImmInt b)) (OpReg esp), diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs index f014a20817..f1720725a6 100644 --- a/compiler/GHC/Core/Lint.hs +++ b/compiler/GHC/Core/Lint.hs @@ -212,14 +212,14 @@ in GHC.Core.Opt.WorkWrap.Utils. (Maybe there are other "clients" of this featur * Alas, when cloning a coercion variable we might choose a unique that happens to clash with an inner Id, thus \cv_66 -> let wild_X7 = blah in blah - We decide to clone `cv_66` becuase it's already in scope. Fine, + We decide to clone `cv_66` because it's already in scope. Fine, choose a new unique. Aha, X7 looks good. So we check the lambda body with le_subst of [cv_66 :-> cv_X7] This is all fine, even though we use the same unique as wild_X7. As (SI2) says, we do /not/ return a new lambda (\cv_X7 -> let wild_X7 = blah in ...) - We simply use the le_subst subsitution in types/coercions only, when + We simply use the le_subst substitution in types/coercions only, when checking for equality. * We still need to check that Id occurrences are bound by some diff --git a/compiler/GHC/Core/Opt/Arity.hs b/compiler/GHC/Core/Opt/Arity.hs index 99cfd1b15f..6dd1148e56 100644 --- a/compiler/GHC/Core/Opt/Arity.hs +++ b/compiler/GHC/Core/Opt/Arity.hs @@ -682,7 +682,7 @@ This example happens a lot; it first showed up in Andy Gill's thesis, fifteen years ago! It also shows up in the code for 'rnf' on lists in #4138. -We do the neccessary, quite simple fixed-point iteration in 'findRhsArity', +We do the necessary, quite simple fixed-point iteration in 'findRhsArity', which assumes for a single binding 'ABot' on the first run and iterates until it finds a stable arity type. Two wrinkles @@ -1339,7 +1339,7 @@ a (\eta) around the outside and use etaInfoApp to apply each alternative to 'eta'. We want to beta-reduce all that junk away. -#18223 was a dramtic example in which the intermediate term was +#18223 was a dramatic example in which the intermediate term was grotesquely huge, even though the next Simplifier iteration squashed it. Better to kill it at birth. -} diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs index 3eb86852ac..413da0794a 100644 --- a/compiler/GHC/Core/Opt/DmdAnal.hs +++ b/compiler/GHC/Core/Opt/DmdAnal.hs @@ -177,7 +177,7 @@ That is, a series of right-nested pairs, where the @fst@ are the exported binders of the last enclosing let binding and @snd@ continues the nested lets. -Variables occuring free in RULE RHSs are to be handled the same as exported Ids. +Variables occurring free in RULE RHSs are to be handled the same as exported Ids. See also Note [Absence analysis for stable unfoldings and RULES]. Note [Why care for top-level demand annotations?] @@ -204,7 +204,7 @@ to unbox deeper. From T18894: h m = ... snd (g m 2) ... uncurry (+) (g 2 m) ... Only @h@ is exported, hence we see that @g@ is always called in contexts were we also force the division in the second component of the pair returned by @g@. -This allows Nested CPR to evalute the division eagerly and return an I# in its +This allows Nested CPR to evaluate the division eagerly and return an I# in its position. -} @@ -1181,7 +1181,7 @@ For (2) consider f _ (MkT n t) = f n t Here f is lazy in T, but its *usage* is infinite: U(U,U(U,U(U, ...))). -Notice that this happens becuase T is a product type, and is recrusive. +Notice that this happens because T is a product type, and is recrusive. If we are not careful, we'll fail to iterate to a fixpoint in dmdFix, and bale out entirely, which is inefficient and over-conservative. diff --git a/compiler/GHC/Core/Opt/OccurAnal.hs b/compiler/GHC/Core/Opt/OccurAnal.hs index 343ddfe618..c5c5e4207a 100644 --- a/compiler/GHC/Core/Opt/OccurAnal.hs +++ b/compiler/GHC/Core/Opt/OccurAnal.hs @@ -302,7 +302,7 @@ in Note [IMP-RULES: local rules for imported functions]. So, during loop-breaker analysis: -- for each active RULE for a local function 'f' we add an edge bewteen +- for each active RULE for a local function 'f' we add an edge between 'f' and the local FVs of the rule RHS - for each active RULE for an *imported* function we add dependency @@ -639,7 +639,7 @@ propagate. {-# RULES "SPEC k 0" k 0 = j #-} k x y = x + 2 * y in ... - If we eta-expanded the rule all woudl be well, but as it stands the + If we eta-expanded the rule all would be well, but as it stands the one arg of the rule don't match the join-point arity of 2. Conceivably we could notice that a potential join point would have diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs index 97173eee5c..0cea6da0bf 100644 --- a/compiler/GHC/Core/Opt/Simplify.hs +++ b/compiler/GHC/Core/Opt/Simplify.hs @@ -3653,7 +3653,7 @@ Pushing the call inward (being careful not to duplicate E) and now the (&& a F) etc can optimise. Moreover there might be a RULE for the function that can fire when it "sees" the -particular case alterantive. +particular case alternative. But Plan A can have terrible, terrible behaviour. Here is a classic case: diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs index 2ab7fe2e28..191e72e3b2 100644 --- a/compiler/GHC/Core/Opt/Simplify/Utils.hs +++ b/compiler/GHC/Core/Opt/Simplify/Utils.hs @@ -1479,7 +1479,7 @@ different way (Note [Duplicating StrictArg] in Simplify). So I just set an arbitrary, high limit of 100, to stop any totally exponential behaviour. -This still leaves the nasty possiblity that /ordinary/ inlining (not +This still leaves the nasty possibility that /ordinary/ inlining (not postInlineUnconditionally) might inline these join points, each of which is individually quiet small. I'm still not sure what to do about this (e.g. see #15488). diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs index 4ff730fa77..c2510b97c0 100644 --- a/compiler/GHC/Core/Opt/Specialise.hs +++ b/compiler/GHC/Core/Opt/Specialise.hs @@ -867,7 +867,7 @@ call to spec_imorpts in spec_import, we must include the dict-binds from the parent. Lacking this caused #17151, a really nasty bug. Here is what happened. -* Class struture: +* Class structure: Source is a superclass of Mut Index is a superclass of Source diff --git a/compiler/GHC/Core/TyCo/FVs.hs b/compiler/GHC/Core/TyCo/FVs.hs index 8277b06378..c8a7506363 100644 --- a/compiler/GHC/Core/TyCo/FVs.hs +++ b/compiler/GHC/Core/TyCo/FVs.hs @@ -383,7 +383,7 @@ shallowTcvFolder = TyCoFolder { tcf_view = noView {- Note [Finding free coercion varibles] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here we are only interested in the free /coercion/ variables. -We can achieve this through a slightly differnet TyCo folder. +We can achieve this through a slightly different TyCo folder. Notice that we look deeply, into kinds. diff --git a/compiler/GHC/Core/TyCo/Rep.hs b/compiler/GHC/Core/TyCo/Rep.hs index 69db14e7f0..7414bc18da 100644 --- a/compiler/GHC/Core/TyCo/Rep.hs +++ b/compiler/GHC/Core/TyCo/Rep.hs @@ -1909,7 +1909,7 @@ foldTyCo (TyCoFolder { tcf_view = view = let !env' = tycobinder env tv vis -- Avoid building a thunk here in go_ty env (varType tv) `mappend` go_ty env' inner - -- Explicit recursion becuase using foldr builds a local + -- Explicit recursion because using foldr builds a local -- loop (with env free) and I'm not confident it'll be -- lambda lifted in the end go_tys _ [] = mempty diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs index 21f03d653e..7032b97939 100644 --- a/compiler/GHC/Core/Type.hs +++ b/compiler/GHC/Core/Type.hs @@ -1158,7 +1158,7 @@ is equivalent to, FunTy (Anon a) b Note how the RuntimeReps are implied in the FunTy representation. For this -reason we must be careful when recontructing the TyConApp representation (see, +reason we must be careful when reconstructing the TyConApp representation (see, for instance, splitTyConApp_maybe). In the compiler we maintain the invariant that all saturated applications of diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs index 0d0df57f57..b97e10cd46 100644 --- a/compiler/GHC/Core/Unfold.hs +++ b/compiler/GHC/Core/Unfold.hs @@ -810,7 +810,7 @@ binary sizes shrink significantly either. Note [Discounts and thresholds] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Constants for discounts and thesholds are defined in 'UnfoldingOpts'. They are: +Constants for discounts and thresholds are defined in 'UnfoldingOpts'. They are: unfoldingCreationThreshold At a definition site, if the unfolding is bigger than this, we diff --git a/compiler/GHC/Core/Unify.hs b/compiler/GHC/Core/Unify.hs index 81492afc86..dbfd4083ad 100644 --- a/compiler/GHC/Core/Unify.hs +++ b/compiler/GHC/Core/Unify.hs @@ -529,7 +529,7 @@ instance Monad UnifyResultM where SurelyApart -> SurelyApart Unifiable x >>= f = f x --- | @tcUnifyTysFG bind_tv tys1 tys2@ attepts to find a substitution @s@ (whose +-- | @tcUnifyTysFG bind_tv tys1 tys2@ attempts to find a substitution @s@ (whose -- domain elements all respond 'BindMe' to @bind_tv@) such that -- @s(tys1)@ and that of @s(tys2)@ are equal, as witnessed by the returned -- Coercions. This version requires that the kinds of the types are the same, diff --git a/compiler/GHC/CoreToStg/Prep.hs b/compiler/GHC/CoreToStg/Prep.hs index 626fcadfce..9eae6867ac 100644 --- a/compiler/GHC/CoreToStg/Prep.hs +++ b/compiler/GHC/CoreToStg/Prep.hs @@ -1028,7 +1028,7 @@ Performing the transform described above would result in: If runRW# were a "normal" function this call to join point j would not be allowed in its continuation argument. However, since runRW# is inlined (as -described in Note [runRW magic] above), such join point occurences are +described in Note [runRW magic] above), such join point occurrences are completely fine. Both occurrence analysis (see the runRW guard in occAnalApp) and Core Lint (see the App case of lintCoreExpr) have special treatment for runRW# applications. See Note [Linting of runRW#] for details on the latter. diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs index 259615e64c..d2c5d77cbe 100644 --- a/compiler/GHC/HsToCore/Expr.hs +++ b/compiler/GHC/HsToCore/Expr.hs @@ -240,7 +240,7 @@ dsUnliftedBind bind body = pprPanic "dsLet: unlifted" (ppr bind $$ ppr body) -} --- | Replace the body of the fucntion with this block to test the hsExprType +-- | Replace the body of the function with this block to test the hsExprType -- function in GHC.Tc.Utils.Zonk: -- putSrcSpanDs loc $ do -- { core_expr <- dsExpr e @@ -682,7 +682,7 @@ We have MkF (co2::s ~# Int) _ -> $WMkF @t y |> co3 (Side note: here (z |> co1) is built by typechecking the scrutinee, so -we ignore it here. In general the scrutinee is an aribtrary expression.) +we ignore it here. In general the scrutinee is an arbitrary expression.) The question is: what is co3, the cast for the RHS? co3 :: F (Int,t) ~ F (s,t) diff --git a/compiler/GHC/Iface/UpdateIdInfos.hs b/compiler/GHC/Iface/UpdateIdInfos.hs index e37964c51d..0c70b5caeb 100644 --- a/compiler/GHC/Iface/UpdateIdInfos.hs +++ b/compiler/GHC/Iface/UpdateIdInfos.hs @@ -27,7 +27,7 @@ import GHC.Utils.Panic #include "HsVersions.h" --- | Update CafInfos and LFInfos of all occurences (in rules, unfoldings, class +-- | Update CafInfos and LFInfos of all occurrences (in rules, unfoldings, class -- instances). -- -- See Note [Conveying CAF-info and LFInfo between modules] in diff --git a/compiler/GHC/Linker/MacOS.hs b/compiler/GHC/Linker/MacOS.hs index 959ef3a217..be5cbf2f9c 100644 --- a/compiler/GHC/Linker/MacOS.hs +++ b/compiler/GHC/Linker/MacOS.hs @@ -36,7 +36,7 @@ import System.FilePath ((</>), (<.>)) -- @-l@ and @-rpath@ to the linker will result in the unnecesasry libraries not -- being included in the load commands, however the @-rpath@ entries are all -- forced to be included. This can lead to 100s of @-rpath@ entries being --- included when only a handful of libraries end up being truely linked. +-- included when only a handful of libraries end up being truly linked. -- -- Thus after building the library, we run a fixup phase where we inject the -- @-rpath@ for each found library (in the given library search paths) into the diff --git a/compiler/GHC/Parser/Errors.hs b/compiler/GHC/Parser/Errors.hs index 57c6141117..f0f4372c8a 100644 --- a/compiler/GHC/Parser/Errors.hs +++ b/compiler/GHC/Parser/Errors.hs @@ -36,8 +36,8 @@ data PsWarning -- | Warn when tabulations are found = PsWarnTab - { tabFirst :: !SrcSpan -- ^ First occurence of a tab - , tabCount :: !Word -- ^ Number of other occurences + { tabFirst :: !SrcSpan -- ^ First occurrence of a tab + , tabCount :: !Word -- ^ Number of other occurrences } | PsWarnTransitionalLayout !SrcSpan !TransLayoutReason @@ -53,7 +53,7 @@ data PsWarning -- ^ Multiple Haddock comment for the same entity | PsWarnStarBinder !SrcSpan - -- ^ Found binding occurence of "*" while StarIsType is enabled + -- ^ Found binding occurrence of "*" while StarIsType is enabled | PsWarnStarIsType !SrcSpan -- ^ Using "*" for "Type" without StarIsType enabled @@ -103,7 +103,7 @@ data PsErrorDesc -- ^ Lexer error | PsErrSuffixAT - -- ^ Suffix occurence of `@` + -- ^ Suffix occurrence of `@` | PsErrParse !String -- ^ Parse errors diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x index aaae9077b6..5e2af15f96 100644 --- a/compiler/GHC/Parser/Lexer.x +++ b/compiler/GHC/Parser/Lexer.x @@ -2849,7 +2849,7 @@ getMessages :: PState -> (Bag PsWarning, Bag PsError) getMessages p = let ws = warnings p -- we add the tabulation warning on the fly because - -- we count the number of occurences of tab characters + -- we count the number of occurrences of tab characters ws' = case tab_first p of Nothing -> ws Just tf -> PsWarnTab (RealSrcSpan tf Nothing) (tab_count p) diff --git a/compiler/GHC/Parser/PostProcess/Haddock.hs b/compiler/GHC/Parser/PostProcess/Haddock.hs index 6741476925..43ac07a482 100644 --- a/compiler/GHC/Parser/PostProcess/Haddock.hs +++ b/compiler/GHC/Parser/PostProcess/Haddock.hs @@ -110,7 +110,7 @@ the location range in which we search for HdkCommentPrev is as follows: We search for comments after HsTyVar "Int" and until the next syntactic element, in this case HsTyVar "Bool". -Ignoring the "->" allows us to accomodate alternative coding styles: +Ignoring the "->" allows us to accommodate alternative coding styles: f :: Int -> -- ^ comment on argument Bool -- ^ comment on result @@ -1540,7 +1540,7 @@ Sometimes handling documentation comments during parsing led to bugs (#17561), and sometimes it simply made it hard to modify and extend the grammar. Another issue was that sometimes Haddock would fail to parse code -that GHC could parse succesfully: +that GHC could parse successfully: class BadIndent where f :: a -> Int diff --git a/compiler/GHC/Rename/Env.hs b/compiler/GHC/Rename/Env.hs index 6e0c19f190..19c4e4610e 100644 --- a/compiler/GHC/Rename/Env.hs +++ b/compiler/GHC/Rename/Env.hs @@ -1112,7 +1112,7 @@ lookupGlobalOccRn rdr_name = Nothing -> do { traceRn "lookupGlobalOccRn" (ppr rdr_name) ; unboundName WL_Global rdr_name } --- Looks up a RdrName occurence in the GlobalRdrEnv and with +-- Looks up a RdrName occurrence in the GlobalRdrEnv and with -- lookupQualifiedNameGHCi. Does not try to find an Exact or Orig name first. -- lookupQualifiedNameGHCi here is used when we're in GHCi and a name like -- 'Data.Map.elems' is typed, even if you didn't import Data.Map diff --git a/compiler/GHC/Runtime/Interpreter.hs b/compiler/GHC/Runtime/Interpreter.hs index 4536226bf8..cb13089571 100644 --- a/compiler/GHC/Runtime/Interpreter.hs +++ b/compiler/GHC/Runtime/Interpreter.hs @@ -202,7 +202,7 @@ iservCmd hsc_env msg = withInterp hsc_env $ \case withInterp :: HscEnv -> (Interp -> IO a) -> IO a withInterp hsc_env action = action (hscInterp hsc_env) --- | Retreive the targe code interpreter +-- | Retrieve the targe code interpreter -- -- Fails if no target code interpreter is available hscInterp :: HscEnv -> Interp diff --git a/compiler/GHC/StgToCmm/Foreign.hs b/compiler/GHC/StgToCmm/Foreign.hs index 9bae125ce5..21c85d569c 100644 --- a/compiler/GHC/StgToCmm/Foreign.hs +++ b/compiler/GHC/StgToCmm/Foreign.hs @@ -460,7 +460,7 @@ Opening the nursery corresponds to the following code: tso->alloc_limit += bdfree - bdstart; // Set Hp to the last occupied word of the heap block. Why not the - // next unocupied word? Doing it this way means that we get to use + // next unoccupied word? Doing it this way means that we get to use // an offset of zero more often, which might lead to slightly smaller // code on some architectures. Hp = bdfree - WDS(1); diff --git a/compiler/GHC/Tc/Deriv/Generate.hs b/compiler/GHC/Tc/Deriv/Generate.hs index 2bda9d40c6..0f374700dd 100644 --- a/compiler/GHC/Tc/Deriv/Generate.hs +++ b/compiler/GHC/Tc/Deriv/Generate.hs @@ -2682,7 +2682,7 @@ avoid name clashes: toEnum a = $tag2con_T{Uniq2} a -- $tag2con_T{Uniq1} and $tag2con_T{Uniq2} are Exact RdrNames with - -- underyling System Names + -- underlying System Names $tag2con_T{Uniq1} :: Int -> T $tag2con_T{Uniq1} = ...code.... diff --git a/compiler/GHC/Tc/Gen/App.hs b/compiler/GHC/Tc/Gen/App.hs index 83f8cc567d..5b34952d65 100644 --- a/compiler/GHC/Tc/Gen/App.hs +++ b/compiler/GHC/Tc/Gen/App.hs @@ -291,7 +291,7 @@ tcApp rn_expr exp_res_ty -- Zonk the result type, to ensure that we substitute out -- any filled-in instantiation variable before calling tcWrapResultMono - -- In the Check case, this isn't really necessary, becuase tcWrapResultMono + -- In the Check case, this isn't really necessary, because tcWrapResultMono -- just drops to tcUnify; but in the Infer case a filled-in instantiation -- variable might perhaps escape into the constraint generator. The safe -- thing to do is to any instantaition variables away. @@ -318,7 +318,7 @@ wantQuickLook _ = xoptM LangExt.Impredi zonkQuickLook :: Bool -> TcType -> TcM TcType -- After all Quick Look unifications are done, zonk to ensure that all --- instantation variables are substituted away +-- instantiation variables are substituted away -- -- So far as the paper is concerned, this step applies -- the poly-substitution Theta, learned by QL, so that we @@ -677,7 +677,7 @@ over any visible type arguments. We've already inferred the type of the function (in tcInferAppHead), so we'll /already/ have emitted a Hole constraint; failing preserves that constraint. -We do /not/ want to fail altogether in this case (via failM) becuase +We do /not/ want to fail altogether in this case (via failM) because that may abandon an entire instance decl, which (in the presence of -fdefer-type-errors) leads to leading to #17792. diff --git a/compiler/GHC/Tc/Gen/Bind.hs b/compiler/GHC/Tc/Gen/Bind.hs index c677643be5..c63cbabdc1 100644 --- a/compiler/GHC/Tc/Gen/Bind.hs +++ b/compiler/GHC/Tc/Gen/Bind.hs @@ -632,7 +632,7 @@ tcPolyCheck prag_fn (mkCheckExpType rho_ty) -- We make a funny AbsBinds, abstracting over nothing, - -- just so we haev somewhere to put the SpecPrags. + -- just so we have somewhere to put the SpecPrags. -- Otherwise we could just use the FunBind -- Hence poly_id2 is just a clone of poly_id; -- We re-use mono-name, but we could equally well use a fresh one diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs index 698f81185d..87da41b890 100644 --- a/compiler/GHC/Tc/Gen/HsType.hs +++ b/compiler/GHC/Tc/Gen/HsType.hs @@ -473,7 +473,7 @@ tc_lhs_sig_type skol_info (L loc (HsSig { sig_bndrs = hs_outer_bndrs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tcHsSigType is tricky. Consider (T11142) foo :: forall b. (forall k (a :: k). SameKind a b) -> () -This is ill-kinded becuase of a nested skolem-escape. +This is ill-kinded because of a nested skolem-escape. That will show up as an un-solvable constraint in the implication returned by buildTvImplication in tc_lhs_sig_type. See Note [Skolem @@ -3249,7 +3249,7 @@ bindImplicitTKBndrsX skol_mode@(SM { sm_parent = check_parent, sm_kind = ctxt_ki -- SkolemMode -------------------------------------- --- | 'SkolemMode' decribes how to typecheck an explicit ('HsTyVarBndr') or +-- | 'SkolemMode' describes how to typecheck an explicit ('HsTyVarBndr') or -- implicit ('Name') binder in a type. It is just a record of flags -- that describe what sort of 'TcTyVar' to create. data SkolemMode @@ -3430,7 +3430,7 @@ filterConstrainedCandidates wanted dvs ; _ <- promoteTyVarSet to_promote ; return dvs' } --- |- Specialised verison of 'kindGeneralizeSome', but with empty +-- |- Specialised version of 'kindGeneralizeSome', but with empty -- WantedConstraints, so no filtering is needed -- i.e. kindGeneraliseAll = kindGeneralizeSome emptyWC kindGeneralizeAll :: TcType -> TcM [KindVar] @@ -3440,7 +3440,7 @@ kindGeneralizeAll kind_or_type ; quantifyTyVars dvs } -- | Specialized version of 'kindGeneralizeSome', but where no variables --- can be generalized, but perhaps some may neeed to be promoted. +-- can be generalized, but perhaps some may need to be promoted. -- Use this variant when it is unknowable whether metavariables might -- later be constrained. -- @@ -3911,7 +3911,7 @@ We achieve this as follows: - For /named/ wildcards such sas g :: forall b. (forall la. a -> _x) -> b there is no problem: we create them at the outer level (ie the - ambient level of teh signature itself), and push the level when we + ambient level of the signature itself), and push the level when we go inside a forall. So now the unification variable for the "_x" can't unify with skolem 'a'. diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs index 442d287ed8..837fb7fbdc 100644 --- a/compiler/GHC/Tc/Gen/Pat.hs +++ b/compiler/GHC/Tc/Gen/Pat.hs @@ -458,7 +458,7 @@ Consider this exotic example: f :: Int -> blah f (pair True -> x) = ...here (x :: forall b. b -> (Int,b)) -The expresion (pair True) should have type +The expression (pair True) should have type pair True :: Int -> forall b. b -> (Int,b) so that it is ready to consume the incoming Int. It should be an arrow type (t1 -> t2); hence using (tcInferRho expr). diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs index 7e1f919e1f..697cea0f47 100644 --- a/compiler/GHC/Tc/Solver.hs +++ b/compiler/GHC/Tc/Solver.hs @@ -223,7 +223,7 @@ simplifyAndEmitFlatConstraints wanted ; tclvl <- TcM.getTcLevel ; implic <- buildTvImplication UnkSkol [] tclvl wanted -- UnkSkol: doesn't matter, because - -- we bind no skolem varaibles here + -- we bind no skolem variables here ; emitImplication implic ; failM } Just (simples, holes) @@ -312,7 +312,7 @@ should be well. BUT it's hard to see that when kind-checking the signature for undefined. We want to emit a residual (a~b) constraint, to solve later. -Another possiblity is that we might have something like +Another possibility is that we might have something like F alpha ~ [Int] where alpha is bound further out, which might become soluble "later" when we learn more about alpha. So we want to emit diff --git a/compiler/GHC/Tc/Solver/Interact.hs b/compiler/GHC/Tc/Solver/Interact.hs index b1eb5bd712..00ee528fdc 100644 --- a/compiler/GHC/Tc/Solver/Interact.hs +++ b/compiler/GHC/Tc/Solver/Interact.hs @@ -1577,7 +1577,7 @@ by unification, there are two cases to consider alpha[n] is at level n, and so if we set, say, alpha[n] := Maybe beta[m], we must ensure that when unifying beta we do skolem-escape checks - etc relevent to level n. Simple way to do that: promote beta to + etc relevant to level n. Simple way to do that: promote beta to level n. 2. Set the Unification Level Flag to record that a level-n unification has @@ -1586,7 +1586,7 @@ by unification, there are two cases to consider NB: UnifySameLevel is just an optimisation for UnifyOuterLevel. Promotion would be a no-op, and setting the unification flag unnecessarily would just make the solver iterate more often. (We don't need to iterate when unifying -at the ambient level becuase of the kick-out mechanism.) +at the ambient level because of the kick-out mechanism.) ************************************************************************ diff --git a/compiler/GHC/Tc/Solver/Monad.hs b/compiler/GHC/Tc/Solver/Monad.hs index c5e9c343ae..4c16f2f56e 100644 --- a/compiler/GHC/Tc/Solver/Monad.hs +++ b/compiler/GHC/Tc/Solver/Monad.hs @@ -2040,7 +2040,7 @@ NB: we could in principle avoid kick-out: b) For Givens, after a unification. By (GivenInv) in GHC.Tc.Utils.TcType Note [TcLevel invariants], a Given can't include a meta-tyvar from its own level, so it falls under (a). Of course, we must still - kick out Givens when adding a new non-unificaiton Given. + kick out Givens when adding a new non-unification Given. But kicking out more vigorously may lead to earlier unification and fewer iterations, so we don't take advantage of these possibilities. @@ -3438,7 +3438,7 @@ Answer: if any unification of a tyvar at level n takes place * What if a unification takes place at level n, in the ic_simples of level n? No need to track this, because the kick-out mechanism deals - with it. (We can't drop kick-out in favour of iteration, becuase kick-out + with it. (We can't drop kick-out in favour of iteration, because kick-out works for skolem-equalities, not just unifications.) So the monad-global Unification Level Flag, kept in tcs_unif_lvl keeps diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs index d434331605..6f7a7c548c 100644 --- a/compiler/GHC/Tc/TyCl.hs +++ b/compiler/GHC/Tc/TyCl.hs @@ -779,7 +779,7 @@ swizzleTcTyConBndrs tc_infos | (tc, scoped_prs, kind) <- tc_infos ] swizzle_prs :: [(Name,TyVar)] - -- Pairs the user-specifed Name with its representative TyVar + -- Pairs the user-specified Name with its representative TyVar -- See Note [Swizzling the tyvars before generaliseTcTyCon] swizzle_prs = [ pr | (_, prs, _) <- tc_infos, pr <- prs ] diff --git a/compiler/GHC/Tc/TyCl/Instance.hs b/compiler/GHC/Tc/TyCl/Instance.hs index 8bc1d3a746..469ef20778 100644 --- a/compiler/GHC/Tc/TyCl/Instance.hs +++ b/compiler/GHC/Tc/TyCl/Instance.hs @@ -1112,7 +1112,7 @@ the /data constructor/ declarations altogether, looking only at the data instance /header/. Observations: -* This choice is simple to describe, as well as simple to implment. +* This choice is simple to describe, as well as simple to implement. For a data/newtype instance decl, the instance kinds are influenced /only/ by the header. diff --git a/compiler/GHC/Tc/TyCl/Utils.hs b/compiler/GHC/Tc/TyCl/Utils.hs index b9fb54cc9f..2135f18b77 100644 --- a/compiler/GHC/Tc/TyCl/Utils.hs +++ b/compiler/GHC/Tc/TyCl/Utils.hs @@ -1105,6 +1105,6 @@ We want to generate HsBinds for unT that look something like this: Note that the type of recSelError is `forall r (a :: TYPE r). Addr# -> a`. Therefore, when used in the right-hand side of `unT`, GHC attempts to instantiate `a` with `(forall b. b -> b) -> Int`, which is impredicative. -To make sure that GHC is OK with this, we enable ImpredicativeTypes interally +To make sure that GHC is OK with this, we enable ImpredicativeTypes internally when typechecking these HsBinds so that the user does not have to. -} diff --git a/compiler/GHC/Tc/Utils/Unify.hs b/compiler/GHC/Tc/Utils/Unify.hs index 23dcfe6e83..121ebfbe7e 100644 --- a/compiler/GHC/Tc/Utils/Unify.hs +++ b/compiler/GHC/Tc/Utils/Unify.hs @@ -176,7 +176,7 @@ before looking for an arrow type. But if it doesn't find an arrow type, it wants to generate a message like "f is applied to two arguments but its type only has one". -To do that, it needs to konw about the args that tcArgs has already +To do that, it needs to know about the args that tcArgs has already munched up -- hence passing in n_val_args_in_call and arg_tys_so_far; and hence also the accumulating so_far arg to 'go'. diff --git a/compiler/GHC/Tc/Utils/Zonk.hs b/compiler/GHC/Tc/Utils/Zonk.hs index 76b101c679..4fb5286c70 100644 --- a/compiler/GHC/Tc/Utils/Zonk.hs +++ b/compiler/GHC/Tc/Utils/Zonk.hs @@ -1777,7 +1777,7 @@ Solution: (see #15552 for other variants) the treatment of lexically-scoped variables in ze_tv_env and ze_id_env.) - Is the extra work worth it? Some non-sytematic perf measurements + Is the extra work worth it? Some non-systematic perf measurements suggest that compiler allocation is reduced overall (by 0.5% or so) but compile time really doesn't change. -} diff --git a/compiler/GHC/Types/Basic.hs b/compiler/GHC/Types/Basic.hs index 3b2f1a3140..4c92b8f9a3 100644 --- a/compiler/GHC/Types/Basic.hs +++ b/compiler/GHC/Types/Basic.hs @@ -938,7 +938,7 @@ type RulesOnly = Bool type BranchCount = Int -- For OneOcc, the BranchCount says how many syntactic occurrences there are -- At the moment we really only check for 1 or >1, but in principle - -- we could pay attention to how *many* occurences there are + -- we could pay attention to how *many* occurrences there are -- (notably in postInlineUnconditionally). -- But meanwhile, Ints are very efficiently represented. diff --git a/compiler/GHC/Types/Demand.hs b/compiler/GHC/Types/Demand.hs index c2e4770da6..0a23e10224 100644 --- a/compiler/GHC/Types/Demand.hs +++ b/compiler/GHC/Types/Demand.hs @@ -1300,7 +1300,7 @@ But the demand fed into f might be less than CS(CS(U)). Then we have to - We have to multiply divergence with C_01. 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. * Used more than once, e.g. CM(CS(U)): - Multiply with C_1N. Even if f puts a used-once demand on any of its argument diff --git a/compiler/GHC/Types/Name/Occurrence.hs b/compiler/GHC/Types/Name/Occurrence.hs index d2e4127010..d29d7ab7ec 100644 --- a/compiler/GHC/Types/Name/Occurrence.hs +++ b/compiler/GHC/Types/Name/Occurrence.hs @@ -646,7 +646,7 @@ mkNewTyCoOcc = mk_simple_deriv tcName "N:" -- Coercion for newtypes mkInstTyCoOcc = mk_simple_deriv tcName "D:" -- Coercion for type functions mkEqPredCoOcc = mk_simple_deriv tcName "$co" --- Used in derived instances for the names of auxilary bindings. +-- Used in derived instances for the names of auxiliary bindings. -- See Note [Auxiliary binders] in GHC.Tc.Deriv.Generate. mkCon2TagOcc = mk_simple_deriv varName "$con2tag_" mkTag2ConOcc = mk_simple_deriv varName "$tag2con_" diff --git a/compiler/GHC/Utils/Misc.hs b/compiler/GHC/Utils/Misc.hs index d0989de39e..46fb352e61 100644 --- a/compiler/GHC/Utils/Misc.hs +++ b/compiler/GHC/Utils/Misc.hs @@ -785,7 +785,7 @@ splitAtList xs ys = go 0# xs ys -- drop from the end of a list dropTail :: Int -> [a] -> [a] -- Specification: dropTail n = reverse . drop n . reverse --- Better implemention due to Joachim Breitner +-- Better implementation due to Joachim Breitner -- http://www.joachim-breitner.de/blog/archives/600-On-taking-the-last-n-elements-of-a-list.html dropTail n xs = go (drop n xs) xs diff --git a/compiler/Language/Haskell/Syntax/Decls.hs b/compiler/Language/Haskell/Syntax/Decls.hs index ff65d085c7..453b963028 100644 --- a/compiler/Language/Haskell/Syntax/Decls.hs +++ b/compiler/Language/Haskell/Syntax/Decls.hs @@ -950,7 +950,7 @@ type LDerivClauseTys pass = XRec pass (DerivClauseTys pass) -- | The types mentioned in a single @deriving@ clause. This can come in two -- forms, 'DctSingle' or 'DctMulti', depending on whether the types are -- surrounded by enclosing parentheses or not. These parentheses are --- semantically differnt than 'HsParTy'. For example, @deriving ()@ means +-- semantically different than 'HsParTy'. For example, @deriving ()@ means -- \"derive zero classes\" rather than \"derive an instance of the 0-tuple\". -- -- 'DerivClauseTys' use 'LHsSigType' because @deriving@ clauses can mention diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs index 72c16fe22a..0e54adb8f4 100644 --- a/compiler/Language/Haskell/Syntax/Expr.hs +++ b/compiler/Language/Haskell/Syntax/Expr.hs @@ -1267,7 +1267,7 @@ data ParStmtBlock idL idR -- | The fail operator -- --- This is used for `.. <-` "bind statments" in do notation, including +-- This is used for `.. <-` "bind statements" in do notation, including -- non-monadic "binds" in applicative. -- -- The fail operator is 'Just expr' if it potentially fail monadically. if the |