Commit caf50f63 authored by Gabor Greif's avatar Gabor Greif 💬

Stomp a few typos and grammaros

Also use 'id'
parent f99d898b
......@@ -1752,7 +1752,7 @@ Moreover we really might float (f (dataToTag# x)) outside the case,
and then it really, really doesn't obey the let/app invariant.
The solution is simple: exprOkForSpeculation does not try to take
advantage of the evaluated-ness of (lifted) varaibles. And it returns
advantage of the evaluated-ness of (lifted) variables. And it returns
False (always) for DataToTagOp and SeqOp.
Note that exprIsHNF /can/ and does take advantage of evaluated-ness;
......
......@@ -541,7 +541,7 @@ dsGetFamInstEnvs
dsGetMetaEnv :: DsM (NameEnv DsMetaVal)
dsGetMetaEnv = do { env <- getLclEnv; return (dsl_meta env) }
-- | The @COMPLETE@ pragams provided by the user for a given `TyCon`.
-- | The @COMPLETE@ pragmas provided by the user for a given `TyCon`.
dsGetCompleteMatches :: TyCon -> DsM [CompleteMatch]
dsGetCompleteMatches tc = do
eps <- getEps
......
......@@ -47,7 +47,7 @@ The Big Main Idea is:
a non-one-shot value lambda, and hence may be shared.
To achieve this we may need to do two thing:
To achieve this we may need to do two things:
a) Let-bind the sub-expression:
......@@ -103,7 +103,7 @@ It turns out that this generates a subexpression of the form
@
\deq x ys -> let eq = eqFromEqDict deq in ...
@
vwhich might usefully be separated to
which might usefully be separated to
@
\deq -> let eq = eqFromEqDict deq in \xy -> ...
@
......
......@@ -1307,7 +1307,7 @@ nodeScore env old_bndr new_bndr bind_rhs lb_deps
= (0, 0, True) -- See Note [Self-recursion and loop breakers]
| not (occ_unf_act env old_bndr) -- A binder whose inlining is inactive (e.g. has
= (0, 0, True) -- a NOINLINE pragam) makes a great loop breaker
= (0, 0, True) -- a NOINLINE pragma) makes a great loop breaker
| exprIsTrivial rhs
= mk_score 10 -- Practically certain to be inlined
......
......@@ -167,7 +167,7 @@ out at all. See notes with lvlMFE below.
But, check this out:
-- At one time I tried the effect of not float anything out of an InlineMe,
-- At one time I tried the effect of not floating anything out of an InlineMe,
-- but it sometimes works badly. For example, consider PrelArr.done. It
-- has the form __inline (\d. e)
-- where e doesn't mention d. If we float this to
......@@ -366,7 +366,7 @@ lvlExpr env expr@(_, AnnLam {})
(bndrs, body) = collectAnnBndrs expr
(env1, bndrs1) = substBndrsSL NonRecursive env bndrs
(new_env, new_bndrs) = lvlLamBndrs env1 (le_ctxt_lvl env) bndrs1
-- At one time we called a special verion of collectBinders,
-- At one time we called a special version of collectBinders,
-- which ignored coercions, because we don't want to split
-- a lambda like this (\x -> coerce t (\s -> ...))
-- This used to happen quite a bit in state-transformer programs,
......@@ -517,7 +517,7 @@ Things to note:
- exrpIsHNF catches the key case of an evaluated variable
- exprOkForSpeculaion is /false/ of an evaluated varaible;
- exprOkForSpeculation is /false/ of an evaluated variable;
See Note [exprOkForSpeculation and evaluated variables] in CoreUtils
So we'd actually miss the key case!
......@@ -1117,7 +1117,7 @@ lvlBind env (AnnRec pairs)
-- this, allocation rises significantly on some programs
--
-- We could elaborate it for the case where there are several
-- mutually functions, but it's quite a bit more complicated
-- mutually recursive functions, but it's quite a bit more complicated
--
-- This all seems a bit ad hoc -- sigh
let (rhs_env, abs_vars_w_lvls) = lvlLamBndrs env dest_lvl abs_vars
......@@ -1226,7 +1226,7 @@ lvlFloatRhs abs_vars dest_lvl env rec is_bot mb_join_arity rhs
{- Note [Floating from a RHS]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When float the RHS of a let-binding, we don't always want to apply
When floating the RHS of a let-binding, we don't always want to apply
lvlMFE to the body of a lambda, as we usually do, because the entire
binding body is already going to the right place (dest_lvl).
......@@ -1696,7 +1696,7 @@ cloneLetVars is_rec
| otherwise = v
zap_join | isTopLvl dest_lvl = zapJoinId
| otherwise = \v -> v
| otherwise = id
add_id :: IdEnv ([Var], LevelledExpr) -> (Var, Var) -> IdEnv ([Var], LevelledExpr)
add_id id_env (v, v1)
......
......@@ -1112,8 +1112,8 @@ want PreInlineUnconditionally to second-guess it. A live example is
Trac #3736.
c.f. Note [Stable unfoldings and postInlineUnconditionally]
NB: if the pragama is INLINEABLE, then we don't want to behave int
this special way -- an INLINEABLE pragam just says to GHC "inline this
NB: if the pragma is INLINEABLE, then we don't want to behave in
this special way -- an INLINEABLE pragma just says to GHC "inline this
if you like". But if there is a unique occurrence, we want to inline
the stable unfolding, not the RHS.
......
......@@ -940,7 +940,7 @@ specCase env scrut' case_bndr [(con, args, rhs)]
| sc_arg' <- sc_args' ]
-- Extend the substitution for RHS to map the *original* binders
-- to their floated verions.
-- to their floated versions.
mb_sc_flts :: [Maybe DictId]
mb_sc_flts = map (lookupVarEnv clone_env) args'
clone_env = zipVarEnv sc_args' sc_args_flt
......@@ -1721,7 +1721,7 @@ This doesn't always work. One example I came across was this:
oneof = choose (1::Int)
It's a silly exapmle, but we get
It's a silly example, but we get
choose = /\a. g `cast` co
where choose doesn't have any dict arguments. Thus far I have not
tried to fix this (wait till there's a real example).
......@@ -2176,9 +2176,9 @@ dumpUDs bndrs uds@(MkUD { ud_binds = orig_dbs, ud_calls = orig_calls })
dumpBindUDs :: [CoreBndr] -> UsageDetails -> (UsageDetails, Bag DictBind, Bool)
-- Used at a let(rec) binding.
-- We return a boolean indicating whether the binding itself is mentioned
-- is mentioned, directly or indirectly, by any of the ud_calls; in that
-- case we want to float the binding itself;
-- We return a boolean indicating whether the binding itself is mentioned,
-- directly or indirectly, by any of the ud_calls; in that case we want to
-- float the binding itself;
-- See Note [Floated dictionary bindings]
dumpBindUDs bndrs (MkUD { ud_binds = orig_dbs, ud_calls = orig_calls })
= -- pprTrace "dumpBindUDs" (ppr bndrs $$ ppr free_uds $$ ppr dump_dbs) $
......
......@@ -506,7 +506,7 @@ To avoid this:
mkWWstr :: DynFlags
-> FamInstEnvs
-> Bool -- True <=> INLINEABLE pragama on this function defn
-> Bool -- True <=> INLINEABLE pragma on this function defn
-- See Note [Do not unpack class dictionaries]
-> [Var] -- Wrapper args; have their demand info on them
-- *Includes type variables*
......@@ -569,7 +569,7 @@ as-yet-un-filled-in pkgState files.
-- brings into scope wrap_arg (via lets)
-- See Note [How to do the worker/wrapper split]
mkWWstr_one :: DynFlags -> FamInstEnvs
-> Bool -- True <=> INLINEABLE pragama on this function defn
-> Bool -- True <=> INLINEABLE pragma on this function defn
-- See Note [Do not unpack class dictionaries]
-> Var
-> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)
......
......@@ -1185,7 +1185,7 @@ zonk_eq_types = go
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider
newtype N m a = MkN (m a)
Then N will get a conservative, Nominal role for its second paramter 'a',
Then N will get a conservative, Nominal role for its second parameter 'a',
because it appears as an argument to the unknown 'm'. Now consider
[W] N Maybe a ~R# N Maybe b
......
......@@ -189,7 +189,7 @@ Laws for oneLiner
<o1> oneLiner (nest k p) = nest k (oneLiner p)
<o2> oneLiner (x <> y) = oneLiner x <> oneLiner y
You might think that the following verion of <m1> would
You might think that the following version of <m1> would
be neater:
<3 NO> (text s <> x) $$ y = text s <> ((empty <> x)) $$
......
......@@ -23,7 +23,6 @@
module Pragma001 () where
-- This will make a warning if the pragam isn't picked up
-- This will make a warning if the pragma isn't picked up
foo _ = ()
foo _ = ()
......@@ -4,7 +4,6 @@
module Pragma002 () where
-- This will make a warning if the pragam isn't picked up
-- This will make a warning if the pragma isn't picked up
foo _ = ()
foo _ = ()
......@@ -11,7 +11,7 @@ import Control.Monad
-- minimal Data/Rep classes
data Rep (ctx :: * -> *) a
class Data (ctx :: * -> *) a where rep :: Rep ctx a
class Data (ctx :: * -> *) a where rep :: Rep ctx a
class Sat a where dict :: a
......@@ -23,7 +23,7 @@ class Subst_A a t t' where
data SubstD_A a t t' = SubstD_A {substD_A:: forall m. (Monad m) => a -> t -> t' -> m t'}
-- Allow override dictionary verion with implementation of type class Subst
-- Allow override dictionary version with implementation of type class Subst
instance Subst_A a t t' => Sat (SubstD_A a t t') where
dict = SubstD_A {substD_A = subst_A}
......@@ -39,7 +39,7 @@ class Subst_B a t t' where
data SubstD_B a t t' = SubstD_B {substD_B :: a -> t -> t' -> t'}
-- allow override dictionary version with implementation of type class Subst
instance Subst_B a t t' => Sat (SubstD_B a t t') where
dict = SubstD_B {substD_B = subst_B}
......@@ -55,7 +55,7 @@ Here are the key lines of code:
class Subst a t t' where
subst :: (Monad m) => a -> t -> t' -> m t'
data SubstD a t t'
data SubstD a t t'
= SubstD (forall m. Monad m => a -> t -> t' -> m t')
instance Data (SubstD a t) t' => Subst a t t' -- (1)
......@@ -67,7 +67,7 @@ The call to 'subst' on the last line gives rise to a constraint (Subst
a t t'). But that constraint can be satisfied in two different ways:
Using the instance declaration for Subst (which matches anything!)
Using the context of the Sat (SubstD ..) instance declaration itself
Using the context of the Sat (SubstD ..) instance declaration itself
If GHC uses (1) it gets into a corner it can't get out of, because now
it needs (Data (SubstD a t) t'), and that it can't get. The error
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment