diff options
author | Gabor Greif <ggreif@gmail.com> | 2014-03-23 21:05:10 +0100 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2014-03-23 21:05:55 +0100 |
commit | 4b4fc7d968e5acebb2e5da5f978a3b44c6b27e87 (patch) | |
tree | 387681cceaf00944af6c21a9931abfa6583cb33e /compiler | |
parent | 90142beab88127892e384c8275ac5757a7d467e7 (diff) | |
download | haskell-4b4fc7d968e5acebb2e5da5f978a3b44c6b27e87.tar.gz |
Catch a bunch of typos in comments
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/coreSyn/CoreSubst.lhs | 12 | ||||
-rw-r--r-- | compiler/typecheck/TcDeriv.lhs | 6 | ||||
-rw-r--r-- | compiler/typecheck/TcTyClsDecls.lhs | 2 | ||||
-rw-r--r-- | compiler/types/TypeRep.lhs | 8 |
4 files changed, 14 insertions, 14 deletions
diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs index 95dccc2f7d..ff24e2e3b1 100644 --- a/compiler/coreSyn/CoreSubst.lhs +++ b/compiler/coreSyn/CoreSubst.lhs @@ -355,7 +355,7 @@ instance Outputable Subst where %************************************************************************ \begin{code} --- | Apply a substititon to an entire 'CoreExpr'. Rememeber, you may only +-- | Apply a substitution to an entire 'CoreExpr'. Remember, you may only -- apply the substitution /once/: see "CoreSubst#apply_once" -- -- Do *not* attempt to short-cut in the case of an empty substitution! @@ -402,8 +402,8 @@ subst_expr subst expr where (subst', bndrs') = substBndrs subst bndrs --- | Apply a substititon to an entire 'CoreBind', additionally returning an updated 'Subst' --- that should be used by subsequent substitutons. +-- | Apply a substitution to an entire 'CoreBind', additionally returning an updated 'Subst' +-- that should be used by subsequent substitutions. substBind, substBindSC :: Subst -> CoreBind -> (Subst, CoreBind) substBindSC subst bind -- Short-cut if the substitution is empty @@ -460,7 +460,7 @@ preserve occ info in rules. \begin{code} -- | Substitutes a 'Var' for another one according to the 'Subst' given, returning --- the result and an updated 'Subst' that should be used by subsequent substitutons. +-- the result and an updated 'Subst' that should be used by subsequent substitutions. -- 'IdInfo' is preserved by this process, although it is substituted into appropriately. substBndr :: Subst -> Var -> (Subst, Var) substBndr subst bndr @@ -484,7 +484,7 @@ substRecBndrs subst bndrs \begin{code} substIdBndr :: SDoc -> Subst -- ^ Substitution to use for the IdInfo - -> Subst -> Id -- ^ Substitition and Id to transform + -> Subst -> Id -- ^ Substitution and Id to transform -> (Subst, Id) -- ^ Transformed pair -- NB: unfolding may be zapped @@ -555,7 +555,7 @@ cloneRecIdBndrs subst us ids -- Just like substIdBndr, except that it always makes a new unique -- It is given the unique to use clone_id :: Subst -- Substitution for the IdInfo - -> Subst -> (Id, Unique) -- Substitition and Id to transform + -> Subst -> (Id, Unique) -- Substitution and Id to transform -> (Subst, Id) -- Transformed pair clone_id rec_subst subst@(Subst in_scope idvs tvs cvs) (old_id, uniq) diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 4cec13457b..9cd2cf1ad5 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -789,9 +789,9 @@ In the two examples, i.e. (* -> * -> *) ~ (k -> k -> k) yielding k:=* -Now we get a kind substition. We then need to: +Now we get a kind substitution. We then need to: - 1. Remove the substituted-out kind variables from the quantifed kind vars + 1. Remove the substituted-out kind variables from the quantified kind vars 2. Apply the substitution to the kinds of quantified *type* vars (and extend the substitution to reflect this change) @@ -806,7 +806,7 @@ Forgetting step (2) caused Trac #8893: When deriving Functor for P, we unify k to *, but we then want an instance $df :: forall (x:*->*). Functor x => Functor (P * (x:*->*)) -and similarly for C. Notice the modifed kind of x, both at binding +and similarly for C. Notice the modified kind of x, both at binding and occurrence sites. diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs index 05dc0299a7..d0f7814abf 100644 --- a/compiler/typecheck/TcTyClsDecls.lhs +++ b/compiler/typecheck/TcTyClsDecls.lhs @@ -1155,7 +1155,7 @@ tcConDecl new_or_data rep_tycon tmpl_tvs res_tmpl -- Data types (arg_tys, stricts) = unzip btys ; return (ctxt, arg_tys, res_ty, is_infix, field_lbls, stricts) } - -- Generalise the kind variables (returning quantifed TcKindVars) + -- Generalise the kind variables (returning quantified TcKindVars) -- and quantify the type variables (substituting their kinds) -- REMEMBER: 'tkvs' are: -- ResTyH98: the *existential* type variables only diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs index 906989a718..bea67b4e3b 100644 --- a/compiler/types/TypeRep.lhs +++ b/compiler/types/TypeRep.lhs @@ -415,7 +415,7 @@ instance NamedThing TyThing where -- Can't put this with the type -- 2. In particular, the /kind/ of the type variables in -- the in-scope set is not relevant -- --- 3. The substition is only applied ONCE! This is because +-- 3. The substitution is only applied ONCE! This is because -- in general such application will not reached a fixed point. data TvSubst = TvSubst InScopeSet -- The in-scope type and kind variables @@ -423,7 +423,7 @@ data TvSubst -- See Note [Apply Once] -- and Note [Extending the TvSubstEnv] --- | A substitition of 'Type's for 'TyVar's +-- | A substitution of 'Type's for 'TyVar's -- and 'Kind's for 'KindVar's type TvSubstEnv = TyVarEnv Type -- A TvSubstEnv is used both inside a TvSubst (with the apply-once @@ -439,10 +439,10 @@ We use TvSubsts to instantiate things, and we might instantiate forall a b. ty \with the types [a, b], or [b, a]. -So the substition might go [a->b, b->a]. A similar situation arises in Core +So the substitution might go [a->b, b->a]. A similar situation arises in Core when we find a beta redex like (/\ a /\ b -> e) b a -Then we also end up with a substition that permutes type variables. Other +Then we also end up with a substitution that permutes type variables. Other variations happen to; for example [a -> (a, b)]. *************************************************** |