diff options
author | Eric Lindblad <lindblad@gmx.us> | 2022-09-13 10:31:23 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-09-14 03:13:56 -0400 |
commit | 646d15ad8f1119f339998ee8dd79ea96cfd1d165 (patch) | |
tree | 84bc30035fb31ea0f418384b2399400d53539cbf /compiler/GHC/Tc/Gen | |
parent | dc6af9ed87e619d754bfc385df931c81cba6d93a (diff) | |
download | haskell-646d15ad8f1119f339998ee8dd79ea96cfd1d165.tar.gz |
Fix typos
This fixes various typos and spelling mistakes
in the compiler.
Fixes #21891
Diffstat (limited to 'compiler/GHC/Tc/Gen')
-rw-r--r-- | compiler/GHC/Tc/Gen/App.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Bind.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Export.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Expr.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Foreign.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Head.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/HsType.hs | 14 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Sig.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Splice.hs | 2 |
9 files changed, 22 insertions, 22 deletions
diff --git a/compiler/GHC/Tc/Gen/App.hs b/compiler/GHC/Tc/Gen/App.hs index 4f04e82cf2..7d64f0d1ef 100644 --- a/compiler/GHC/Tc/Gen/App.hs +++ b/compiler/GHC/Tc/Gen/App.hs @@ -86,7 +86,7 @@ Some notes relative to the paper * When QL is done, we don't need to turn the un-filled-in instantiation variables into unification variables -- they - already /are/ unification varibles! See also + already /are/ unification variables! See also Note [Instantiation variables are short lived]. * We cleverly avoid the quadratic cost of QL, alluded to in the paper. @@ -216,7 +216,7 @@ Fig 3, plus the modification in Fig 5, of the QL paper: It treats application chains (f e1 @ty e2) specially: -* So we can report errors like "in the third arument of a call of f" +* So we can report errors like "in the third argument of a call of f" * So we can do Visible Type Application (VTA), for which we must not eagerly instantiate the function part of the application. @@ -1060,7 +1060,7 @@ qlUnify delta ty1 ty2 ; writeMetaTyVar kappa (mkCastTy ty2 co) } | otherwise - = return () -- Occurs-check or forall-bound varialbe + = return () -- Occurs-check or forall-bound variable {- Note [Actual unification in qlUnify] @@ -1085,7 +1085,7 @@ That is the entire point of qlUnify! Wrinkles: * What if kappa and ty have different kinds? We solve that problem by calling unifyKind, producing a coercion perhaps emitting some deferred equality constraints. That is /different/ from the approach we use in - the main constraint solver for herterogeneous equalities; see Note + the main constraint solver for heterogeneous equalities; see Note [Equalities with incompatible kinds] in Solver.Canonical Why different? Because: diff --git a/compiler/GHC/Tc/Gen/Bind.hs b/compiler/GHC/Tc/Gen/Bind.hs index d13b3b197c..fedea75796 100644 --- a/compiler/GHC/Tc/Gen/Bind.hs +++ b/compiler/GHC/Tc/Gen/Bind.hs @@ -1153,7 +1153,7 @@ Consider this from #18646 We get [W] Foo (), [W] Applicative f. When we do pickCapturedPreds in choose_psig_context, we'll discard Foo ()! Usually would not quantify over such (closed) predicates. So my_theta will be (Applicative f). But we really -do want to quantify over (Foo ()) -- it was speicfied by the programmer. +do want to quantify over (Foo ()) -- it was specified by the programmer. Solution: always return annotated_theta (user-specified) plus the extra piece diff_theta. @@ -1354,7 +1354,7 @@ with -XImpredicativeTypes we can infer a good type for (combine head ids), and use that to tell us the polymorphic types of x and y. -We don't need to check -XImpredicativeTypes beucase without it +We don't need to check -XImpredicativeTypes because without it these types like [forall a. a->a] are illegal anyway, so this special case code only really has an effect if -XImpredicativeTypes is on. Small exception: diff --git a/compiler/GHC/Tc/Gen/Export.hs b/compiler/GHC/Tc/Gen/Export.hs index efc6433f29..d42ee046b5 100644 --- a/compiler/GHC/Tc/Gen/Export.hs +++ b/compiler/GHC/Tc/Gen/Export.hs @@ -125,7 +125,7 @@ are both type constructors into two GRES. , T defined at A.hs:4:23 ] Then, we get @[C{C;}, C{T;}, T{T;}, T{D;}]@, which eventually gets merged -into @[C{C, T;}, T{T, D;}]@ (which satsifies the AvailTC invariant). +into @[C{C, T;}, T{T, D;}]@ (which satisfies the AvailTC invariant). -} data ExportAccum -- The type of the accumulating parameter of @@ -758,4 +758,4 @@ exportClashErr global_env child1 child2 ie1 ie2 case SrcLoc.leftmost_smallest (greSrcSpan gre1) (greSrcSpan gre2) of LT -> (child1, gre1, ie1, child2, gre2, ie2) GT -> (child2, gre2, ie2, child1, gre1, ie1) - EQ -> panic "exportClashErr: clashing exports have idential location" + EQ -> panic "exportClashErr: clashing exports have identical location" diff --git a/compiler/GHC/Tc/Gen/Expr.hs b/compiler/GHC/Tc/Gen/Expr.hs index 6a4eb7f6f1..c5c5616024 100644 --- a/compiler/GHC/Tc/Gen/Expr.hs +++ b/compiler/GHC/Tc/Gen/Expr.hs @@ -185,7 +185,7 @@ tcPolyExpr expr res_ty tcExpr :: HsExpr GhcRn -> ExpRhoType -> TcM (HsExpr GhcTc) --- Use tcApp to typecheck appplications, which are treated specially +-- Use tcApp to typecheck applications, which are treated specially -- by Quick Look. Specifically: -- - HsVar lone variables, to ensure that they can get an -- impredicative instantiation (via Quick Look @@ -287,7 +287,7 @@ tcExpr e@(HsLamCase x lc_variant matches) res_ty ************************************************************************ -} --- Explict lists [e1,e2,e3] have been expanded already in the renamer +-- Explicit lists [e1,e2,e3] have been expanded already in the renamer -- The expansion includes an ExplicitList, but it is always the built-in -- list type, so that's all we need concern ourselves with here. See -- GHC.Rename.Expr. Note [Handling overloaded and rebindable constructs] @@ -1306,7 +1306,7 @@ desugarRecordUpd record_expr rbnds res_ty ; nm <- newNameAt nm_occ generatedSrcSpan ; let id = mkLocalId nm m actual_arg_ty -- NB: create fresh names to avoid any accidental shadowing - -- occuring in the RHS expressions when creating the let bindings: + -- occurring in the RHS expressions when creating the let bindings: -- -- let x1 = e1; x2 = e2; ... ; return (fld_nm, (id, rhs)) diff --git a/compiler/GHC/Tc/Gen/Foreign.hs b/compiler/GHC/Tc/Gen/Foreign.hs index 0f1c9084d7..57b30c9548 100644 --- a/compiler/GHC/Tc/Gen/Foreign.hs +++ b/compiler/GHC/Tc/Gen/Foreign.hs @@ -96,7 +96,7 @@ declaration. If we have newtype Age = MkAge Int we want to see that Age -> IO () is the same as Int -> IO (). But, we don't -need to recur on any type parameters, because no paramaterized types (with +need to recur on any type parameters, because no parameterized types (with interesting parameters) are marshalable! The full list of marshalable types is in the body of boxedMarshalableTyCon in GHC.Tc.Utils.TcType. The only members of that list not at kind * are Ptr, FunPtr, and StablePtr, all of which get marshaled diff --git a/compiler/GHC/Tc/Gen/Head.hs b/compiler/GHC/Tc/Gen/Head.hs index dd67b7f2b2..6341aecf8d 100644 --- a/compiler/GHC/Tc/Gen/Head.hs +++ b/compiler/GHC/Tc/Gen/Head.hs @@ -956,7 +956,7 @@ tcExprSig _ expr sig@(PartialSig { psig_name = name, sig_loc = loc }) {- Note [Partial expression signatures] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Partial type signatures on expressions are easy to get wrong. But -here is a guiding principile +here is a guiding principle e :: ty should behave like let x :: ty diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs index 3fed598f4d..c6deae4be2 100644 --- a/compiler/GHC/Tc/Gen/HsType.hs +++ b/compiler/GHC/Tc/Gen/HsType.hs @@ -336,7 +336,7 @@ than the surrounding context.) This kappa cannot be solved for while checking the pattern signature (which is not kind-generalized). When we are checking the *body* of foo, though, we need to unify the type of x with the argument type of bar. At this point, the ambient TcLevel is 1, and spotting a -matavariable with level 2 would violate the (WantedInv) invariant of +metavariable with level 2 would violate the (WantedInv) invariant of Note [TcLevel invariants]. So, instead of kind-generalizing, we promote the metavariable to level 1. This is all done in kindGeneralizeNone. @@ -1320,7 +1320,7 @@ This table summarises this relation: | f :: forall {a}. type HsForAllInvis InferredSpec Inferred | f :: forall a -> type HsForAllVis SpecifiedSpec Required | f :: forall {a} -> type HsForAllVis InferredSpec / -| This last form is non-sensical and is thus rejected. +| This last form is nonsensical and is thus rejected. ---------------------------------------------------------------------------- For more information regarding the interpretation of the resulting ArgFlag, see @@ -2447,7 +2447,7 @@ kcInferDeclHeader kcInferDeclHeader name flav (HsQTvs { hsq_ext = kv_ns , hsq_explicit = hs_tvs }) kc_res_ki - -- No standalane kind signature and no CUSK. + -- No standalone kind signature and no CUSK. -- See Note [Required, Specified, and Inferred for types] in GHC.Tc.TyCl = addTyConFlavCtxt name flav $ do { (scoped_kvs, (tc_tvs, res_kind)) @@ -2616,7 +2616,7 @@ matchUpSigWithDecl -- Argument is excess TyConBinders and tail kind -> TcM ( [TcTyConBinder] -- Skolemised binders, with TcTyVars , a ) --- See Note [Matching a kind sigature with a declaration] +-- See Note [Matching a kind signature with a declaration] -- Invariant: Length of returned TyConBinders + length of excess TyConBinders -- = length of incoming TyConBinders matchUpSigWithDecl sig_tcbs sig_res_kind hs_bndrs thing_inside @@ -3505,7 +3505,7 @@ bindTyClTyVarsAndZonk tycon_name thing_inside zonkAndScopedSort :: [TcTyVar] -> TcM [TcTyVar] zonkAndScopedSort spec_tkvs = do { spec_tkvs <- zonkTcTyVarsToTcTyVars spec_tkvs - -- Zonk the kinds, to we can do the dependency analayis + -- Zonk the kinds, to we can do the dependency analysis -- Do a stable topological sort, following -- Note [Ordering of implicit variables] in GHC.Rename.HsType @@ -3603,7 +3603,7 @@ We must * Find the free variables with level > i, in this case gamma[i] * Skolemise those free variables and quantify over them, giving f :: forall g. beta[i-1] -> g - * Emit the residiual constraint wrapped in an implication for g, + * Emit the residual constraint wrapped in an implication for g, thus forall g. WC All of this happens for types too. Consider @@ -4063,7 +4063,7 @@ we do the following * Just as for ordinary signatures, we must solve local equalities and zonk the type after kind-checking it, to ensure that all the nested - forall binders can "see" their occurrenceds + forall binders can "see" their occurrences Just as for ordinary signatures, this zonk also gets any Refl casts out of the way of instantiation. Example: #18008 had diff --git a/compiler/GHC/Tc/Gen/Sig.hs b/compiler/GHC/Tc/Gen/Sig.hs index 4bb9a8038d..138e61978c 100644 --- a/compiler/GHC/Tc/Gen/Sig.hs +++ b/compiler/GHC/Tc/Gen/Sig.hs @@ -112,7 +112,7 @@ especially on value bindings. Here's an overview. but for /partial/ signatures it starts from the HsSyn, so it has to kind-check it etc: tcHsPartialSigType. It's convenient to do this at the same time as instantiation, because we can - make the wildcards into unification variables right away, raather + make the wildcards into unification variables right away, rather than somehow quantifying over them. And the "TcLevel" of those unification variables is correct because we are in tcMonoBinds. diff --git a/compiler/GHC/Tc/Gen/Splice.hs b/compiler/GHC/Tc/Gen/Splice.hs index 027ae27aff..47d19c127b 100644 --- a/compiler/GHC/Tc/Gen/Splice.hs +++ b/compiler/GHC/Tc/Gen/Splice.hs @@ -449,7 +449,7 @@ RENAMER (rnUntypedBracket): SplicePointName, 'spn' * The SplicePointName connects the `PendingRnSplice` with the particular point - in the syntax tree where that expresion should be spliced in. That point + in the syntax tree where that expression should be spliced in. That point in the tree is identified by `(HsUntypedSpliceNested spn)`. It is used by the desugarer, so that we ultimately generate something like let spn = g x |